@launchdarkly/browser 0.1.0 → 0.1.1
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 +17 -0
- package/dist/index.cjs +63 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +63 -63
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
"use strict";var Wi=Object.defineProperty,
|
|
2
|
-
`,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l
|
|
3
|
-
`)}function tL(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}function
|
|
1
|
+
"use strict";var Wi=Object.defineProperty,B0=Object.defineProperties,j0=Object.getOwnPropertyDescriptor,Q0=Object.getOwnPropertyDescriptors,$0=Object.getOwnPropertyNames,Mh=Object.getOwnPropertySymbols;var Fh=Object.prototype.hasOwnProperty,q0=Object.prototype.propertyIsEnumerable;var Ph=(t,e,n)=>e in t?Wi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ah=(t,e)=>{for(var n in e||(e={}))Fh.call(e,n)&&Ph(t,n,e[n]);if(Mh)for(var n of Mh(e))q0.call(e,n)&&Ph(t,n,e[n]);return t},Jh=(t,e)=>B0(t,Q0(e));var Dh=(t,e)=>()=>(t&&(e=t(t=0)),e);var Yh=(t,e)=>{for(var n in e)Wi(t,n,{get:e[n],enumerable:!0})},tS=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of $0(e))!Fh.call(t,i)&&i!==n&&Wi(t,i,{get:()=>e[i],enumerable:!(r=j0(e,i))||r.enumerable});return t};var eS=t=>tS(Wi({},"__esModule",{value:!0}),t);var jy={};Yh(jy,{LDObserve:()=>Br});var qo,Br,Qy=Dh(()=>{"use strict";Oc();qo=class extends Bn{recordGauge(e){return this.h("recordGauge",[e])}recordCount(e){return this.h("recordCount",[e])}recordIncr(e){return this.h("recordIncr",[e])}recordHistogram(e){return this.h("recordHistogram",[e])}recordUpDownCounter(e){return this.h("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this.h("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this.h("startManualSpan",[e,n,r,i])}register(e,n){return this.h("register",[e,n])}recordLog(e,n,r){return this.h("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this.h("recordError",[e,n,r,i,o])}};typeof globalThis<"u"?globalThis.LDObserve?Br=globalThis.LDObserve:(Br=new qo,globalThis.LDObserve=Br):Br=new qo});function BG(t,e){for(var n=0;n<e.length;n++){let r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(let i in r)if(i!=="default"&&!(i in t)){let o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Ts(t,e){throw new Error(e)}function jG(t){return typeof t=="object"&&t!==null}function QG(t,e){throw new Error("Unexpected invariant triggered.")}function tu(t,e){let n=0,r=1;for(let i of t.body.matchAll($G)){if(typeof i.index=="number"||QG(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function qG(t){return wb(t.source,tu(t.source,t.start))}function wb(t,e){let n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,a=e.line===1?n:0,c=e.column+a,l=`${t.name}:${s}:${c}
|
|
2
|
+
`,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l+$y([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+$y([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function $y(t){let e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
|
|
3
|
+
`)}function tL(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}function qy(t){return t===void 0||t.length===0?void 0:t}function Zt(t,e,n){return new eu(`Syntax Error: ${n}`,{source:t,positions:[e]})}function tg(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&nL.has(e)}function ru(t){return t===9||t===32}function fi(t){return t>=48&&t<=57}function Eb(t){return t>=97&&t<=122||t>=65&&t<=90}function Rb(t){return Eb(t)||t===95}function rL(t){return Eb(t)||fi(t)||t===95}function iL(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<t.length;++s){var o;let a=t[s],c=oL(a);c!==a.length&&(r=(o=r)!==null&&o!==void 0?o:s,i=s,s!==0&&c<n&&(n=c))}return t.map((s,a)=>a===0?s:s.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function oL(t){let e=0;for(;e<t.length&&ru(t.charCodeAt(e));)++e;return e}function sL(t,e){let n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(f=>f.length===0||ru(f.charCodeAt(0))),s=n.endsWith('\\"""'),a=t.endsWith('"')&&!s,c=t.endsWith("\\"),l=a||c,u=!i||t.length>70||l||o||s,h="",p=i&&ru(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
|
|
4
4
|
`),h+=n,(u||l)&&(h+=`
|
|
5
|
-
`),'"""'+h+'"""'}function lL(t){return t===w.BANG||t===w.DOLLAR||t===w.AMP||t===w.PAREN_L||t===w.PAREN_R||t===w.SPREAD||t===w.COLON||t===w.EQUALS||t===w.AT||t===w.BRACKET_L||t===w.BRACKET_R||t===w.BRACE_L||t===w.PIPE||t===w.BRACE_R}function fr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function sa(t,e){return
|
|
5
|
+
`),'"""'+h+'"""'}function lL(t){return t===w.BANG||t===w.DOLLAR||t===w.AMP||t===w.PAREN_L||t===w.PAREN_R||t===w.SPREAD||t===w.COLON||t===w.EQUALS||t===w.AT||t===w.BRACKET_L||t===w.BRACKET_R||t===w.BRACE_L||t===w.PIPE||t===w.BRACE_R}function fr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function sa(t,e){return Cb(t.charCodeAt(e))&&Zb(t.charCodeAt(e+1))}function Cb(t){return t>=55296&&t<=56319}function Zb(t){return t>=56320&&t<=57343}function En(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return w.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Tt(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new Ib(e,n,r,o,s,i)}function cL(t,e){let n=t.source.body,r=n.length,i=e;for(;i<r;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return uL(t,i);case 33:return Tt(t,w.BANG,i,i+1);case 36:return Tt(t,w.DOLLAR,i,i+1);case 38:return Tt(t,w.AMP,i,i+1);case 40:return Tt(t,w.PAREN_L,i,i+1);case 41:return Tt(t,w.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Tt(t,w.SPREAD,i,i+3);break;case 58:return Tt(t,w.COLON,i,i+1);case 61:return Tt(t,w.EQUALS,i,i+1);case 64:return Tt(t,w.AT,i,i+1);case 91:return Tt(t,w.BRACKET_L,i,i+1);case 93:return Tt(t,w.BRACKET_R,i,i+1);case 123:return Tt(t,w.BRACE_L,i,i+1);case 124:return Tt(t,w.PIPE,i,i+1);case 125:return Tt(t,w.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?yL(t,i):pL(t,i)}if(fi(o)||o===45)return hL(t,i,o);if(Rb(o))return gL(t,i);throw Zt(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:fr(o)||sa(n,i)?`Unexpected character: ${En(t,i)}.`:`Invalid character: ${En(t,i)}.`)}return Tt(t,w.EOF,r,r)}function uL(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(fr(o))++i;else if(sa(n,i))i+=2;else break}return Tt(t,w.COMMENT,e,i,n.slice(e+1,i))}function hL(t,e,n){let r=t.source.body,i=e,o=n,s=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),fi(o))throw Zt(t.source,i,`Invalid number, unexpected digit after 0: ${En(t,i)}.`)}else i=Gc(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Gc(t,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(s=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=Gc(t,i,o),o=r.charCodeAt(i)),o===46||Rb(o))throw Zt(t.source,i,`Invalid number, expected digit but got: ${En(t,i)}.`);return Tt(t,s?w.FLOAT:w.INT,e,i,r.slice(e,i))}function Gc(t,e,n){if(!fi(n))throw Zt(t.source,e,`Invalid number, expected digit but got: ${En(t,e)}.`);let r=t.source.body,i=e+1;for(;fi(r.charCodeAt(i));)++i;return i}function pL(t,e){let n=t.source.body,r=n.length,i=e+1,o=i,s="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return s+=n.slice(o,i),Tt(t,w.STRING,e,i+1,s);if(a===92){s+=n.slice(o,i);let c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?dL(t,i):fL(t,i):mL(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(fr(a))++i;else if(sa(n,i))i+=2;else throw Zt(t.source,i,`Invalid character within String: ${En(t,i)}.`)}throw Zt(t.source,i,"Unterminated string.")}function dL(t,e){let n=t.source.body,r=0,i=3;for(;i<12;){let o=n.charCodeAt(e+i++);if(o===125){if(i<5||!fr(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|si(o),r<0)break}throw Zt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function fL(t,e){let n=t.source.body,r=eg(n,e+2);if(fr(r))return{value:String.fromCodePoint(r),size:6};if(Cb(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=eg(n,e+8);if(Zb(i))return{value:String.fromCodePoint(r,i),size:12}}throw Zt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function eg(t,e){return si(t.charCodeAt(e))<<12|si(t.charCodeAt(e+1))<<8|si(t.charCodeAt(e+2))<<4|si(t.charCodeAt(e+3))}function si(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function mL(t,e){let n=t.source.body;switch(n.charCodeAt(e+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:`
|
|
6
6
|
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Zt(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function yL(t,e){let n=t.source.body,r=n.length,i=t.lineStart,o=e+3,s=o,a="",c=[];for(;o<r;){let l=n.charCodeAt(o);if(l===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){a+=n.slice(s,o),c.push(a);let u=Tt(t,w.BLOCK_STRING,e,o+3,iL(c).join(`
|
|
7
|
-
`));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(fr(l))++o;else if(sa(n,o))o+=2;else throw Zt(t.source,o,`Invalid character within String: ${En(t,o)}.`)}throw Zt(t.source,o,"Unterminated string.")}function gL(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(rL(o))++i;else break}return Tt(t,w.NAME,e,i,n.slice(e,i))}function sh(t){return aa(t,[])}function aa(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return vL(t,e);default:return String(t)}}function vL(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(SL(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:aa(r,n)}else if(Array.isArray(t))return IL(t,n);return wL(t,n)}function SL(t){return typeof t.toJSON=="function"}function wL(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>
|
|
7
|
+
`));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(fr(l))++o;else if(sa(n,o))o+=2;else throw Zt(t.source,o,`Invalid character within String: ${En(t,o)}.`)}throw Zt(t.source,o,"Unterminated string.")}function gL(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(rL(o))++i;else break}return Tt(t,w.NAME,e,i,n.slice(e,i))}function sh(t){return aa(t,[])}function aa(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return vL(t,e);default:return String(t)}}function vL(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(SL(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:aa(r,n)}else if(Array.isArray(t))return IL(t,n);return wL(t,n)}function SL(t){return typeof t.toJSON=="function"}function wL(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>kb?"["+TL(t)+"]":"{ "+n.map(([r,i])=>r+": "+aa(i,e)).join(", ")+" }"}function IL(t,e){if(t.length===0)return"[]";if(e.length>kb)return"[Array]";let n=Math.min(bL,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(aa(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function TL(t){let e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){let n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}function RL(t){return EL(t,Vb)}function xb(t,e){return new CL(t,e).parseDocument()}function ts(t){let e=t.value;return Nb(t.kind)+(e!=null?` "${e}"`:"")}function Nb(t){return lL(t)?`"${t}"`:t}function ZL(t){return`"${t.replace(kL,VL)}"`}function VL(t){return xL[t.charCodeAt(0)]}function OL(t,e,n=Tb){let r=new Map;for(let v of Object.values(A))r.set(v,GL(e,v));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let v=a===s.length,I=v&&c.length!==0;if(v){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),I)if(o){l=l.slice();let E=0;for(let[T,V]of c){let N=T-E;V===null?(l.splice(N,1),E++):l[N]=V}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[E,T]of c)l[E]=T}a=i.index,s=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(h){if(u=o?a:s[a],l=h[u],l==null)continue;p.push(u)}let R;if(!Array.isArray(l)){var m,d;tg(l)||Ts(!1,`Invalid AST Node: ${sh(l)}.`);let E=v?(m=r.get(l.kind))===null||m===void 0?void 0:m.leave:(d=r.get(l.kind))===null||d===void 0?void 0:d.enter;if(R=E==null?void 0:E.call(e,l,u,h,p,f),R===NL)break;if(R===!1){if(!v){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!v))if(tg(R))l=R;else{p.pop();continue}}if(R===void 0&&I&&c.push([u,l]),v)p.pop();else{var b;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(b=n[l.kind])!==null&&b!==void 0?b:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function GL(t,e){let n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function Ob(t){return OL(t,XL)}function W(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function le(t){return Q(`{
|
|
8
8
|
`,Es(W(t,`
|
|
9
9
|
`)),`
|
|
10
10
|
}`)}function Q(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function Es(t){return Q(" ",t.replace(/\n/g,`
|
|
11
|
-
`))}function
|
|
12
|
-
`)))!==null&&e!==void 0?e:!1}function
|
|
11
|
+
`))}function ng(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
|
|
12
|
+
`)))!==null&&e!==void 0?e:!1}function Lb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Wb(t){return t.replace(/[\s,]+/g," ").trim()}function jL(t){return Wb(t.source.body.substring(t.start,t.end))}function QL(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=jL(r.loc),s=su.get(i);s&&!s.has(o)?Xb&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
13
13
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
14
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||su.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),Us(Us({},t),{definitions:n})}function $L(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function qL(t){var e=Ub(t);if(!Zs.has(e)){var n=Nb(t,{experimentalFragmentVariables:Ms,allowLegacyFragmentVariables:Ms});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Zs.set(e,$L(QL(n)))}return Zs.get(e)}function Ft(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),qL(r)}function tX(){Zs.clear(),su.clear()}function eX(){Wb=!1}function nX(){Ms=!0}function rX(){Ms=!1}function dX(t,e=pX){return{PushPayload(n,r){return e(i=>t.request(Pb,n,$($({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(iX,n,$($({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(oX,n,$($({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(sX,n,$($({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(aX,n,$($({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(lX,n,$($({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(cX,n,$($({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(uX,n,$($({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(hX,n,$($({},r),i)),"GetSamplingConfig","query",n)}}}function fX(){var t=document.createElement("canvas");return t.getContext&&t.getContext("2d")?t.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function mX(){return fX()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}function es(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function au(t,e){function n(i,o,s){if(typeof document<"u"){s=es({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",es({},o,{expires:-1}))},withAttributes:function(i){return au(this.converter,es({},this.attributes,i))},withConverter:function(i){return au(es({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}function Yb(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Kb(t){return t.kind==="multi"}function AX(t){return Kb(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Yb(t[e].key)}`).join(":"):t.key}function JX(t){return Kb(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:Yb(t[e].key)})).reduce((e,n)=>$($({},e),n),{}):t.key}function _b(t,e){return KX(t)}function YX(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}function uh(t){if(ns[t])return ns[t];let e=globalThis[t],n=e.prototype,r=t in fg?fg[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in mg?mg[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!oW())return ns[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?ns[t]=l:n}catch(a){return n}}function Qe(t,e,n){var r;let i=`${t}.${String(n)}`;if(Mc[i])return Mc[i].call(e);let o=uh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Mc[i]=s,s.call(e)):e[n]}function Bb(t,e,n){let r=`${t}.${String(n)}`;if(Pc[r])return Pc[r].bind(e);let i=uh(t)[n];return typeof i!="function"?e[n]:(Pc[r]=i,i.bind(e))}function sW(t){return Qe("Node",t,"childNodes")}function aW(t){return Qe("Node",t,"parentNode")}function lW(t){return Qe("Node",t,"parentElement")}function cW(t){return Qe("Node",t,"textContent")}function uW(t,e){return Bb("Node",t,"contains")(e)}function hW(t){return Bb("Node",t,"getRootNode")()}function pW(t){return!t||!("host"in t)?null:Qe("ShadowRoot",t,"host")}function dW(t){return t.styleSheets}function fW(t){return!t||!("shadowRoot"in t)?null:Qe("Element",t,"shadowRoot")}function mW(t,e){return Qe("Element",t,"querySelector")(e)}function yW(t,e){return Qe("Element",t,"querySelectorAll")(e)}function gW(){return uh("MutationObserver").constructor}function bW(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function jb(t){return t.nodeType===t.ELEMENT_NODE}function ci(t){let e=t&&"host"in t&&"mode"in t&&xt.host(t)||null;return!!(e&&"shadowRoot"in e&&xt.shadowRoot(e)===t)}function ui(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function vW(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function SW(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function mu(t){try{let e=t.rules||t.cssRules;if(!e)return null;let n=t.href;!n&&t.ownerNode&&t.ownerNode.ownerDocument&&(n=t.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>Qb(i,n)).join("");return vW(r)}catch(e){return null}}function Qb(t,e){if(IW(t)){let n;try{n=mu(t.styleSheet)||SW(t)}catch(r){n=t.cssText}return t.styleSheet.href?Ks(n,t.styleSheet.href):n}else{let n=t.cssText;return TW(t)&&t.selectorText.includes(":")&&(n=wW(n)),e?Ks(n,e):n}}function wW(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function IW(t){return"styleSheet"in t}function TW(t){return"selectorText"in t}function EW(){return new Js}function Ds({element:t,maskInputOptions:e,tagName:n,type:r,value:i,overwriteRecord:o,maskInputFn:s}){let a=i||"";return tv({maskInputOptions:e,tagName:n,type:r,overwriteRecord:o})&&(s?a=s(a,t):a="*".repeat(a.length)),a}function sr(t){return t.toLowerCase()}function RW(t){let e=t.getContext("2d");if(!e)return!0;let n=50;for(let r=0;r<t.width;r+=n)for(let i=0;i<t.height;i+=n){let o=e.getImageData,s=yg in o?o[yg]:o;if(new Uint32Array(s.call(e,r,i,Math.min(n,t.width-r),Math.min(n,t.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Ys(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?sr(e):null}function $b(t,e){var n;let r;try{r=new URL(t,window.location.href)}catch(s){return null}let i=/\.([0-9a-z]+)(?:$)/i,o=r.pathname.match(i);return(n=o==null?void 0:o[1])!=null?n:null}function CW(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}function Ks(t,e){return(t||"").replace(ZW,(n,r,i,o,s,a)=>{let c=i||s||a,l=r||o||"";if(!c)return n;if(kW.test(c)||VW.test(c))return`url(${l}${c}${l})`;if(xW.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${CW(e)+c}${l})`;let u=e.split("/"),h=c.split("/");u.pop();for(let p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${l}${u.join("/")}${l})`})}function rs(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function NW(t,e,n=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&t&&typeof t=="string"){let s=rs(t,n),a=s.length/t.length;for(let c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent=="string"){let l=rs(r[c].textContent,n),u=100,h=3;for(;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,h),1)!==-1);h++);for(;h<l.length;h++){let p=l.substring(0,h),f=s.split(p),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&r[c-1].textContent!=="")m=s.indexOf(p,1);else if(f.length===1){if(p=p.substring(0,p.length-1),f=s.split(p),f.length<=1)return i.push(t),i;h=u+1}else h===l.length-1&&(m=s.indexOf(p));if(f.length>=2&&h>u){let d=r[c-1].textContent;if(d&&typeof d=="string"){let b=rs(d).length;m=s.indexOf(p,b)}m===-1&&(m=f[0].length)}if(m!==-1){let d=Math.floor(m/a);for(;d>0&&d<t.length;){if(o+=1,o>50*r.length)return i.push(t),i;let b=rs(t.substring(0,d),n);if(b.length===m){i.push(t.substring(0,d)),t=t.substring(d),s=s.substring(m);break}else b.length<m?d+=Math.max(1,Math.floor((m-b.length)/a)):d-=Math.max(1,Math.floor((b.length-m)*a))}break}}}}return i.push(t),i}function OW(t,e){return NW(t,e).join("/* rr_split */")}function hh(t){return t=t.replace(/[^ -~]+/g,""),t=(t==null?void 0:t.split(" ").map(e=>Math.random().toString(20).substring(2,e.length)).join(" "))||"",t}function yu(t){return t==="img"||t==="video"||t==="audio"||t==="source"}function qb(t){return t?FW.some(e=>e.test(t)):!1}function ev(){return AW++}function DW(t){if(t instanceof HTMLFormElement)return"form";let e=sr(t.tagName);return JW.test(e)?"div":e}function _W(t,e){if(e.trim()==="")return e;let n=0;function r(o){let s,a=o.exec(e.substring(n));return a?(s=a[0],n+=s.length,s):""}let i=[];for(;r(KW),!(n>=e.length);){let o=r(YW);if(o.slice(-1)===",")o=_s(t,o.substring(0,o.length-1)),i.push(o);else{let s="";o=_s(t,o);let a=!1;for(;;){let c=e.charAt(n);if(c===""){i.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return i.join(", ")}function _s(t,e){return!e||e.trim()===""?e:ph(t,e)}function HW(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function ph(t,e){let n=bg.get(t);if(n||(n=t.createElement("a"),bg.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function nv(t,e,n,r){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(e==="table"||e==="td"||e==="th")?_s(t,r):n==="srcset"?_W(t,r):n==="style"?Ks(r,ph(t)):e==="object"&&n==="data"?_s(t,r):r)}function rv(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function vg(t,e,n){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}if(n)return t.matches(n)}catch(r){}return!1}function Hs(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?Hs(xt.parentNode(t),e,n):!1;for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}return n?Hs(xt.parentNode(t),e,n):!1}function iv(t,e,n,r){let i;if(jb(t)){if(i=t,!xt.childNodes(i).length)return!1}else{if(xt.parentElement(t)===null)return!1;i=xt.parentElement(t)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Hs(i,e,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch(o){}return!1}function zW(t,e,n){let r=t.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){let a=setTimeout(()=>{i||(e(),i=!0)},n);t.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}let s="about:blank";if(r.location.href!==s||t.src===s||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function BW(t,e,n){let r=!1,i;try{i=t.sheet}catch(s){return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function jW(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:s,inlineStylesheet:a,maskInputOptions:c={},maskTextClass:l,maskTextFn:u,maskInputFn:h,dataURLOptions:p={},inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:b,newlyAddedElement:v=!1,cssCaptured:I=!1,privacySetting:R}=e,E=QW(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Et.Document,childNodes:[],compatMode:t.compatMode}:{type:Et.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Et.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:E};case t.ELEMENT_NODE:return qW(t,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,maskTextClass:l,dataURLOptions:p,inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:b,newlyAddedElement:v,privacySetting:R,rootId:E});case t.TEXT_NODE:return $W(t,{doc:n,needsMask:s,maskTextFn:u,privacySetting:R,rootId:E,cssCaptured:I});case t.CDATA_SECTION_NODE:return{type:Et.CDATA,textContent:"",rootId:E};case t.COMMENT_NODE:return{type:Et.Comment,textContent:xt.textContent(t)||"",rootId:E};default:return!1}}function QW(t,e){if(!e.hasNode(t))return;let n=e.getId(t);return n===1?void 0:n}function $W(t,e){var n;let{needsMask:r,maskTextFn:i,privacySetting:o,rootId:s,cssCaptured:a}=e,c=xt.parentNode(t),l=c&&c.tagName,u="",h=l==="STYLE"?!0:void 0,p=l==="SCRIPT"?!0:void 0;p?u="SCRIPT_PLACEHOLDER":a||(u=xt.textContent(t),h&&u&&(u=Ks(u,ph(e.doc)))),!h&&!p&&u&&r&&(u=i?i(u,xt.parentElement(t)):u.replace(/[\S]/g,"*"));let f=o==="strict",m=(n=t.parentElement)==null?void 0:n.getAttribute("data-hl-record"),d=o==="default"&&qb(u);return(f||d)&&!m&&l&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(l)&&u&&(u=hh(u)),{type:Et.Text,textContent:u||"",rootId:s}}function qW(t,e){let{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:s={},maskInputFn:a,maskTextClass:c,dataURLOptions:l={},inlineImages:u,inlineVideos:h,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m=!1,privacySetting:d,rootId:b}=e,v=vg(t,r,i),I=vg(t,c,null),R=d==="strict",E=DW(t),T={},V=t.attributes.length;for(let C=0;C<V;C++){let x=t.attributes[C];rv(E,x.name)||(T[x.name]=nv(n,E,sr(x.name),x.value))}if(E==="link"&&o){let C=Array.from(n.styleSheets).find(M=>M.href===t.href),x=null;C&&(x=mu(C)),x&&(delete T.rel,delete T.href,T.Ro=x)}if(E==="style"&&t.sheet){let C=mu(t.sheet);C&&(t.childNodes.length>1&&(C=OW(C,t)),T.Ro=C)}if(E==="input"||E==="textarea"||E==="select"){let C=t.value,x=t.checked;T.type!=="radio"&&T.type!=="checkbox"&&T.type!=="submit"&&T.type!=="button"&&C?T.value=Ds({element:t,type:Ys(t),tagName:E,value:C,overwriteRecord:t.getAttribute("data-hl-record"),maskInputOptions:s,maskInputFn:a}):x&&(T.checked=x)}if(E==="option"&&(t.selected&&!s.select?T.selected=!0:delete T.selected),E==="dialog"&&t.open&&(T.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(t.__context==="2d")RW(t);else if(!("__context"in t)){let C=t.toDataURL(l.type,l.quality),x=n.createElement("canvas");x.width=t.width,x.height=t.height;let M=x.toDataURL(l.type,l.quality);C!==M&&(T.rr_dataURL=C)}}if(E==="img"&&u&&!v&&!I&&!R){Qn||(Qn=n.createElement("canvas"),gg=Qn.getContext("2d"));let C=t,x=C.currentSrc||C.getAttribute("src")||"<unknown-src>",M=C.crossOrigin,ot=()=>{C.removeEventListener("load",ot);try{Qn.width=C.naturalWidth,Qn.height=C.naturalHeight,gg.drawImage(C,0,0),T.rr_dataURL=Qn.toDataURL(l.type,l.quality)}catch(lt){if(C.crossOrigin!=="anonymous"){C.crossOrigin="anonymous",C.complete&&C.naturalWidth!==0?ot():C.addEventListener("load",ot);return}else console.warn(`Cannot inline img src=${x}! Error: ${lt}`)}C.crossOrigin==="anonymous"&&(M?T.crossOrigin=M:C.removeAttribute("crossorigin"))};C.complete&&C.naturalWidth!==0?ot():C.addEventListener("load",ot)}if(E==="audio"||E==="video"){let C=T;C.rr_mediaState=t.paused?"paused":"played",C.rr_mediaCurrentTime=t.currentTime,C.rr_mediaPlaybackRate=t.playbackRate,C.rr_mediaMuted=t.muted,C.rr_mediaLoop=t.loop,C.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(T.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(T.rr_scrollTop=t.scrollTop)),v||I||R&&yu(E)){let{width:C,height:x}=t.getBoundingClientRect();T={class:T.class,rr_width:`${C}px`,rr_height:`${x}px`}}R&&yu(E)&&(v=!0),E==="iframe"&&!f(T.src)&&(t.contentDocument||(T.rr_src=T.src),delete T.src);let N;try{customElements.get(E)&&(N=!0)}catch(C){}let U=C=>{let{width:x,height:M}=C.getBoundingClientRect();T={width:x,height:M,rr_width:`${x}px`,rr_height:`${M}px`,rr_inlined_video:!0,class:T.class,style:T.style},E="canvas";let ot=n.createElement("canvas");ot.width=t.width,ot.height=t.height,T.rr_dataURL=ot.toDataURL(l.type,l.quality)};if(E==="video"){let C=t;u&&(C.src===""||C.src.indexOf("blob:")!==-1)&&U(C),h&&C.src!==""&&C.src.indexOf("blob:")===-1&&U(C)}return{type:Et.Element,tagName:E,attributes:T,childNodes:[],isSVG:HW(t)||void 0,needBlock:v,needMask:I,rootId:b,isCustom:N}}function ft(t){return t==null?"":t.toLowerCase()}function t2(t,e){return!!(e.comment&&t.type===Et.Comment||t.type===Et.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&$b(t.attributes.href)==="js")||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(ft(t.attributes.name).match(/^msapplication-tile(image|color)$/)||ft(t.attributes.name)==="application-name"||ft(t.attributes.rel)==="icon"||ft(t.attributes.rel)==="apple-touch-icon"||ft(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&ft(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(ft(t.attributes.property).match(/^(og|twitter|fb):/)||ft(t.attributes.name).match(/^(og|twitter):/)||ft(t.attributes.name)==="pinterest")||e.headMetaRobots&&(ft(t.attributes.name)==="robots"||ft(t.attributes.name)==="googlebot"||ft(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(ft(t.attributes.name)==="author"||ft(t.attributes.name)==="generator"||ft(t.attributes.name)==="framework"||ft(t.attributes.name)==="publisher"||ft(t.attributes.name)==="progid"||ft(t.attributes.property).match(/^article:/)||ft(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(ft(t.attributes.name)==="google-site-verification"||ft(t.attributes.name)==="yandex-verification"||ft(t.attributes.name)==="csrf-token"||ft(t.attributes.name)==="p:domain_verify"||ft(t.attributes.name)==="verify-v1"||ft(t.attributes.name)==="verification"||ft(t.attributes.name)==="shopify-checkout-api-token"))))}function er(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:c=!1,inlineStylesheet:l=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m={},inlineImages:d=!1,inlineVideos:b=!1,recordCanvas:v=!1,onSerialize:I,onIframeLoad:R,iframeLoadTimeout:E=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:V=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:U=!1,cssCaptured:C=!1,privacySetting:x}=e,{needsMask:M}=e,{preserveWhiteSpace:ot=!0}=e;M||(M=iv(t,s,a,M===void 0));let lt=jW(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,inlineStylesheet:l,maskInputOptions:u,maskTextClass:s,maskTextFn:h,maskInputFn:p,dataURLOptions:m,inlineImages:d,inlineVideos:b,recordCanvas:v,keepIframeSrcFn:N,newlyAddedElement:U,cssCaptured:C,privacySetting:x});if(!lt)return console.warn(t,"not serialized"),null;let y;r.hasNode(t)?y=r.getId(t):t2(lt,f)||!ot&<.type===Et.Text&&!lt.textContent.replace(/^\s+|\s+$/gm,"").length?y=mi:y=ev();let g=Object.assign(lt,{id:y});if(r.add(t,g),y===mi)return null;I&&I(t);let Z=!c,D=x,P=x==="strict";if(g.type===Et.Element){if(Z=Z&&!g.needBlock,P||(P=!!g.needBlock||!!g.needMask),D=P?"strict":D,P&&yu(g.tagName)){let ct=t.cloneNode();ct.src="",r.add(ct,g)}delete g.needBlock,delete g.needMask;let it=xt.shadowRoot(t);it&&ui(it)&&(g.isShadowHost=!0)}if((g.type===Et.Document||g.type===Et.Element)&&Z){f.headWhitespace&&g.type===Et.Element&&g.tagName==="head"&&(ot=!1);let it={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:b,recordCanvas:v,preserveWhiteSpace:ot,onSerialize:I,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:N,cssCaptured:!1,privacySetting:D};if(!(g.type===Et.Element&&g.tagName==="textarea"&&g.attributes.value!==void 0)){g.type===Et.Element&&g.attributes.Ro!==void 0&&typeof g.attributes.Ro=="string"&&(it.cssCaptured=!0);for(let Ot of Array.from(xt.childNodes(t))){let We=er(Ot,it);We&&g.childNodes.push(We)}}let ct=null;if(jb(t)&&(ct=xt.shadowRoot(t)))for(let Ot of Array.from(xt.childNodes(ct))){let We=er(Ot,it);We&&(ui(ct)&&(We.isShadow=!0),g.childNodes.push(We))}}let O=xt.parentNode(t);return O&&ci(O)&&ui(O)&&(g.isShadow=!0),g.type===Et.Element&&g.tagName==="iframe"&&zW(t,()=>{let it=t.contentDocument;if(it&&R){let ct=er(it,{doc:it,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:b,recordCanvas:v,preserveWhiteSpace:ot,onSerialize:I,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:N,privacySetting:x});ct&&R(t,ct)}},E),g.type===Et.Element&&g.tagName==="link"&&typeof g.attributes.rel=="string"&&(g.attributes.rel==="stylesheet"||g.attributes.rel==="preload"&&typeof g.attributes.href=="string"&&$b(g.attributes.href)==="css")&&BW(t,()=>{if(T){let it=er(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:b,recordCanvas:v,preserveWhiteSpace:ot,onSerialize:I,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:N,privacySetting:x});it&&T(t,it)}},V),g}function e2(t,e){let{mirror:n=new Js,blockClass:r="highlight-block",blockSelector:i=null,maskTextClass:o="highlight-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:c=!1,inlineVideos:l=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:p,maskInputFn:f,slimDOM:m=!1,dataURLOptions:d,preserveWhiteSpace:b,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:V=()=>!1,privacySetting:N="default"}=e||{};return er(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,maskTextFn:p,maskInputFn:f,slimDOMOptions:m||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m||{},dataURLOptions:d,inlineImages:c,inlineVideos:l,recordCanvas:u,preserveWhiteSpace:b,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:V,newlyAddedElement:!1,privacySetting:N})}function n2(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function s2(t){return t[0].toUpperCase()+t.slice(1)}function vu(t,e){new a2(e).stringify(t)}function Su(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>Su(s,n)):(o==="object"&&i!==null&&(i=Su(i)),n[r]=i)}return n}function $r(t,e){if(e&&typeof e.offset<"u")return e.offset;let n=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&n===e.column){i=o;break}t[o]===`
|
|
15
|
-
`?(n=1,r+=1):n+=1}return i}function
|
|
14
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||su.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),Us(Us({},t),{definitions:n})}function $L(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function qL(t){var e=Wb(t);if(!Zs.has(e)){var n=xb(t,{experimentalFragmentVariables:Ms,allowLegacyFragmentVariables:Ms});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Zs.set(e,$L(QL(n)))}return Zs.get(e)}function Ft(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),qL(r)}function tX(){Zs.clear(),su.clear()}function eX(){Xb=!1}function nX(){Ms=!0}function rX(){Ms=!1}function dX(t,e=pX){return{PushPayload(n,r){return e(i=>t.request(Mb,n,$($({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(iX,n,$($({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(oX,n,$($({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(sX,n,$($({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(aX,n,$($({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(lX,n,$($({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(cX,n,$($({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(uX,n,$($({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(hX,n,$($({},r),i)),"GetSamplingConfig","query",n)}}}function fX(){var t=document.createElement("canvas");return t.getContext&&t.getContext("2d")?t.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function mX(){return fX()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}function es(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function au(t,e){function n(i,o,s){if(typeof document<"u"){s=es({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",es({},o,{expires:-1}))},withAttributes:function(i){return au(this.converter,es({},this.attributes,i))},withConverter:function(i){return au(es({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}function Db(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Yb(t){return t.kind==="multi"}function AX(t){return Yb(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Db(t[e].key)}`).join(":"):t.key}function JX(t){return Yb(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:Db(t[e].key)})).reduce((e,n)=>$($({},e),n),{}):t.key}function Kb(t,e){return KX(t)}function YX(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}function uh(t){if(ns[t])return ns[t];let e=globalThis[t],n=e.prototype,r=t in dg?dg[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in fg?fg[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!oW())return ns[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?ns[t]=l:n}catch(a){return n}}function Qe(t,e,n){var r;let i=`${t}.${String(n)}`;if(Mc[i])return Mc[i].call(e);let o=uh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Mc[i]=s,s.call(e)):e[n]}function zb(t,e,n){let r=`${t}.${String(n)}`;if(Pc[r])return Pc[r].bind(e);let i=uh(t)[n];return typeof i!="function"?e[n]:(Pc[r]=i,i.bind(e))}function sW(t){return Qe("Node",t,"childNodes")}function aW(t){return Qe("Node",t,"parentNode")}function lW(t){return Qe("Node",t,"parentElement")}function cW(t){return Qe("Node",t,"textContent")}function uW(t,e){return zb("Node",t,"contains")(e)}function hW(t){return zb("Node",t,"getRootNode")()}function pW(t){return!t||!("host"in t)?null:Qe("ShadowRoot",t,"host")}function dW(t){return t.styleSheets}function fW(t){return!t||!("shadowRoot"in t)?null:Qe("Element",t,"shadowRoot")}function mW(t,e){return Qe("Element",t,"querySelector")(e)}function yW(t,e){return Qe("Element",t,"querySelectorAll")(e)}function gW(){return uh("MutationObserver").constructor}function bW(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function Bb(t){return t.nodeType===t.ELEMENT_NODE}function ci(t){let e=t&&"host"in t&&"mode"in t&&xt.host(t)||null;return!!(e&&"shadowRoot"in e&&xt.shadowRoot(e)===t)}function ui(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function vW(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function SW(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function mu(t){try{let e=t.rules||t.cssRules;if(!e)return null;let n=t.href;!n&&t.ownerNode&&t.ownerNode.ownerDocument&&(n=t.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>jb(i,n)).join("");return vW(r)}catch(e){return null}}function jb(t,e){if(IW(t)){let n;try{n=mu(t.styleSheet)||SW(t)}catch(r){n=t.cssText}return t.styleSheet.href?Ks(n,t.styleSheet.href):n}else{let n=t.cssText;return TW(t)&&t.selectorText.includes(":")&&(n=wW(n)),e?Ks(n,e):n}}function wW(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function IW(t){return"styleSheet"in t}function TW(t){return"selectorText"in t}function EW(){return new Js}function Ds({element:t,maskInputOptions:e,tagName:n,type:r,value:i,overwriteRecord:o,maskInputFn:s}){let a=i||"";return qb({maskInputOptions:e,tagName:n,type:r,overwriteRecord:o})&&(s?a=s(a,t):a="*".repeat(a.length)),a}function sr(t){return t.toLowerCase()}function RW(t){let e=t.getContext("2d");if(!e)return!0;let n=50;for(let r=0;r<t.width;r+=n)for(let i=0;i<t.height;i+=n){let o=e.getImageData,s=mg in o?o[mg]:o;if(new Uint32Array(s.call(e,r,i,Math.min(n,t.width-r),Math.min(n,t.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Ys(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?sr(e):null}function Qb(t,e){var n;let r;try{r=new URL(t,window.location.href)}catch(s){return null}let i=/\.([0-9a-z]+)(?:$)/i,o=r.pathname.match(i);return(n=o==null?void 0:o[1])!=null?n:null}function CW(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}function Ks(t,e){return(t||"").replace(ZW,(n,r,i,o,s,a)=>{let c=i||s||a,l=r||o||"";if(!c)return n;if(kW.test(c)||VW.test(c))return`url(${l}${c}${l})`;if(xW.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${CW(e)+c}${l})`;let u=e.split("/"),h=c.split("/");u.pop();for(let p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${l}${u.join("/")}${l})`})}function rs(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function NW(t,e,n=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&t&&typeof t=="string"){let s=rs(t,n),a=s.length/t.length;for(let c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent=="string"){let l=rs(r[c].textContent,n),u=100,h=3;for(;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,h),1)!==-1);h++);for(;h<l.length;h++){let p=l.substring(0,h),f=s.split(p),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&r[c-1].textContent!=="")m=s.indexOf(p,1);else if(f.length===1){if(p=p.substring(0,p.length-1),f=s.split(p),f.length<=1)return i.push(t),i;h=u+1}else h===l.length-1&&(m=s.indexOf(p));if(f.length>=2&&h>u){let d=r[c-1].textContent;if(d&&typeof d=="string"){let b=rs(d).length;m=s.indexOf(p,b)}m===-1&&(m=f[0].length)}if(m!==-1){let d=Math.floor(m/a);for(;d>0&&d<t.length;){if(o+=1,o>50*r.length)return i.push(t),i;let b=rs(t.substring(0,d),n);if(b.length===m){i.push(t.substring(0,d)),t=t.substring(d),s=s.substring(m);break}else b.length<m?d+=Math.max(1,Math.floor((m-b.length)/a)):d-=Math.max(1,Math.floor((b.length-m)*a))}break}}}}return i.push(t),i}function OW(t,e){return NW(t,e).join("/* rr_split */")}function hh(t){return t=t.replace(/[^ -~]+/g,""),t=(t==null?void 0:t.split(" ").map(e=>Math.random().toString(20).substring(2,e.length)).join(" "))||"",t}function yu(t){return t==="img"||t==="video"||t==="audio"||t==="source"}function $b(t){return t?FW.some(e=>e.test(t)):!1}function tv(){return AW++}function DW(t){if(t instanceof HTMLFormElement)return"form";let e=sr(t.tagName);return JW.test(e)?"div":e}function _W(t,e){if(e.trim()==="")return e;let n=0;function r(o){let s,a=o.exec(e.substring(n));return a?(s=a[0],n+=s.length,s):""}let i=[];for(;r(KW),!(n>=e.length);){let o=r(YW);if(o.slice(-1)===",")o=_s(t,o.substring(0,o.length-1)),i.push(o);else{let s="";o=_s(t,o);let a=!1;for(;;){let c=e.charAt(n);if(c===""){i.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return i.join(", ")}function _s(t,e){return!e||e.trim()===""?e:ph(t,e)}function HW(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function ph(t,e){let n=gg.get(t);if(n||(n=t.createElement("a"),gg.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function ev(t,e,n,r){return r&&(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(e==="table"||e==="td"||e==="th")?_s(t,r):n==="srcset"?_W(t,r):n==="style"?Ks(r,ph(t)):e==="object"&&n==="data"?_s(t,r):r)}function nv(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function bg(t,e,n){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}if(n)return t.matches(n)}catch(r){}return!1}function Hs(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?Hs(xt.parentNode(t),e,n):!1;for(let r=t.classList.length;r--;){let i=t.classList[r];if(e.test(i))return!0}return n?Hs(xt.parentNode(t),e,n):!1}function rv(t,e,n,r){let i;if(Bb(t)){if(i=t,!xt.childNodes(i).length)return!1}else{if(xt.parentElement(t)===null)return!1;i=xt.parentElement(t)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Hs(i,e,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch(o){}return!1}function zW(t,e,n){let r=t.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){let a=setTimeout(()=>{i||(e(),i=!0)},n);t.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}let s="about:blank";if(r.location.href!==s||t.src===s||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function BW(t,e,n){let r=!1,i;try{i=t.sheet}catch(s){return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function jW(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:s,inlineStylesheet:a,maskInputOptions:c={},maskTextClass:l,maskTextFn:u,maskInputFn:h,dataURLOptions:p={},inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:b,newlyAddedElement:v=!1,cssCaptured:I=!1,privacySetting:R}=e,E=QW(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Et.Document,childNodes:[],compatMode:t.compatMode}:{type:Et.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Et.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:E};case t.ELEMENT_NODE:return qW(t,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,maskTextClass:l,dataURLOptions:p,inlineImages:f,inlineVideos:m,recordCanvas:d,keepIframeSrcFn:b,newlyAddedElement:v,privacySetting:R,rootId:E});case t.TEXT_NODE:return $W(t,{doc:n,needsMask:s,maskTextFn:u,privacySetting:R,rootId:E,cssCaptured:I});case t.CDATA_SECTION_NODE:return{type:Et.CDATA,textContent:"",rootId:E};case t.COMMENT_NODE:return{type:Et.Comment,textContent:xt.textContent(t)||"",rootId:E};default:return!1}}function QW(t,e){if(!e.hasNode(t))return;let n=e.getId(t);return n===1?void 0:n}function $W(t,e){var n;let{needsMask:r,maskTextFn:i,privacySetting:o,rootId:s,cssCaptured:a}=e,c=xt.parentNode(t),l=c&&c.tagName,u="",h=l==="STYLE"?!0:void 0,p=l==="SCRIPT"?!0:void 0;p?u="SCRIPT_PLACEHOLDER":a||(u=xt.textContent(t),h&&u&&(u=Ks(u,ph(e.doc)))),!h&&!p&&u&&r&&(u=i?i(u,xt.parentElement(t)):u.replace(/[\S]/g,"*"));let f=o==="strict",m=(n=t.parentElement)==null?void 0:n.getAttribute("data-hl-record"),d=o==="default"&&$b(u);return(f||d)&&!m&&l&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(l)&&u&&(u=hh(u)),{type:Et.Text,textContent:u||"",rootId:s}}function qW(t,e){let{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:s={},maskInputFn:a,maskTextClass:c,dataURLOptions:l={},inlineImages:u,inlineVideos:h,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m=!1,privacySetting:d,rootId:b}=e,v=bg(t,r,i),I=bg(t,c,null),R=d==="strict",E=DW(t),T={},V=t.attributes.length;for(let C=0;C<V;C++){let x=t.attributes[C];nv(E,x.name)||(T[x.name]=ev(n,E,sr(x.name),x.value))}if(E==="link"&&o){let C=Array.from(n.styleSheets).find(M=>M.href===t.href),x=null;C&&(x=mu(C)),x&&(delete T.rel,delete T.href,T.Ro=x)}if(E==="style"&&t.sheet){let C=mu(t.sheet);C&&(t.childNodes.length>1&&(C=OW(C,t)),T.Ro=C)}if(E==="input"||E==="textarea"||E==="select"){let C=t.value,x=t.checked;T.type!=="radio"&&T.type!=="checkbox"&&T.type!=="submit"&&T.type!=="button"&&C?T.value=Ds({element:t,type:Ys(t),tagName:E,value:C,overwriteRecord:t.getAttribute("data-hl-record"),maskInputOptions:s,maskInputFn:a}):x&&(T.checked=x)}if(E==="option"&&(t.selected&&!s.select?T.selected=!0:delete T.selected),E==="dialog"&&t.open&&(T.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(t.__context==="2d")RW(t);else if(!("__context"in t)){let C=t.toDataURL(l.type,l.quality),x=n.createElement("canvas");x.width=t.width,x.height=t.height;let M=x.toDataURL(l.type,l.quality);C!==M&&(T.rr_dataURL=C)}}if(E==="img"&&u&&!v&&!I&&!R){Qn||(Qn=n.createElement("canvas"),yg=Qn.getContext("2d"));let C=t,x=C.currentSrc||C.getAttribute("src")||"<unknown-src>",M=C.crossOrigin,ot=()=>{C.removeEventListener("load",ot);try{Qn.width=C.naturalWidth,Qn.height=C.naturalHeight,yg.drawImage(C,0,0),T.rr_dataURL=Qn.toDataURL(l.type,l.quality)}catch(lt){if(C.crossOrigin!=="anonymous"){C.crossOrigin="anonymous",C.complete&&C.naturalWidth!==0?ot():C.addEventListener("load",ot);return}else console.warn(`Cannot inline img src=${x}! Error: ${lt}`)}C.crossOrigin==="anonymous"&&(M?T.crossOrigin=M:C.removeAttribute("crossorigin"))};C.complete&&C.naturalWidth!==0?ot():C.addEventListener("load",ot)}if(E==="audio"||E==="video"){let C=T;C.rr_mediaState=t.paused?"paused":"played",C.rr_mediaCurrentTime=t.currentTime,C.rr_mediaPlaybackRate=t.playbackRate,C.rr_mediaMuted=t.muted,C.rr_mediaLoop=t.loop,C.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(T.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(T.rr_scrollTop=t.scrollTop)),v||I||R&&yu(E)){let{width:C,height:x}=t.getBoundingClientRect();T={class:T.class,rr_width:`${C}px`,rr_height:`${x}px`}}R&&yu(E)&&(v=!0),E==="iframe"&&!f(T.src)&&(t.contentDocument||(T.rr_src=T.src),delete T.src);let N;try{customElements.get(E)&&(N=!0)}catch(C){}let U=C=>{let{width:x,height:M}=C.getBoundingClientRect();T={width:x,height:M,rr_width:`${x}px`,rr_height:`${M}px`,rr_inlined_video:!0,class:T.class,style:T.style},E="canvas";let ot=n.createElement("canvas");ot.width=t.width,ot.height=t.height,T.rr_dataURL=ot.toDataURL(l.type,l.quality)};if(E==="video"){let C=t;u&&(C.src===""||C.src.indexOf("blob:")!==-1)&&U(C),h&&C.src!==""&&C.src.indexOf("blob:")===-1&&U(C)}return{type:Et.Element,tagName:E,attributes:T,childNodes:[],isSVG:HW(t)||void 0,needBlock:v,needMask:I,rootId:b,isCustom:N}}function ft(t){return t==null?"":t.toLowerCase()}function t2(t,e){return!!(e.comment&&t.type===Et.Comment||t.type===Et.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&Qb(t.attributes.href)==="js")||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(ft(t.attributes.name).match(/^msapplication-tile(image|color)$/)||ft(t.attributes.name)==="application-name"||ft(t.attributes.rel)==="icon"||ft(t.attributes.rel)==="apple-touch-icon"||ft(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&ft(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(ft(t.attributes.property).match(/^(og|twitter|fb):/)||ft(t.attributes.name).match(/^(og|twitter):/)||ft(t.attributes.name)==="pinterest")||e.headMetaRobots&&(ft(t.attributes.name)==="robots"||ft(t.attributes.name)==="googlebot"||ft(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(ft(t.attributes.name)==="author"||ft(t.attributes.name)==="generator"||ft(t.attributes.name)==="framework"||ft(t.attributes.name)==="publisher"||ft(t.attributes.name)==="progid"||ft(t.attributes.property).match(/^article:/)||ft(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(ft(t.attributes.name)==="google-site-verification"||ft(t.attributes.name)==="yandex-verification"||ft(t.attributes.name)==="csrf-token"||ft(t.attributes.name)==="p:domain_verify"||ft(t.attributes.name)==="verify-v1"||ft(t.attributes.name)==="verification"||ft(t.attributes.name)==="shopify-checkout-api-token"))))}function er(t,e){let{doc:n,mirror:r,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:c=!1,inlineStylesheet:l=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m={},inlineImages:d=!1,inlineVideos:b=!1,recordCanvas:v=!1,onSerialize:I,onIframeLoad:R,iframeLoadTimeout:E=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:V=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:U=!1,cssCaptured:C=!1,privacySetting:x}=e,{needsMask:M}=e,{preserveWhiteSpace:ot=!0}=e;M||(M=rv(t,s,a,M===void 0));let lt=jW(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,inlineStylesheet:l,maskInputOptions:u,maskTextClass:s,maskTextFn:h,maskInputFn:p,dataURLOptions:m,inlineImages:d,inlineVideos:b,recordCanvas:v,keepIframeSrcFn:N,newlyAddedElement:U,cssCaptured:C,privacySetting:x});if(!lt)return console.warn(t,"not serialized"),null;let y;r.hasNode(t)?y=r.getId(t):t2(lt,f)||!ot&<.type===Et.Text&&!lt.textContent.replace(/^\s+|\s+$/gm,"").length?y=mi:y=tv();let g=Object.assign(lt,{id:y});if(r.add(t,g),y===mi)return null;I&&I(t);let Z=!c,D=x,P=x==="strict";if(g.type===Et.Element){if(Z=Z&&!g.needBlock,P||(P=!!g.needBlock||!!g.needMask),D=P?"strict":D,P&&yu(g.tagName)){let ct=t.cloneNode();ct.src="",r.add(ct,g)}delete g.needBlock,delete g.needMask;let it=xt.shadowRoot(t);it&&ui(it)&&(g.isShadowHost=!0)}if((g.type===Et.Document||g.type===Et.Element)&&Z){f.headWhitespace&&g.type===Et.Element&&g.tagName==="head"&&(ot=!1);let it={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:b,recordCanvas:v,preserveWhiteSpace:ot,onSerialize:I,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:N,cssCaptured:!1,privacySetting:D};if(!(g.type===Et.Element&&g.tagName==="textarea"&&g.attributes.value!==void 0)){g.type===Et.Element&&g.attributes.Ro!==void 0&&typeof g.attributes.Ro=="string"&&(it.cssCaptured=!0);for(let Ot of Array.from(xt.childNodes(t))){let We=er(Ot,it);We&&g.childNodes.push(We)}}let ct=null;if(Bb(t)&&(ct=xt.shadowRoot(t)))for(let Ot of Array.from(xt.childNodes(ct))){let We=er(Ot,it);We&&(ui(ct)&&(We.isShadow=!0),g.childNodes.push(We))}}let O=xt.parentNode(t);return O&&ci(O)&&ui(O)&&(g.isShadow=!0),g.type===Et.Element&&g.tagName==="iframe"&&zW(t,()=>{let it=t.contentDocument;if(it&&R){let ct=er(it,{doc:it,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:b,recordCanvas:v,preserveWhiteSpace:ot,onSerialize:I,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:N,privacySetting:x});ct&&R(t,ct)}},E),g.type===Et.Element&&g.tagName==="link"&&typeof g.attributes.rel=="string"&&(g.attributes.rel==="stylesheet"||g.attributes.rel==="preload"&&typeof g.attributes.href=="string"&&Qb(g.attributes.href)==="css")&&BW(t,()=>{if(T){let it=er(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:d,inlineVideos:b,recordCanvas:v,preserveWhiteSpace:ot,onSerialize:I,onIframeLoad:R,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:V,keepIframeSrcFn:N,privacySetting:x});it&&T(t,it)}},V),g}function e2(t,e){let{mirror:n=new Js,blockClass:r="highlight-block",blockSelector:i=null,maskTextClass:o="highlight-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:c=!1,inlineVideos:l=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:p,maskInputFn:f,slimDOM:m=!1,dataURLOptions:d,preserveWhiteSpace:b,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:V=()=>!1,privacySetting:N="default"}=e||{};return er(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,maskTextFn:p,maskInputFn:f,slimDOMOptions:m||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m||{},dataURLOptions:d,inlineImages:c,inlineVideos:l,recordCanvas:u,preserveWhiteSpace:b,onSerialize:v,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:V,newlyAddedElement:!1,privacySetting:N})}function n2(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function s2(t){return t[0].toUpperCase()+t.slice(1)}function vu(t,e){new a2(e).stringify(t)}function Su(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>Su(s,n)):(o==="object"&&i!==null&&(i=Su(i)),n[r]=i)}return n}function $r(t,e){if(e&&typeof e.offset<"u")return e.offset;let n=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&n===e.column){i=o;break}t[o]===`
|
|
15
|
+
`?(n=1,r+=1):n+=1}return i}function dv(t){return t.map(e=>(e.nodes&&(e.nodes=dv(e.nodes)),delete e.source,e))}function fv(t){if(t[cv]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)fv(e)}function I2(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function bi(t,e){if(Array.isArray(t))return t.map(o=>bi(o));let n=t,{inputs:r}=n,i=or(n,["inputs"]);if(r){e=[];for(let o of r){let s=Yt(z({},o),{__proto__:O2.prototype});s.map&&(s.map=Yt(z({},s.map),{__proto__:G2.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>bi(o,e))),i.source){let o=i.source,{inputId:s}=o,a=or(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new L2(i);if(i.type==="decl")return new N2(i);if(i.type==="rule")return new X2(i);if(i.type==="comment")return new x2(i);if(i.type==="atrule")return new V2(i);throw new Error("Unknown node type: "+t.type)}function iU(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function Qs(t,e){let n=new lU(t,e),r=new cU(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
|
|
16
16
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
|
|
17
17
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
|
|
18
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function ti(t){return typeof t=="object"&&typeof t.then=="function"}function
|
|
19
|
-
`?(n=1,r+=1):n+=1}return i}function
|
|
18
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function ti(t){return typeof t=="object"&&typeof t.then=="function"}function Ov(t){let e=!1,n=vU[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,lr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,lr,n+"Exit"]:[n,n+"Exit"]}function Xg(t){let e;return t.type==="document"?e=["Document",lr,"DocumentExit"]:t.type==="root"?e=["Root",lr,"RootExit"]:e=Ov(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Vu(t){return t[Se]=!1,t.nodes&&t.nodes.forEach(e=>Vu(e)),t}function ht(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Ih(t)}function _U(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}function jU(t){return t[0].toUpperCase()+t.slice(1)}function Lu(t,e){new QU(e).stringify(t)}function Xu(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(n[r]=e):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>Xu(s,n)):(o==="object"&&i!==null&&(i=Xu(i)),n[r]=i)}return n}function ni(t,e){if(e&&typeof e.offset<"u")return e.offset;let n=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&n===e.column){i=o;break}t[o]===`
|
|
19
|
+
`?(n=1,r+=1):n+=1}return i}function jv(t){return t.map(e=>(e.nodes&&(e.nodes=jv(e.nodes)),delete e.source,e))}function Qv(t){if(t[_v]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Qv(e)}function pM(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}function Ii(t,e){if(Array.isArray(t))return t.map(o=>Ii(o));let n=t,{inputs:r}=n,i=or(n,["inputs"]);if(r){e=[];for(let o of r){let s=Yt(z({},o),{__proto__:IM.prototype});s.map&&(s.map=Yt(z({},s.map),{__proto__:TM.prototype})),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(o=>Ii(o,e))),i.source){let o=i.source,{inputId:s}=o,a=or(o,["inputId"]);i.source=a,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new EM(i);if(i.type==="decl")return new wM(i);if(i.type==="rule")return new RM(i);if(i.type==="comment")return new SM(i);if(i.type==="atrule")return new vM(i);throw new Error("Unknown node type: "+t.type)}function zM(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function ea(t,e){let n=new $M(t,e),r=new qM(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
|
|
20
20
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
|
|
21
21
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
|
|
22
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function ii(t){return typeof t=="object"&&typeof t.then=="function"}function y0(t){let e=!1,n=cP[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,hr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,hr,n+"Exit"]:[n,n+"Exit"]}function qg(t){let e;return t.type==="document"?e=["Document",hr,"DocumentExit"]:t.type==="root"?e=["Root",hr,"RootExit"]:e=y0(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Yu(t){return t[we]=!1,t.nodes&&t.nodes.forEach(e=>Yu(e)),t}function pt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Oh(t)}function Gh(t){if(Ss[t])return Ss[t];let e=globalThis[t],n=e.prototype,r=t in tb?tb[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in eb?eb[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!LP())return Ss[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?Ss[t]=l:n}catch(a){return n}}function $e(t,e,n){var r;let i=`${t}.${String(n)}`;if(zc[i])return zc[i].call(e);let o=Gh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(zc[i]=s,s.call(e)):e[n]}function R0(t,e,n){let r=`${t}.${String(n)}`;if(Bc[r])return Bc[r].bind(e);let i=Gh(t)[n];return typeof i!="function"?e[n]:(Bc[r]=i,i.bind(e))}function XP(t){return $e("Node",t,"childNodes")}function WP(t){return $e("Node",t,"parentNode")}function UP(t){return $e("Node",t,"parentElement")}function MP(t){return $e("Node",t,"textContent")}function PP(t,e){return R0("Node",t,"contains")(e)}function FP(t){return R0("Node",t,"getRootNode")()}function AP(t){return!t||!("host"in t)?null:$e("ShadowRoot",t,"host")}function JP(t){return t.styleSheets}function DP(t){return!t||!("shadowRoot"in t)?null:$e("Element",t,"shadowRoot")}function YP(t,e){return $e("Element",t,"querySelector")(e)}function KP(t,e){return $e("Element",t,"querySelectorAll")(e)}function C0(){return Gh("MutationObserver").constructor}function Zn(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function Pt(t,e,n=document){let r={capture:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}function Ei(t,e,n={}){let r=null,i=0;return function(...o){let s=Date.now();!i&&n.leading===!1&&(i=s);let a=e-(s-i),c=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=s,t.apply(c,o)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,t.apply(c,o)},a))}}function Sa(t,e,n,r,i=window){let o=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(s){setTimeout(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>Sa(t,e,o||{},!0)}function Z0(t){var e,n,r,i;let o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=q.parentElement(o.body))==null?void 0:e.scrollLeft)||((n=o==null?void 0:o.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=q.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function k0(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function V0(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function x0(t){return t?t.nodeType===t.ELEMENT_NODE?t:q.parentElement(t):null}function Nt(t,e,n,r){if(!t)return!1;let i=x0(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Hs(i,e,r))return!0}catch(o){}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function HP(t,e){return e.getId(t)!==-1}function jc(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===mi}function N0(t,e){if(ci(t))return!1;let n=e.getId(t);if(!e.has(n))return!0;let r=q.parentNode(t);return r&&r.nodeType===t.DOCUMENT_NODE?!1:r?N0(r,e):!0}function zu(t){return!!t.changedTouches}function zP(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function O0(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function G0(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Bu(t){return t?t instanceof Hu&&"shadowRoot"in t?!!t.shadowRoot:!!q.shadowRoot(t):!1}function L0(t){var e;let n=null;return"getRootNode"in t&&((e=q.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&q.host(q.getRootNode(t))&&(n=q.host(q.getRootNode(t))),n}function BP(t){let e=t,n;for(;n=L0(e);)e=n;return e}function jP(t){let e=t.ownerDocument;if(!e)return!1;let n=BP(t);return q.contains(e,n)}function X0(t){let e=t.ownerDocument;return e?q.contains(e,t)||jP(t):!1}function rb(t){return"__ln"in t}function qu(t,e){t.delete(e),q.childNodes(e).forEach(n=>qu(t,n))}function QP(t,e){let n=[t];for(;n.length;){let r=n.pop();e.has(r)||(e.add(r),q.childNodes(r).forEach(i=>n.push(i)))}}function ob(t,e,n){return t.size===0?!1:$P(t,e)}function $P(t,e,n){let r=q.parentNode(e);return r?t.has(r):!1}function sb(t,e){return t.size===0?!1:U0(t,e)}function U0(t,e){let n=q.parentNode(e);return n?t.has(n)?!0:U0(t,n):!1}function qP(t){hi=t}function tF(){hi=void 0}function Ni(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(e){}return t&&t.target}function M0(t,e){let n=new $u;Tn.push(n),n.init(t);let r=new(C0())(nt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function eF({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,s=[],a,c=Ei(nt(h=>{let p=Date.now()-a;t(s.map(f=>(f.timeOffset-=p,f)),h),s=[],a=null}),o),l=nt(Ei(nt(h=>{let p=Ni(h),{clientX:f,clientY:m}=zu(h)?h.changedTouches[0]:h;a||(a=na()),s.push({x:f,y:m,id:r.getId(p),timeOffset:na()-a}),c(typeof DragEvent<"u"&&h instanceof DragEvent?et.Drag:h instanceof MouseEvent?et.MouseMove:et.TouchMove)}),i,{trailing:!1})),u=[Pt("mousemove",l,n),Pt("touchmove",l,n),Pt("drag",l,n)];return nt(()=>{u.forEach(h=>h())})}function nF({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],c=null,l=u=>h=>{let p=Ni(h);if(Nt(p,r,i,!0)||_P(p))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=He.Mouse;break;case"touch":f=He.Touch;break;case"pen":f=He.Pen;break}f===He.Touch&&(Jt[u]===Jt.MouseDown?m="TouchStart":Jt[u]===Jt.MouseUp&&(m="TouchEnd"))}else zu(h)&&(f=He.Touch);f!==null?(c=f,(m.startsWith("Touch")&&f===He.Touch||m.startsWith("Mouse")&&f===He.Mouse)&&(f=null)):Jt[u]===Jt.Click&&(f=c,c=null);let d=zu(h)?h.changedTouches[0]:h;if(!d)return;let b=n.getId(p),{clientX:v,clientY:I}=d;nt(t)(z({type:Jt[m],id:b,x:v,y:I},f!==null&&{pointerType:f}))};return Object.keys(Jt).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&s[u]!==!1).forEach(u=>{let h=sr(u),p=l(u);if(window.PointerEvent)switch(Jt[u]){case Jt.MouseDown:case Jt.MouseUp:h=h.replace("mouse","pointer");break;case Jt.TouchStart:case Jt.TouchEnd:return}a.push(Pt(h,p,e))}),nt(()=>{a.forEach(u=>u())})}function P0({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){let s=nt(Ei(nt(a=>{let c=Ni(a);if(!c||Nt(c,r,i,!0))return;let l=n.getId(c);if(c===e&&e.defaultView){let u=Z0(e.defaultView);t({id:l,x:u.left,y:u.top})}else t({id:l,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Pt("scroll",s,e)}function rF({viewportResizeCb:t},{win:e}){let n=-1,r=-1,i=nt(Ei(nt(()=>{let o=k0(),s=V0();(n!==o||r!==s)&&(t({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return Pt("resize",i,e)}function oF({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function h(v){let I=Ni(v),R=v.isTrusted,E=I&&I.tagName;if(I&&E==="OPTION"&&(I=q.parentElement(I)),!I||!E||iF.indexOf(E)<0||Nt(I,r,i,!0)||I.classList.contains(o)||s&&I.matches(s))return;let T=I.value,V=!1,N=Ys(I)||"",U=I.getAttribute("data-hl-record");N==="radio"||N==="checkbox"?V=I.checked:tv({maskInputOptions:a,type:N,tagName:E,overwriteRecord:U})&&(T=Ds({element:I,maskInputOptions:a,tagName:E,type:N,value:T,overwriteRecord:U,maskInputFn:c})),p(I,u?{text:T,isChecked:V,userTriggered:R}:{text:T,isChecked:V});let C=I.name;N==="radio"&&C&&V&&e.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(x=>{if(x!==I){let M=x.value;p(x,u?{text:M,isChecked:!V,userTriggered:!1}:{text:M,isChecked:!V})}})}function p(v,I){let R=ab.get(v);if(!R||R.text!==I.text||R.isChecked!==I.isChecked){ab.set(v,I);let E=n.getId(v);nt(t)(Yt(z({},I),{id:E}))}}let f=(l.input==="last"?["change"]:["input","change"]).map(v=>Pt(v,nt(h),e)),m=e.defaultView;if(!m)return()=>{f.forEach(v=>v())};let d=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),b=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&f.push(...b.map(v=>Sa(v[0],v[1],{set(){nt(h)({target:this,isTrusted:!1})}},!1,m))),nt(()=>{f.forEach(v=>v())})}function ra(t){let e=[];function n(r,i){if(ws("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||ws("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||ws("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||ws("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(t,e)}function ze(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function sF({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:nt((u,h,p)=>{let[f,m]=p,{id:d,styleId:b}=ze(h,e,n.styleMirror);return(d&&d!==-1||b&&b!==-1)&&t({id:d,styleId:b,adds:[{rule:f,index:m}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){let f=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[f,p])};let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=ze(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,removes:[{index:f}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=ze(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replace:f}),u.apply(h,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=ze(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replaceSync:f}),u.apply(h,p)})}));let c={};Is("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Is("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Is("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Is("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([u,h])=>{l[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(l[u].insertRule,{apply:nt((p,f,m)=>{let[d,b]=m,{id:v,styleId:I}=ze(f.parentStyleSheet,e,n.styleMirror);return(v&&v!==-1||I&&I!==-1)&&t({id:v,styleId:I,adds:[{rule:d,index:[...ra(f),b||0]}]}),p.apply(f,m)})}),h.prototype.deleteRule=new Proxy(l[u].deleteRule,{apply:nt((p,f,m)=>{let[d]=m,{id:b,styleId:v}=ze(f.parentStyleSheet,e,n.styleMirror);return(b&&b!==-1||v&&v!==-1)&&t({id:b,styleId:v,removes:[{index:[...ra(f),d]}]}),p.apply(f,m)})})}),nt(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([u,h])=>{h.prototype.insertRule=l[u].insertRule,h.prototype.deleteRule=l[u].deleteRule})})}function F0({mirror:t,stylesheetManager:e},n){var r,i,o;let s=null;n.nodeName==="#document"?s=t.getId(n):s=t.getId(q.host(n));let a=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(o=(i=n.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,c=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!a||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var l;return(l=c.get)==null?void 0:l.call(this)},set(l){var u;let h=(u=c.set)==null?void 0:u.call(this,l);if(s!==null&&s!==-1)try{e.adoptStyleSheets(l,s)}catch(p){}return h}}),nt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function aF({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:nt((a,c,l)=>{var u;let[h,p,f]=l;if(n.has(h))return o.apply(c,[h,p,f]);let{id:m,styleId:d}=ze((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,set:{property:h,value:p,priority:f},index:ra(c.parentRule)}),a.apply(c,l)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:nt((a,c,l)=>{var u;let[h]=l;if(n.has(h))return s.apply(c,[h]);let{id:p,styleId:f}=ze((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||f&&f!==-1)&&t({id:p,styleId:f,remove:{property:h},index:ra(c.parentRule)}),a.apply(c,l)})}),nt(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function lF({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:i,doc:o}){let s=nt(c=>Ei(nt(l=>{let u=Ni(l);if(!u||Nt(u,e,n,!0))return;let{currentTime:h,volume:p,muted:f,playbackRate:m,loop:d}=u;t({type:c,id:r.getId(u),currentTime:h,volume:p,muted:f,playbackRate:m,loop:d})}),i.media||500)),a=[Pt("play",s(qn.Play),o),Pt("pause",s(qn.Pause),o),Pt("seeked",s(qn.Seeked),o),Pt("volumechange",s(qn.VolumeChange),o),Pt("ratechange",s(qn.RateChange),o)];return nt(()=>{a.forEach(c=>c())})}function cF({fontCb:t,doc:e}){let n=e.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(a,c,l){let u=new o(a,c,l);return i.set(u,{family:a,buffer:typeof c!="string",descriptors:l,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};let s=Zn(e.fonts,"add",function(a){return function(c){return setTimeout(nt(()=>{let l=i.get(c);l&&(t(l),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(s),nt(()=>{r.forEach(a=>a())})}function uF(t){let{doc:e,mirror:n,blockClass:r,blockSelector:i,selectionCb:o}=t,s=!0,a=nt(()=>{let c=e.getSelection();if(!c||s&&c!=null&&c.isCollapsed)return;s=c.isCollapsed||!1;let l=[],u=c.rangeCount||0;for(let h=0;h<u;h++){let p=c.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:d,endOffset:b}=p;Nt(f,r,i,!0)||Nt(d,r,i,!0)||l.push({start:n.getId(f),startOffset:m,end:n.getId(d),endOffset:b})}o({ranges:l})});return a(),Pt("selectionchange",a)}function hF({doc:t,customElementCb:e}){let n=t.defaultView;return!n||!n.customElements?()=>{}:Zn(n.customElements,"define",function(r){return function(i,o,s){try{e({define:{name:i}})}catch(a){console.warn(`Custom element callback failed for ${i}`)}return r.apply(this,[i,o,s])}})}function pF(t,e){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:f,customElementCb:m}=t;t.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),n(...d)},t.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},t.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},t.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},t.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),s(...d)},t.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},t.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),c(...d)},t.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),l(...d)},t.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),u(...d)},t.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},t.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},t.selectionCb=(...d)=>{e.selection&&e.selection(...d),f(...d)},t.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),m(...d)}}function dF(t,e={}){let n=t.doc.defaultView;if(!n)return()=>{};pF(t,e);let r;t.recordDOM&&(r=M0(t,t.doc));let i=eF(t),o=nF(t),s=P0(t),a=rF(t,{win:n}),c=oF(t),l=lF(t),u=()=>{},h=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(u=sF(t,{win:n}),h=F0(t,t.doc),p=aF(t,{win:n}),t.collectFonts&&(f=cF(t)));let m=uF(t),d=hF(t),b=[];for(let v of t.plugins)b.push(v.observer(v.callback,n,v.options));return nt(()=>{Tn.forEach(v=>v.reset()),r==null||r.disconnect(),i(),o(),s(),a(),c(),l(),u(),h(),p(),f(),m(),d(),b.forEach(v=>v())})}function ws(t){return typeof window[t]<"u"}function Is(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}function yF(t,e){let n=lb.get(t);return n||(n=new Map,lb.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}function Gs(t,e,n){if(t instanceof Array)return t.map(r=>Gs(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let r=t.constructor.name,i=mF(t);return{rr_type:r,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Gs(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let r=t.constructor.name,{src:i}=t;return{rr_type:r,src:i}}else if(t instanceof HTMLCanvasElement){let r="HTMLImageElement",i=t.toDataURL();return{rr_type:r,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[Gs(t.data,e,n),t.width,t.height]};if(D0(t,e)||typeof t=="object"){let r=t.constructor.name,i=A0(t,e,n);return{rr_type:r,index:i}}}}return t}function gF(t,e,n,r){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof e.CanvasRenderingContext2D.prototype[s]!="function")continue;let a=Zn(e.CanvasRenderingContext2D.prototype,s,function(c){return function(...l){return Nt(this.canvas,n,r,!0)||setTimeout(()=>{let u=J0(l,e,this);t(this.canvas,{type:dr["2D"],property:s,args:u})},0),c.apply(this,l)}});i.push(a)}catch(a){let c=Sa(e.CanvasRenderingContext2D.prototype,s,{set(l){t(this.canvas,{type:dr["2D"],property:s,args:[l],setter:!0})}});i.push(c)}return()=>{i.forEach(s=>s())}}function bF(t){return t==="experimental-webgl"?"webgl":t}function cb(t,e,n,r){let i=[];try{let o=Zn(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(a,...c){if(!Nt(this,e,n,!0)){let l=bF(a);if("__context"in this||(this.__context=l),r&&["webgl","webgl2"].includes(l))if(c[0]&&typeof c[0]=="object"){let u=c[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[a,...c])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function ub(t,e,n,r,i,o){let s=[],a=Object.getOwnPropertyNames(t);for(let c of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;let l=Zn(t,c,function(u){return function(...h){let p=u.apply(this,h);if(A0(p,o,this),"tagName"in this.canvas&&!Nt(this.canvas,r,i,!0)){let f=J0(h,o,this),m={type:e,property:c,args:f};n(this.canvas,m)}return p}});s.push(l)}catch(l){let u=Sa(t,c,{set(h){n(this.canvas,{type:e,property:c,args:[h],setter:!0})}});s.push(u)}return s}function vF(t,e,n,r){let i=[];return i.push(...ub(e.WebGLRenderingContext.prototype,dr.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...ub(e.WebGL2RenderingContext.prototype,dr.WebGL2,t,n,r,e)),()=>{i.forEach(o=>o())}}function wF(t){let e;try{if(e=hb&&(self.URL||self.webkitURL).createObjectURL(hb),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;base64,"+Y0,{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function Ge(t={}){var e,n,r,i,o,s,a,c;let{emit:l,checkoutEveryNms:u,checkoutEveryNth:h,blockClass:p="highlight-block",blockSelector:f=null,ignoreClass:m="highlight-ignore",ignoreSelector:d=null,maskTextClass:b="highlight-mask",maskTextSelector:v=null,inlineStylesheet:I=!0,maskAllInputs:R,maskInputOptions:E,slimDOMOptions:T,maskInputFn:V,maskTextFn:N=hh,hooks:U,packFn:C,sampling:x={},mousemoveWait:M,recordDOM:ot=!0,recordCanvas:lt=!1,recordCrossOriginIframes:y=!1,recordAfter:g=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:Z=!1,collectFonts:D=!1,inlineImages:P=!1,inlineVideos:O=!1,plugins:it,keepIframeSrcFn:ct=()=>!1,privacySetting:Ot="default",ignoreCSSAttributes:We=new Set([]),errorHandler:H0,logger:z0}=t,Oi=z(z({},t.dataURLOptions),(n=(e=t.sampling)==null?void 0:e.canvas)==null?void 0:n.dataURLOptions);qP(H0);let Gi=y?window.parent===window:!0,mr=!1;if(!Gi)try{window.parent.document&&(mr=!1)}catch(st){mr=!0}if(Gi&&!l)throw new Error("emit function is required");if(!Gi&&!mr)return()=>{};M!==void 0&&x.mousemove===void 0&&(x.mousemove=M),ce.reset();let wa=R===!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}:E!==void 0?E:{password:!0},Ia=T===!0||T==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:T==="all",headMetaDescKeywords:T==="all",headTitleMutations:T==="all"}:T||{};zP();let Lh,Ta=0,Xh=st=>{for(let oe of it||[])oe.eventProcessor&&(st=oe.eventProcessor(st));return C&&!mr&&(st=C(st)),st};vt=(st,oe)=>{var gt;let bt=st;if(bt.timestamp=na(),(gt=Tn[0])!=null&>.isFrozen()&&bt.type!==rt.FullSnapshot&&!(bt.type===rt.IncrementalSnapshot&&bt.data.source===et.Mutation)&&Tn.forEach(pe=>pe.unfreeze()),Gi)l==null||l(Xh(bt),oe);else if(mr){let pe={type:"rrweb",event:Xh(bt),origin:window.location.origin,isCheckout:oe};window.parent.postMessage(pe,"*")}if(bt.type===rt.FullSnapshot)Lh=bt,Ta=0;else if(bt.type===rt.IncrementalSnapshot){if(bt.data.source===et.Mutation&&bt.data.isAttachIframe)return;Ta++;let pe=h&&Ta>=h,dt=u&&bt.timestamp-Lh.timestamp>u;(pe||dt)&&Ls(!0)}};let Li=st=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Mutation},st)})},Wh=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Scroll},st)}),Uh=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.CanvasMutation},st)}),B0=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.AdoptedStyleSheet},st)}),qe=new rh({mutationCb:Li,adoptedStyleSheetCb:B0}),tn=new th({mirror:ce,mutationCb:Li,stylesheetManager:qe,recordCrossOriginIframes:y,wrappedEmit:vt});for(let st of it||[])st.getMirror&&st.getMirror({nodeMirror:ce,crossOriginIframeMirror:tn.crossOriginIframeMirror,crossOriginIframeStyleMirror:tn.crossOriginIframeStyleMirror});let Ea=new ih;pi=new nh({recordCanvas:lt,recordLocalVideos:P,recordRemoteVideos:O,mutationCb:Uh,win:window,blockClass:p,blockSelector:f,mirror:ce,sampling:(r=x==null?void 0:x.canvas)==null?void 0:r.fps,samplingManual:(i=x==null?void 0:x.canvas)==null?void 0:i.fpsManual,clearWebGLBuffer:(o=x==null?void 0:x.canvas)==null?void 0:o.clearWebGLBuffer,initialSnapshotDelay:(s=x==null?void 0:x.canvas)==null?void 0:s.initialSnapshotDelay,dataURLOptions:Oi,resizeFactor:(a=x==null?void 0:x.canvas)==null?void 0:a.resizeFactor,maxSnapshotDimension:(c=x==null?void 0:x.canvas)==null?void 0:c.maxSnapshotDimension,logger:z0});let Xi=new eh({mutationCb:Li,scrollCb:Wh,bypassOptions:{blockClass:p,blockSelector:f,maskTextClass:b,maskTextSelector:v,inlineStylesheet:I,maskInputOptions:wa,dataURLOptions:Oi,maskTextFn:N,maskInputFn:V,recordCanvas:lt,inlineImages:P,inlineVideos:O,privacySetting:Ot,sampling:x,slimDOMOptions:Ia,iframeManager:tn,stylesheetManager:qe,canvasManager:pi,keepIframeSrcFn:ct,processedNodeManager:Ea},mirror:ce});Ls=(st=!1)=>{if(!ot)return;vt({type:rt.Meta,data:{href:window.location.href,width:V0(),height:k0()}},st),qe.reset(),Xi.init(),Tn.forEach(gt=>gt.lock());let oe=e2(document,{mirror:ce,blockClass:p,blockSelector:f,maskTextClass:b,maskTextSelector:v,inlineStylesheet:I,maskAllInputs:wa,maskTextFn:N,maskInputFn:V,slimDOM:Ia,dataURLOptions:Oi,recordCanvas:lt,inlineImages:P,inlineVideos:O,privacySetting:Ot,onSerialize:gt=>{O0(gt,ce)&&tn.addIframe(gt),G0(gt,ce)&&qe.trackLinkElement(gt),Bu(gt)&&Xi.addShadowRoot(q.shadowRoot(gt),document)},onIframeLoad:(gt,bt)=>{tn.attachIframe(gt,bt),Xi.observeAttachShadow(gt)},onStylesheetLoad:(gt,bt)=>{qe.attachLinkElement(gt,bt)},keepIframeSrcFn:ct});if(!oe)return console.warn("Failed to snapshot the document");vt({type:rt.FullSnapshot,data:{node:oe,initialOffset:Z0(window)}},st),Tn.forEach(gt=>gt.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&qe.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{let st=[],oe=bt=>{var pe;return nt(dF)({mutationCb:Li,mousemoveCb:(dt,Ra)=>vt({type:rt.IncrementalSnapshot,data:{source:Ra,positions:dt}}),mouseInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MouseInteraction},dt)}),scrollCb:Wh,viewportResizeCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.ViewportResize},dt)}),inputCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Input},dt)}),mediaInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MediaInteraction},dt)}),styleSheetRuleCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.StyleSheetRule},dt)}),styleDeclarationCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.StyleDeclaration},dt)}),canvasMutationCb:Uh,fontCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Font},dt)}),selectionCb:dt=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Selection},dt)})},customElementCb:dt=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.CustomElement},dt)})},blockClass:p,ignoreClass:m,ignoreSelector:d,maskTextClass:b,maskTextSelector:v,maskInputOptions:wa,inlineStylesheet:I,sampling:x,recordDOM:ot,recordCanvas:lt,inlineImages:P,inlineVideos:O,userTriggeredOnInput:Z,collectFonts:D,doc:bt,maskInputFn:V,maskTextFn:N,keepIframeSrcFn:ct,blockSelector:f,slimDOMOptions:Ia,dataURLOptions:Oi,mirror:ce,iframeManager:tn,stylesheetManager:qe,shadowDomManager:Xi,processedNodeManager:Ea,canvasManager:pi,ignoreCSSAttributes:We,privacySetting:Ot,plugins:((pe=it==null?void 0:it.filter(dt=>dt.observer))==null?void 0:pe.map(dt=>({observer:dt.observer,options:dt.options,callback:Ra=>vt({type:rt.Plugin,data:{plugin:dt.name,payload:Ra}})})))||[]},U)};tn.addLoadListener(bt=>{try{st.push(oe(bt.contentDocument))}catch(pe){console.warn(pe)}});let gt=()=>{Ls(),st.push(oe(document)),oa=!0};return document.readyState==="interactive"||document.readyState==="complete"?gt():(st.push(Pt("DOMContentLoaded",()=>{vt({type:rt.DomContentLoaded,data:{}}),g==="DOMContentLoaded"&>()})),st.push(Pt("load",()=>{vt({type:rt.Load,data:{}}),g==="load"&>()},window))),()=>{st.forEach(bt=>bt()),Ea.destroy(),oa=!1,tF()}}catch(st){console.warn(st)}}function xF(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");let e=t.split(","),n=e.lastIndexOf("");for(;n>=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function GF(t,e){let n=e.slice(0,e.length-1);for(let r=0;r<n.length;r++)n[r]=t[n[r].toLowerCase()];return n}function LF(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function XF(t,e,n){let r;if(e.scope===n||e.scope==="all"){r=e.mods.length>0;for(let i in Mt)Object.prototype.hasOwnProperty.call(Mt,i)&&(!Mt[i]&&e.mods.indexOf(+i)>-1||Mt[i]&&e.mods.indexOf(+i)===-1)&&(r=!1);(e.mods.length===0&&!Mt[16]&&!Mt[18]&&!Mt[17]&&!Mt[91]||r||e.shortcut==="*")&&e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function WF(t){let e=Ie["*"],n=t.keyCode||t.which||t.charCode;if((n===93||n===224)&&(n=91),Ut.indexOf(n)===-1&&n!==229&&Ut.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(r=>{let i=mb[r];t[r]&&Ut.indexOf(i)===-1?Ut.push(i):!t[r]&&Ut.indexOf(i)>-1?Ut.splice(Ut.indexOf(i),1):r==="metaKey"&&t[r]&&Ut.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(Ut=Ut.slice(Ut.indexOf(i))))}),!(n in Mt&&(Mt[n]=!0,!e))){for(let r in Mt)Object.prototype.hasOwnProperty.call(Mt,r)&&(Mt[r]=t[mb[r]]);if(t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(Ut.indexOf(17)===-1&&Ut.push(17),Ut.indexOf(18)===-1&&Ut.push(18),Mt[17]=!0,Mt[18]=!0),n in Ie){for(let r=0;r<Ie[n].length;r++)if((t.type==="keydown"&&Ie[n][r].keydown||t.type==="keyup"&&Ie[n][r].keyup)&&Ie[n][r].key){let i=Ie[n][r];XF(t,i,"all")}}}}function AF(t){let e;try{if(e=bb&&(self.URL||self.webkitURL).createObjectURL(bb),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webk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,$u,hi,nt,Tn,iF,ab,ia,th,eh,nr,fF,oi,mF,lb,A0,J0,D0,Y0,SF,hb,nh,rh,ih,vt,Ls,pi,oa,ce,pb,db,IF,TF,EF,RF,CF,ZF,fb,Qc,kF,VF,Ut,Ie,$c,NF,mb,Mt,K0,OF,yb,gb,Ri,UF,MF,PF,_0,FF,bb,Ne,JF,DF,YF,KF,oh,Ci,Oc=Dh(()=>{"use strict";JG=Object.defineProperty,DG=(t,e,n)=>e in t?JG(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oe=(t,e,n)=>DG(t,typeof e!="symbol"?e+"":e,n),YG=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),zt=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),KG(r,...n)},KG=(t,...e)=>YG(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>($y(),Qy));n.recordLog(`${t}${e}`,"warn")}catch(n){}}),vb=class{constructor(t,e){Oe(this,"debug"),Oe(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},Bn=class{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 vb)}h(e,n){if(this.Ln)try{return this.qn[e](...n)}catch(r){zt(`Error executing buffered call to ${e}:`,"error",r)}else{this.Jr({method:e,args:n});return}}Jr(e){this.En.length<this.Ys?(this.En.push(e),this.tr=!1):(this.tr||(this.tr=!0,zt("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Ks+=1)}load(e){this.qn=e,this.Ln=!0;for(let{method:n,args:r}of this.En)try{this.qn[n](...r)}catch(i){zt(`Error executing buffered call to ${n}:`,"error",i)}this.En=[]}},_G=Object.defineProperty,HG=Object.defineProperties,zG=Object.getOwnPropertyDescriptors,Xs=Object.getOwnPropertySymbols,Sb=Object.prototype.hasOwnProperty,wb=Object.prototype.propertyIsEnumerable,qc=(t,e,n)=>e in t?_G(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))Sb.call(e,n)&&qc(t,n,e[n]);if(Xs)for(var n of Xs(e))wb.call(e,n)&&qc(t,n,e[n]);return t},rr=(t,e)=>HG(t,zG(e)),ai=(t,e)=>{var n={};for(var r in t)Sb.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Xs)for(var r of Xs(t))e.indexOf(r)<0&&wb.call(t,r)&&(n[r]=t[r]);return n},di=(t,e,n)=>qc(t,typeof e!="symbol"?e+"":e,n),ir=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});$G=/\r\n|[\n\r]/g;eu=class t extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=tL(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=tg(Array.isArray(s)?s:s?[s]:void 0);let p=tg((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=a!=null?a:p==null||(i=p[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:p==null?void 0:p.map(m=>m.start),this.locations=c&&a?c.map(m=>tu(a,m)):p==null?void 0:p.map(m=>tu(m.source,m.start));let f=jG(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(o=h!=null?h:f)!==null&&o!==void 0?o: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}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(e+=`
|
|
22
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function ii(t){return typeof t=="object"&&typeof t.then=="function"}function m0(t){let e=!1,n=cP[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,hr,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,hr,n+"Exit"]:[n,n+"Exit"]}function $g(t){let e;return t.type==="document"?e=["Document",hr,"DocumentExit"]:t.type==="root"?e=["Root",hr,"RootExit"]:e=m0(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Yu(t){return t[we]=!1,t.nodes&&t.nodes.forEach(e=>Yu(e)),t}function pt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Oh(t)}function Gh(t){if(Ss[t])return Ss[t];let e=globalThis[t],n=e.prototype,r=t in qg?qg[t]:void 0,i=!!(r&&r.every(a=>{var c,l;return!!((l=(c=Object.getOwnPropertyDescriptor(n,a))==null?void 0:c.get)!=null&&l.toString().includes("[native code]"))})),o=t in tb?tb[t]:void 0,s=!!(o&&o.every(a=>{var c;return typeof n[a]=="function"&&((c=n[a])==null?void 0:c.toString().includes("[native code]"))}));if(i&&s&&!LP())return Ss[t]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let c=a.contentWindow;if(!c)return e.prototype;let l=c[t].prototype;return document.body.removeChild(a),l?Ss[t]=l:n}catch(a){return n}}function $e(t,e,n){var r;let i=`${t}.${String(n)}`;if(zc[i])return zc[i].call(e);let o=Gh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(zc[i]=s,s.call(e)):e[n]}function E0(t,e,n){let r=`${t}.${String(n)}`;if(Bc[r])return Bc[r].bind(e);let i=Gh(t)[n];return typeof i!="function"?e[n]:(Bc[r]=i,i.bind(e))}function XP(t){return $e("Node",t,"childNodes")}function WP(t){return $e("Node",t,"parentNode")}function UP(t){return $e("Node",t,"parentElement")}function MP(t){return $e("Node",t,"textContent")}function PP(t,e){return E0("Node",t,"contains")(e)}function FP(t){return E0("Node",t,"getRootNode")()}function AP(t){return!t||!("host"in t)?null:$e("ShadowRoot",t,"host")}function JP(t){return t.styleSheets}function DP(t){return!t||!("shadowRoot"in t)?null:$e("Element",t,"shadowRoot")}function YP(t,e){return $e("Element",t,"querySelector")(e)}function KP(t,e){return $e("Element",t,"querySelectorAll")(e)}function R0(){return Gh("MutationObserver").constructor}function Zn(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function Pt(t,e,n=document){let r={capture:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}function Ei(t,e,n={}){let r=null,i=0;return function(...o){let s=Date.now();!i&&n.leading===!1&&(i=s);let a=e-(s-i),c=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=s,t.apply(c,o)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,t.apply(c,o)},a))}}function Sa(t,e,n,r,i=window){let o=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(s){setTimeout(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>Sa(t,e,o||{},!0)}function C0(t){var e,n,r,i;let o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=q.parentElement(o.body))==null?void 0:e.scrollLeft)||((n=o==null?void 0:o.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=q.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function Z0(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function k0(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function V0(t){return t?t.nodeType===t.ELEMENT_NODE?t:q.parentElement(t):null}function Nt(t,e,n,r){if(!t)return!1;let i=V0(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Hs(i,e,r))return!0}catch(o){}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function HP(t,e){return e.getId(t)!==-1}function jc(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===mi}function x0(t,e){if(ci(t))return!1;let n=e.getId(t);if(!e.has(n))return!0;let r=q.parentNode(t);return r&&r.nodeType===t.DOCUMENT_NODE?!1:r?x0(r,e):!0}function zu(t){return!!t.changedTouches}function zP(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function N0(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function O0(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Bu(t){return t?t instanceof Hu&&"shadowRoot"in t?!!t.shadowRoot:!!q.shadowRoot(t):!1}function G0(t){var e;let n=null;return"getRootNode"in t&&((e=q.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&q.host(q.getRootNode(t))&&(n=q.host(q.getRootNode(t))),n}function BP(t){let e=t,n;for(;n=G0(e);)e=n;return e}function jP(t){let e=t.ownerDocument;if(!e)return!1;let n=BP(t);return q.contains(e,n)}function L0(t){let e=t.ownerDocument;return e?q.contains(e,t)||jP(t):!1}function nb(t){return"__ln"in t}function qu(t,e){t.delete(e),q.childNodes(e).forEach(n=>qu(t,n))}function QP(t,e){let n=[t];for(;n.length;){let r=n.pop();e.has(r)||(e.add(r),q.childNodes(r).forEach(i=>n.push(i)))}}function ib(t,e,n){return t.size===0?!1:$P(t,e)}function $P(t,e,n){let r=q.parentNode(e);return r?t.has(r):!1}function ob(t,e){return t.size===0?!1:W0(t,e)}function W0(t,e){let n=q.parentNode(e);return n?t.has(n)?!0:W0(t,n):!1}function qP(t){hi=t}function tF(){hi=void 0}function Ni(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(e){}return t&&t.target}function U0(t,e){let n=new $u;Tn.push(n),n.init(t);let r=new(R0())(nt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function eF({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,s=[],a,c=Ei(nt(h=>{let p=Date.now()-a;t(s.map(f=>(f.timeOffset-=p,f)),h),s=[],a=null}),o),l=nt(Ei(nt(h=>{let p=Ni(h),{clientX:f,clientY:m}=zu(h)?h.changedTouches[0]:h;a||(a=na()),s.push({x:f,y:m,id:r.getId(p),timeOffset:na()-a}),c(typeof DragEvent<"u"&&h instanceof DragEvent?et.Drag:h instanceof MouseEvent?et.MouseMove:et.TouchMove)}),i,{trailing:!1})),u=[Pt("mousemove",l,n),Pt("touchmove",l,n),Pt("drag",l,n)];return nt(()=>{u.forEach(h=>h())})}function nF({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],c=null,l=u=>h=>{let p=Ni(h);if(Nt(p,r,i,!0)||_P(p))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=He.Mouse;break;case"touch":f=He.Touch;break;case"pen":f=He.Pen;break}f===He.Touch&&(Jt[u]===Jt.MouseDown?m="TouchStart":Jt[u]===Jt.MouseUp&&(m="TouchEnd"))}else zu(h)&&(f=He.Touch);f!==null?(c=f,(m.startsWith("Touch")&&f===He.Touch||m.startsWith("Mouse")&&f===He.Mouse)&&(f=null)):Jt[u]===Jt.Click&&(f=c,c=null);let d=zu(h)?h.changedTouches[0]:h;if(!d)return;let b=n.getId(p),{clientX:v,clientY:I}=d;nt(t)(z({type:Jt[m],id:b,x:v,y:I},f!==null&&{pointerType:f}))};return Object.keys(Jt).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&s[u]!==!1).forEach(u=>{let h=sr(u),p=l(u);if(window.PointerEvent)switch(Jt[u]){case Jt.MouseDown:case Jt.MouseUp:h=h.replace("mouse","pointer");break;case Jt.TouchStart:case Jt.TouchEnd:return}a.push(Pt(h,p,e))}),nt(()=>{a.forEach(u=>u())})}function M0({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){let s=nt(Ei(nt(a=>{let c=Ni(a);if(!c||Nt(c,r,i,!0))return;let l=n.getId(c);if(c===e&&e.defaultView){let u=C0(e.defaultView);t({id:l,x:u.left,y:u.top})}else t({id:l,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Pt("scroll",s,e)}function rF({viewportResizeCb:t},{win:e}){let n=-1,r=-1,i=nt(Ei(nt(()=>{let o=Z0(),s=k0();(n!==o||r!==s)&&(t({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return Pt("resize",i,e)}function oF({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function h(v){let I=Ni(v),R=v.isTrusted,E=I&&I.tagName;if(I&&E==="OPTION"&&(I=q.parentElement(I)),!I||!E||iF.indexOf(E)<0||Nt(I,r,i,!0)||I.classList.contains(o)||s&&I.matches(s))return;let T=I.value,V=!1,N=Ys(I)||"",U=I.getAttribute("data-hl-record");N==="radio"||N==="checkbox"?V=I.checked:qb({maskInputOptions:a,type:N,tagName:E,overwriteRecord:U})&&(T=Ds({element:I,maskInputOptions:a,tagName:E,type:N,value:T,overwriteRecord:U,maskInputFn:c})),p(I,u?{text:T,isChecked:V,userTriggered:R}:{text:T,isChecked:V});let C=I.name;N==="radio"&&C&&V&&e.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(x=>{if(x!==I){let M=x.value;p(x,u?{text:M,isChecked:!V,userTriggered:!1}:{text:M,isChecked:!V})}})}function p(v,I){let R=sb.get(v);if(!R||R.text!==I.text||R.isChecked!==I.isChecked){sb.set(v,I);let E=n.getId(v);nt(t)(Yt(z({},I),{id:E}))}}let f=(l.input==="last"?["change"]:["input","change"]).map(v=>Pt(v,nt(h),e)),m=e.defaultView;if(!m)return()=>{f.forEach(v=>v())};let d=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),b=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&f.push(...b.map(v=>Sa(v[0],v[1],{set(){nt(h)({target:this,isTrusted:!1})}},!1,m))),nt(()=>{f.forEach(v=>v())})}function ra(t){let e=[];function n(r,i){if(ws("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||ws("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||ws("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||ws("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(t,e)}function ze(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function sF({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:nt((u,h,p)=>{let[f,m]=p,{id:d,styleId:b}=ze(h,e,n.styleMirror);return(d&&d!==-1||b&&b!==-1)&&t({id:d,styleId:b,adds:[{rule:f,index:m}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){let f=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[f,p])};let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=ze(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,removes:[{index:f}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=ze(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replace:f}),u.apply(h,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:nt((u,h,p)=>{let[f]=p,{id:m,styleId:d}=ze(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replaceSync:f}),u.apply(h,p)})}));let c={};Is("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Is("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Is("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Is("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([u,h])=>{l[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(l[u].insertRule,{apply:nt((p,f,m)=>{let[d,b]=m,{id:v,styleId:I}=ze(f.parentStyleSheet,e,n.styleMirror);return(v&&v!==-1||I&&I!==-1)&&t({id:v,styleId:I,adds:[{rule:d,index:[...ra(f),b||0]}]}),p.apply(f,m)})}),h.prototype.deleteRule=new Proxy(l[u].deleteRule,{apply:nt((p,f,m)=>{let[d]=m,{id:b,styleId:v}=ze(f.parentStyleSheet,e,n.styleMirror);return(b&&b!==-1||v&&v!==-1)&&t({id:b,styleId:v,removes:[{index:[...ra(f),d]}]}),p.apply(f,m)})})}),nt(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([u,h])=>{h.prototype.insertRule=l[u].insertRule,h.prototype.deleteRule=l[u].deleteRule})})}function P0({mirror:t,stylesheetManager:e},n){var r,i,o;let s=null;n.nodeName==="#document"?s=t.getId(n):s=t.getId(q.host(n));let a=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(o=(i=n.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,c=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!a||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var l;return(l=c.get)==null?void 0:l.call(this)},set(l){var u;let h=(u=c.set)==null?void 0:u.call(this,l);if(s!==null&&s!==-1)try{e.adoptStyleSheets(l,s)}catch(p){}return h}}),nt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function aF({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:nt((a,c,l)=>{var u;let[h,p,f]=l;if(n.has(h))return o.apply(c,[h,p,f]);let{id:m,styleId:d}=ze((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,set:{property:h,value:p,priority:f},index:ra(c.parentRule)}),a.apply(c,l)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:nt((a,c,l)=>{var u;let[h]=l;if(n.has(h))return s.apply(c,[h]);let{id:p,styleId:f}=ze((u=c.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||f&&f!==-1)&&t({id:p,styleId:f,remove:{property:h},index:ra(c.parentRule)}),a.apply(c,l)})}),nt(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function lF({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:i,doc:o}){let s=nt(c=>Ei(nt(l=>{let u=Ni(l);if(!u||Nt(u,e,n,!0))return;let{currentTime:h,volume:p,muted:f,playbackRate:m,loop:d}=u;t({type:c,id:r.getId(u),currentTime:h,volume:p,muted:f,playbackRate:m,loop:d})}),i.media||500)),a=[Pt("play",s(qn.Play),o),Pt("pause",s(qn.Pause),o),Pt("seeked",s(qn.Seeked),o),Pt("volumechange",s(qn.VolumeChange),o),Pt("ratechange",s(qn.RateChange),o)];return nt(()=>{a.forEach(c=>c())})}function cF({fontCb:t,doc:e}){let n=e.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(a,c,l){let u=new o(a,c,l);return i.set(u,{family:a,buffer:typeof c!="string",descriptors:l,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};let s=Zn(e.fonts,"add",function(a){return function(c){return setTimeout(nt(()=>{let l=i.get(c);l&&(t(l),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(s),nt(()=>{r.forEach(a=>a())})}function uF(t){let{doc:e,mirror:n,blockClass:r,blockSelector:i,selectionCb:o}=t,s=!0,a=nt(()=>{let c=e.getSelection();if(!c||s&&c!=null&&c.isCollapsed)return;s=c.isCollapsed||!1;let l=[],u=c.rangeCount||0;for(let h=0;h<u;h++){let p=c.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:d,endOffset:b}=p;Nt(f,r,i,!0)||Nt(d,r,i,!0)||l.push({start:n.getId(f),startOffset:m,end:n.getId(d),endOffset:b})}o({ranges:l})});return a(),Pt("selectionchange",a)}function hF({doc:t,customElementCb:e}){let n=t.defaultView;return!n||!n.customElements?()=>{}:Zn(n.customElements,"define",function(r){return function(i,o,s){try{e({define:{name:i}})}catch(a){console.warn(`Custom element callback failed for ${i}`)}return r.apply(this,[i,o,s])}})}function pF(t,e){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:f,customElementCb:m}=t;t.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),n(...d)},t.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},t.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},t.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},t.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),s(...d)},t.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},t.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),c(...d)},t.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),l(...d)},t.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),u(...d)},t.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},t.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},t.selectionCb=(...d)=>{e.selection&&e.selection(...d),f(...d)},t.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),m(...d)}}function dF(t,e={}){let n=t.doc.defaultView;if(!n)return()=>{};pF(t,e);let r;t.recordDOM&&(r=U0(t,t.doc));let i=eF(t),o=nF(t),s=M0(t),a=rF(t,{win:n}),c=oF(t),l=lF(t),u=()=>{},h=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(u=sF(t,{win:n}),h=P0(t,t.doc),p=aF(t,{win:n}),t.collectFonts&&(f=cF(t)));let m=uF(t),d=hF(t),b=[];for(let v of t.plugins)b.push(v.observer(v.callback,n,v.options));return nt(()=>{Tn.forEach(v=>v.reset()),r==null||r.disconnect(),i(),o(),s(),a(),c(),l(),u(),h(),p(),f(),m(),d(),b.forEach(v=>v())})}function ws(t){return typeof window[t]<"u"}function Is(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}function yF(t,e){let n=ab.get(t);return n||(n=new Map,ab.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}function Gs(t,e,n){if(t instanceof Array)return t.map(r=>Gs(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let r=t.constructor.name,i=mF(t);return{rr_type:r,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Gs(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let r=t.constructor.name,{src:i}=t;return{rr_type:r,src:i}}else if(t instanceof HTMLCanvasElement){let r="HTMLImageElement",i=t.toDataURL();return{rr_type:r,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[Gs(t.data,e,n),t.width,t.height]};if(J0(t,e)||typeof t=="object"){let r=t.constructor.name,i=F0(t,e,n);return{rr_type:r,index:i}}}}return t}function gF(t,e,n,r){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof e.CanvasRenderingContext2D.prototype[s]!="function")continue;let a=Zn(e.CanvasRenderingContext2D.prototype,s,function(c){return function(...l){return Nt(this.canvas,n,r,!0)||setTimeout(()=>{let u=A0(l,e,this);t(this.canvas,{type:dr["2D"],property:s,args:u})},0),c.apply(this,l)}});i.push(a)}catch(a){let c=Sa(e.CanvasRenderingContext2D.prototype,s,{set(l){t(this.canvas,{type:dr["2D"],property:s,args:[l],setter:!0})}});i.push(c)}return()=>{i.forEach(s=>s())}}function bF(t){return t==="experimental-webgl"?"webgl":t}function lb(t,e,n,r){let i=[];try{let o=Zn(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(a,...c){if(!Nt(this,e,n,!0)){let l=bF(a);if("__context"in this||(this.__context=l),r&&["webgl","webgl2"].includes(l))if(c[0]&&typeof c[0]=="object"){let u=c[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[a,...c])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function cb(t,e,n,r,i,o){let s=[],a=Object.getOwnPropertyNames(t);for(let c of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;let l=Zn(t,c,function(u){return function(...h){let p=u.apply(this,h);if(F0(p,o,this),"tagName"in this.canvas&&!Nt(this.canvas,r,i,!0)){let f=A0(h,o,this),m={type:e,property:c,args:f};n(this.canvas,m)}return p}});s.push(l)}catch(l){let u=Sa(t,c,{set(h){n(this.canvas,{type:e,property:c,args:[h],setter:!0})}});s.push(u)}return s}function vF(t,e,n,r){let i=[];return i.push(...cb(e.WebGLRenderingContext.prototype,dr.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...cb(e.WebGL2RenderingContext.prototype,dr.WebGL2,t,n,r,e)),()=>{i.forEach(o=>o())}}function wF(t){let e;try{if(e=ub&&(self.URL||self.webkitURL).createObjectURL(ub),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;base64,"+D0,{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function Ge(t={}){var e,n,r,i,o,s,a,c;let{emit:l,checkoutEveryNms:u,checkoutEveryNth:h,blockClass:p="highlight-block",blockSelector:f=null,ignoreClass:m="highlight-ignore",ignoreSelector:d=null,maskTextClass:b="highlight-mask",maskTextSelector:v=null,inlineStylesheet:I=!0,maskAllInputs:R,maskInputOptions:E,slimDOMOptions:T,maskInputFn:V,maskTextFn:N=hh,hooks:U,packFn:C,sampling:x={},mousemoveWait:M,recordDOM:ot=!0,recordCanvas:lt=!1,recordCrossOriginIframes:y=!1,recordAfter:g=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:Z=!1,collectFonts:D=!1,inlineImages:P=!1,inlineVideos:O=!1,plugins:it,keepIframeSrcFn:ct=()=>!1,privacySetting:Ot="default",ignoreCSSAttributes:We=new Set([]),errorHandler:_0,logger:H0}=t,Oi=z(z({},t.dataURLOptions),(n=(e=t.sampling)==null?void 0:e.canvas)==null?void 0:n.dataURLOptions);qP(_0);let Gi=y?window.parent===window:!0,mr=!1;if(!Gi)try{window.parent.document&&(mr=!1)}catch(st){mr=!0}if(Gi&&!l)throw new Error("emit function is required");if(!Gi&&!mr)return()=>{};M!==void 0&&x.mousemove===void 0&&(x.mousemove=M),ce.reset();let wa=R===!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}:E!==void 0?E:{password:!0},Ia=T===!0||T==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:T==="all",headMetaDescKeywords:T==="all",headTitleMutations:T==="all"}:T||{};zP();let Lh,Ta=0,Xh=st=>{for(let oe of it||[])oe.eventProcessor&&(st=oe.eventProcessor(st));return C&&!mr&&(st=C(st)),st};vt=(st,oe)=>{var gt;let bt=st;if(bt.timestamp=na(),(gt=Tn[0])!=null&>.isFrozen()&&bt.type!==rt.FullSnapshot&&!(bt.type===rt.IncrementalSnapshot&&bt.data.source===et.Mutation)&&Tn.forEach(pe=>pe.unfreeze()),Gi)l==null||l(Xh(bt),oe);else if(mr){let pe={type:"rrweb",event:Xh(bt),origin:window.location.origin,isCheckout:oe};window.parent.postMessage(pe,"*")}if(bt.type===rt.FullSnapshot)Lh=bt,Ta=0;else if(bt.type===rt.IncrementalSnapshot){if(bt.data.source===et.Mutation&&bt.data.isAttachIframe)return;Ta++;let pe=h&&Ta>=h,dt=u&&bt.timestamp-Lh.timestamp>u;(pe||dt)&&Ls(!0)}};let Li=st=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Mutation},st)})},Wh=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Scroll},st)}),Uh=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.CanvasMutation},st)}),z0=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.AdoptedStyleSheet},st)}),qe=new rh({mutationCb:Li,adoptedStyleSheetCb:z0}),tn=new th({mirror:ce,mutationCb:Li,stylesheetManager:qe,recordCrossOriginIframes:y,wrappedEmit:vt});for(let st of it||[])st.getMirror&&st.getMirror({nodeMirror:ce,crossOriginIframeMirror:tn.crossOriginIframeMirror,crossOriginIframeStyleMirror:tn.crossOriginIframeStyleMirror});let Ea=new ih;pi=new nh({recordCanvas:lt,recordLocalVideos:P,recordRemoteVideos:O,mutationCb:Uh,win:window,blockClass:p,blockSelector:f,mirror:ce,sampling:(r=x==null?void 0:x.canvas)==null?void 0:r.fps,samplingManual:(i=x==null?void 0:x.canvas)==null?void 0:i.fpsManual,clearWebGLBuffer:(o=x==null?void 0:x.canvas)==null?void 0:o.clearWebGLBuffer,initialSnapshotDelay:(s=x==null?void 0:x.canvas)==null?void 0:s.initialSnapshotDelay,dataURLOptions:Oi,resizeFactor:(a=x==null?void 0:x.canvas)==null?void 0:a.resizeFactor,maxSnapshotDimension:(c=x==null?void 0:x.canvas)==null?void 0:c.maxSnapshotDimension,logger:H0});let Xi=new eh({mutationCb:Li,scrollCb:Wh,bypassOptions:{blockClass:p,blockSelector:f,maskTextClass:b,maskTextSelector:v,inlineStylesheet:I,maskInputOptions:wa,dataURLOptions:Oi,maskTextFn:N,maskInputFn:V,recordCanvas:lt,inlineImages:P,inlineVideos:O,privacySetting:Ot,sampling:x,slimDOMOptions:Ia,iframeManager:tn,stylesheetManager:qe,canvasManager:pi,keepIframeSrcFn:ct,processedNodeManager:Ea},mirror:ce});Ls=(st=!1)=>{if(!ot)return;vt({type:rt.Meta,data:{href:window.location.href,width:k0(),height:Z0()}},st),qe.reset(),Xi.init(),Tn.forEach(gt=>gt.lock());let oe=e2(document,{mirror:ce,blockClass:p,blockSelector:f,maskTextClass:b,maskTextSelector:v,inlineStylesheet:I,maskAllInputs:wa,maskTextFn:N,maskInputFn:V,slimDOM:Ia,dataURLOptions:Oi,recordCanvas:lt,inlineImages:P,inlineVideos:O,privacySetting:Ot,onSerialize:gt=>{N0(gt,ce)&&tn.addIframe(gt),O0(gt,ce)&&qe.trackLinkElement(gt),Bu(gt)&&Xi.addShadowRoot(q.shadowRoot(gt),document)},onIframeLoad:(gt,bt)=>{tn.attachIframe(gt,bt),Xi.observeAttachShadow(gt)},onStylesheetLoad:(gt,bt)=>{qe.attachLinkElement(gt,bt)},keepIframeSrcFn:ct});if(!oe)return console.warn("Failed to snapshot the document");vt({type:rt.FullSnapshot,data:{node:oe,initialOffset:C0(window)}},st),Tn.forEach(gt=>gt.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&qe.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{let st=[],oe=bt=>{var pe;return nt(dF)({mutationCb:Li,mousemoveCb:(dt,Ra)=>vt({type:rt.IncrementalSnapshot,data:{source:Ra,positions:dt}}),mouseInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MouseInteraction},dt)}),scrollCb:Wh,viewportResizeCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.ViewportResize},dt)}),inputCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Input},dt)}),mediaInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MediaInteraction},dt)}),styleSheetRuleCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.StyleSheetRule},dt)}),styleDeclarationCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.StyleDeclaration},dt)}),canvasMutationCb:Uh,fontCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Font},dt)}),selectionCb:dt=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Selection},dt)})},customElementCb:dt=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.CustomElement},dt)})},blockClass:p,ignoreClass:m,ignoreSelector:d,maskTextClass:b,maskTextSelector:v,maskInputOptions:wa,inlineStylesheet:I,sampling:x,recordDOM:ot,recordCanvas:lt,inlineImages:P,inlineVideos:O,userTriggeredOnInput:Z,collectFonts:D,doc:bt,maskInputFn:V,maskTextFn:N,keepIframeSrcFn:ct,blockSelector:f,slimDOMOptions:Ia,dataURLOptions:Oi,mirror:ce,iframeManager:tn,stylesheetManager:qe,shadowDomManager:Xi,processedNodeManager:Ea,canvasManager:pi,ignoreCSSAttributes:We,privacySetting:Ot,plugins:((pe=it==null?void 0:it.filter(dt=>dt.observer))==null?void 0:pe.map(dt=>({observer:dt.observer,options:dt.options,callback:Ra=>vt({type:rt.Plugin,data:{plugin:dt.name,payload:Ra}})})))||[]},U)};tn.addLoadListener(bt=>{try{st.push(oe(bt.contentDocument))}catch(pe){console.warn(pe)}});let gt=()=>{Ls(),st.push(oe(document)),oa=!0};return document.readyState==="interactive"||document.readyState==="complete"?gt():(st.push(Pt("DOMContentLoaded",()=>{vt({type:rt.DomContentLoaded,data:{}}),g==="DOMContentLoaded"&>()})),st.push(Pt("load",()=>{vt({type:rt.Load,data:{}}),g==="load"&>()},window))),()=>{st.forEach(bt=>bt()),Ea.destroy(),oa=!1,tF()}}catch(st){console.warn(st)}}function xF(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");let e=t.split(","),n=e.lastIndexOf("");for(;n>=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function GF(t,e){let n=e.slice(0,e.length-1);for(let r=0;r<n.length;r++)n[r]=t[n[r].toLowerCase()];return n}function LF(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function XF(t,e,n){let r;if(e.scope===n||e.scope==="all"){r=e.mods.length>0;for(let i in Mt)Object.prototype.hasOwnProperty.call(Mt,i)&&(!Mt[i]&&e.mods.indexOf(+i)>-1||Mt[i]&&e.mods.indexOf(+i)===-1)&&(r=!1);(e.mods.length===0&&!Mt[16]&&!Mt[18]&&!Mt[17]&&!Mt[91]||r||e.shortcut==="*")&&e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function WF(t){let e=Ie["*"],n=t.keyCode||t.which||t.charCode;if((n===93||n===224)&&(n=91),Ut.indexOf(n)===-1&&n!==229&&Ut.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(r=>{let i=fb[r];t[r]&&Ut.indexOf(i)===-1?Ut.push(i):!t[r]&&Ut.indexOf(i)>-1?Ut.splice(Ut.indexOf(i),1):r==="metaKey"&&t[r]&&Ut.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(Ut=Ut.slice(Ut.indexOf(i))))}),!(n in Mt&&(Mt[n]=!0,!e))){for(let r in Mt)Object.prototype.hasOwnProperty.call(Mt,r)&&(Mt[r]=t[fb[r]]);if(t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(Ut.indexOf(17)===-1&&Ut.push(17),Ut.indexOf(18)===-1&&Ut.push(18),Mt[17]=!0,Mt[18]=!0),n in Ie){for(let r=0;r<Ie[n].length;r++)if((t.type==="keydown"&&Ie[n][r].keydown||t.type==="keyup"&&Ie[n][r].keyup)&&Ie[n][r].key){let i=Ie[n][r];XF(t,i,"all")}}}}function AF(t){let e;try{if(e=gb&&(self.URL||self.webkitURL).createObjectURL(gb),!e)throw"";let n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;base64,"+K0,{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}var JG,DG,Oe,YG,zt,KG,bb,Bn,_G,HG,zG,Xs,vb,Sb,qc,$,rr,ai,di,ir,$G,eu,eL,Ib,Tb,nL,tr,nu,A,w,aL,bL,kb,EL,Vb,CL,kL,xL,NL,LL,XL,ah,WL,UL,ML,PL,FL,rg,Lc,Gb,AL,iu,Ws,Cs,JL,jn,ig,DL,YL,KL,Xc,_L,HL,Wc,ou,zL,BL,Us,Zs,su,Xb,Ms,jr,Ub,Mb,iX,oX,sX,aX,lX,cX,uX,hX,pX,Pb,og,yX,gX,Fb,sg,bX,ag,vX,SX,wX,IX,TX,Uc,lu,lh,cu,EX,uu,la,Ps,ch,RX,lg,ie,je,hu,CX,Ht,ca,ZX,kX,Ab,li,VX,ks,In,xX,Jb,NX,OX,GX,LX,XX,WX,UX,MX,cg,PX,FX,DX,pu,KX,ug,_X,du,HX,zX,Fs,Be,BX,jX,QX,As,_b,Hb,fu,z,Yt,or,Y,Dt,$X,qX,tW,eW,nW,k,hg,rW,iW,pg,Et,dg,fg,ns,oW,Mc,Pc,xt,Js,mg,ZW,kW,VW,xW,GW,LW,XW,WW,UW,MW,PW,FW,qb,AW,JW,mi,Qn,yg,YW,KW,gg,dh,_,iv,r2,i2,o2,ue,vg,Sg,gu,fh,wg,bu,sv,a2,ua,Zi,l2,c2,u2,Qr,h2,wu,ha,p2,Iu,pa,d2,Tu,da,av,lv,f2,cv,uv,mh,hv,pv,yh,Le,Rn,yv,zs,gh,m2,gv,bv,yi,bh,y2,g2,b2,v2,S2,Fc,w2,Ig,Tg,Eu,vv,T2,Ru,Cu,E2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v0,TP,EP,S0,w0,RP,CP,ZP,kP,VP,xP,Oh,NP,I0,T0,OP,GP,Hu,qg,tb,Ss,LP,zc,Bc,q,$n,eb,na,_P,ju,rt,et,Jt,He,dr,qn,X0,Qu,rb,$u,hi,nt,Tn,iF,sb,ia,th,eh,nr,fF,oi,mF,ab,F0,A0,J0,D0,SF,ub,nh,rh,ih,vt,Ls,pi,oa,ce,hb,pb,IF,TF,EF,RF,CF,ZF,db,Qc,kF,VF,Ut,Ie,$c,NF,fb,Mt,Y0,OF,mb,yb,Ri,UF,MF,PF,K0,FF,gb,Ne,JF,DF,YF,KF,oh,Ci,Oc=Dh(()=>{"use strict";JG=Object.defineProperty,DG=(t,e,n)=>e in t?JG(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oe=(t,e,n)=>DG(t,typeof e!="symbol"?e+"":e,n),YG=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),zt=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),KG(r,...n)},KG=(t,...e)=>YG(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>(Qy(),jy));n.recordLog(`${t}${e}`,"warn")}catch(n){}}),bb=class{constructor(t,e){Oe(this,"debug"),Oe(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},Bn=class{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 bb)}h(e,n){if(this.Ln)try{return this.qn[e](...n)}catch(r){zt(`Error executing buffered call to ${e}:`,"error",r)}else{this.Jr({method:e,args:n});return}}Jr(e){this.En.length<this.Ys?(this.En.push(e),this.tr=!1):(this.tr||(this.tr=!0,zt("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Ks+=1)}load(e){this.qn=e,this.Ln=!0;for(let{method:n,args:r}of this.En)try{this.qn[n](...r)}catch(i){zt(`Error executing buffered call to ${n}:`,"error",i)}this.En=[]}},_G=Object.defineProperty,HG=Object.defineProperties,zG=Object.getOwnPropertyDescriptors,Xs=Object.getOwnPropertySymbols,vb=Object.prototype.hasOwnProperty,Sb=Object.prototype.propertyIsEnumerable,qc=(t,e,n)=>e in t?_G(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))vb.call(e,n)&&qc(t,n,e[n]);if(Xs)for(var n of Xs(e))Sb.call(e,n)&&qc(t,n,e[n]);return t},rr=(t,e)=>HG(t,zG(e)),ai=(t,e)=>{var n={};for(var r in t)vb.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Xs)for(var r of Xs(t))e.indexOf(r)<0&&Sb.call(t,r)&&(n[r]=t[r]);return n},di=(t,e,n)=>qc(t,typeof e!="symbol"?e+"":e,n),ir=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});$G=/\r\n|[\n\r]/g;eu=class t extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=tL(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=qy(Array.isArray(s)?s:s?[s]:void 0);let p=qy((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=a!=null?a:p==null||(i=p[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:p==null?void 0:p.map(m=>m.start),this.locations=c&&a?c.map(m=>tu(a,m)):p==null?void 0:p.map(m=>tu(m.source,m.start));let f=jG(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(o=h!=null?h:f)!==null&&o!==void 0?o: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}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(e+=`
|
|
23
23
|
|
|
24
24
|
`+qG(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
|
|
25
25
|
|
|
26
|
-
`+
|
|
26
|
+
`+wb(this.source,n);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};eL=class{constructor(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Ib=class{constructor(t,e,n,r,i,o){this.kind=t,this.start=e,this.end=n,this.line=r,this.column=i,this.value=o,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}}},Tb={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"]},nL=new Set(Object.keys(Tb));(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(tr||(tr={}));(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(nu||(nu={}));(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(A||(A={}));(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(w||(w={}));aL=class{constructor(t){let e=new Ib(w.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,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!==w.EOF)do if(t.next)t=t.next;else{let e=cL(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===w.COMMENT);return t}};bL=10,kb=2;EL=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;let r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){let o=sh(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
|
|
27
27
|
|
|
28
28
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
29
29
|
directory. If different versions of "graphql" are the dependencies of other
|
|
@@ -34,7 +34,7 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
|
34
34
|
Duplicate "graphql" modules cannot be used at the same time since different
|
|
35
35
|
versions may have different capabilities and behavior. The data from one
|
|
36
36
|
version used in the function from another could produce confusing and
|
|
37
|
-
spurious results.`)}}return!1},xb=class{constructor(t,e="GraphQL request",n={line:1,column:1}){typeof t=="string"||Ts(!1,`Body must be a string. Received: ${sh(t)}.`),this.body=t,this.name=e,this.locationOffset=n,this.locationOffset.line>0||Ts(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Ts(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};CL=class{constructor(t,e={}){let n=RL(t)?t:new xb(t);this.l=new aL(n),this.Rn=e,this.er=0}parseName(){let t=this.expectToken(w.NAME);return this.node(t,{kind:A.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:A.DOCUMENT,definitions:this.many(w.SOF,this.parseDefinition,w.EOF)})}parseDefinition(){if(this.peek(w.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===w.NAME){switch(e.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 Zt(this.l.source,this.l.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.l.token;if(this.peek(w.BRACE_L))return this.node(t,{kind:A.OPERATION_DEFINITION,operation:tr.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(w.NAME)&&(n=this.parseName()),this.node(t,{kind:A.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(w.NAME);switch(t.value){case"query":return tr.QUERY;case"mutation":return tr.MUTATION;case"subscription":return tr.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(w.PAREN_L,this.parseVariableDefinition,w.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:A.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(w.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(w.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(w.DOLLAR),this.node(t,{kind:A.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:A.SELECTION_SET,selections:this.many(w.BRACE_L,this.parseSelection,w.BRACE_R)})}parseSelection(){return this.peek(w.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(w.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:A.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(w.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(w.PAREN_L,e,w.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(w.COLON),this.node(e,{kind:A.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.l.token;this.expectToken(w.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(w.NAME)?this.node(t,{kind:A.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:A.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.l.token;return this.expectKeyword("fragment"),this.Rn.allowLegacyFragmentVariables===!0?this.node(t,{kind:A.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:A.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.l.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.l.token;switch(e.kind){case w.BRACKET_L:return this.parseList(t);case w.BRACE_L:return this.parseObject(t);case w.INT:return this.advanceLexer(),this.node(e,{kind:A.INT,value:e.value});case w.FLOAT:return this.advanceLexer(),this.node(e,{kind:A.FLOAT,value:e.value});case w.STRING:case w.BLOCK_STRING:return this.parseStringLiteral();case w.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:A.BOOLEAN,value:!0});case"false":return this.node(e,{kind:A.BOOLEAN,value:!1});case"null":return this.node(e,{kind:A.NULL});default:return this.node(e,{kind:A.ENUM,value:e.value})}case w.DOLLAR:if(t)if(this.expectToken(w.DOLLAR),this.l.token.kind===w.NAME){let n=this.l.token.value;throw Zt(this.l.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.l.token;return this.advanceLexer(),this.node(t,{kind:A.STRING,value:t.value,block:t.kind===w.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:A.LIST,values:this.any(w.BRACKET_L,e,w.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:A.OBJECT,fields:this.any(w.BRACE_L,e,w.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(w.COLON),this.node(e,{kind:A.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(w.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(w.AT),this.node(e,{kind:A.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(w.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(w.BRACKET_R),e=this.node(t,{kind:A.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(w.BANG)?this.node(t,{kind:A.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.l.token,{kind:A.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(w.STRING)||this.peek(w.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(w.BRACE_L,this.parseOperationTypeDefinition,w.BRACE_R);return this.node(t,{kind:A.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.l.token,e=this.parseOperationType();this.expectToken(w.COLON);let n=this.parseNamedType();return this.node(t,{kind:A.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:A.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(w.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(w.BRACE_L,this.parseFieldDefinition,w.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(w.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:A.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(w.PAREN_L,this.parseInputValueDef,w.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(w.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(w.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:A.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:A.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(w.EQUALS)?this.delimitedMany(w.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:A.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(w.BRACE_L,this.parseEnumValueDefinition,w.BRACE_R)}parseEnumValueDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:A.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.l.token.value==="true"||this.l.token.value==="false"||this.l.token.value==="null")throw Zt(this.l.source,this.l.token.start,`${ts(this.l.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(w.BRACE_L,this.parseInputValueDef,w.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===w.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(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(w.BRACE_L,this.parseOperationTypeDefinition,w.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(w.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:A.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(w.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(nu,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Rn.noLocation!==!0&&(e.loc=new eL(t,this.l.lastToken,this.l.source)),e}peek(t){return this.l.token.kind===t}expectToken(t){let e=this.l.token;if(e.kind===t)return this.advanceLexer(),e;throw Zt(this.l.source,e.start,`Expected ${Ob(t)}, found ${ts(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===w.NAME&&e.value===t)this.advanceLexer();else throw Zt(this.l.source,e.start,`Expected "${t}", found ${ts(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===w.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Zt(this.l.source,e.start,`Unexpected ${ts(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.Rn,e=this.l.advance();if(t!==void 0&&e.kind!==w.EOF&&(++this.er,this.er>t))throw Zt(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};kL=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;xL=["\\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"],NL=Object.freeze({});LL=80,XL={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>W(t.definitions,`
|
|
37
|
+
spurious results.`)}}return!1},Vb=class{constructor(t,e="GraphQL request",n={line:1,column:1}){typeof t=="string"||Ts(!1,`Body must be a string. Received: ${sh(t)}.`),this.body=t,this.name=e,this.locationOffset=n,this.locationOffset.line>0||Ts(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Ts(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};CL=class{constructor(t,e={}){let n=RL(t)?t:new Vb(t);this.l=new aL(n),this.Rn=e,this.er=0}parseName(){let t=this.expectToken(w.NAME);return this.node(t,{kind:A.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:A.DOCUMENT,definitions:this.many(w.SOF,this.parseDefinition,w.EOF)})}parseDefinition(){if(this.peek(w.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===w.NAME){switch(e.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 Zt(this.l.source,this.l.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.l.token;if(this.peek(w.BRACE_L))return this.node(t,{kind:A.OPERATION_DEFINITION,operation:tr.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(w.NAME)&&(n=this.parseName()),this.node(t,{kind:A.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(w.NAME);switch(t.value){case"query":return tr.QUERY;case"mutation":return tr.MUTATION;case"subscription":return tr.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(w.PAREN_L,this.parseVariableDefinition,w.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:A.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(w.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(w.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(w.DOLLAR),this.node(t,{kind:A.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:A.SELECTION_SET,selections:this.many(w.BRACE_L,this.parseSelection,w.BRACE_R)})}parseSelection(){return this.peek(w.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(w.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:A.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(w.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(w.PAREN_L,e,w.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(w.COLON),this.node(e,{kind:A.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.l.token;this.expectToken(w.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(w.NAME)?this.node(t,{kind:A.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:A.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.l.token;return this.expectKeyword("fragment"),this.Rn.allowLegacyFragmentVariables===!0?this.node(t,{kind:A.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:A.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.l.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.l.token;switch(e.kind){case w.BRACKET_L:return this.parseList(t);case w.BRACE_L:return this.parseObject(t);case w.INT:return this.advanceLexer(),this.node(e,{kind:A.INT,value:e.value});case w.FLOAT:return this.advanceLexer(),this.node(e,{kind:A.FLOAT,value:e.value});case w.STRING:case w.BLOCK_STRING:return this.parseStringLiteral();case w.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:A.BOOLEAN,value:!0});case"false":return this.node(e,{kind:A.BOOLEAN,value:!1});case"null":return this.node(e,{kind:A.NULL});default:return this.node(e,{kind:A.ENUM,value:e.value})}case w.DOLLAR:if(t)if(this.expectToken(w.DOLLAR),this.l.token.kind===w.NAME){let n=this.l.token.value;throw Zt(this.l.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.l.token;return this.advanceLexer(),this.node(t,{kind:A.STRING,value:t.value,block:t.kind===w.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:A.LIST,values:this.any(w.BRACKET_L,e,w.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:A.OBJECT,fields:this.any(w.BRACE_L,e,w.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(w.COLON),this.node(e,{kind:A.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(w.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(w.AT),this.node(e,{kind:A.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(w.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(w.BRACKET_R),e=this.node(t,{kind:A.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(w.BANG)?this.node(t,{kind:A.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.l.token,{kind:A.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(w.STRING)||this.peek(w.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(w.BRACE_L,this.parseOperationTypeDefinition,w.BRACE_R);return this.node(t,{kind:A.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.l.token,e=this.parseOperationType();this.expectToken(w.COLON);let n=this.parseNamedType();return this.node(t,{kind:A.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:A.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(w.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(w.BRACE_L,this.parseFieldDefinition,w.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(w.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:A.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(w.PAREN_L,this.parseInputValueDef,w.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(w.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(w.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:A.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:A.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:A.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(w.EQUALS)?this.delimitedMany(w.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:A.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(w.BRACE_L,this.parseEnumValueDefinition,w.BRACE_R)}parseEnumValueDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:A.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.l.token.value==="true"||this.l.token.value==="false"||this.l.token.value==="null")throw Zt(this.l.source,this.l.token.start,`${ts(this.l.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(w.BRACE_L,this.parseInputValueDef,w.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===w.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(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(w.BRACE_L,this.parseOperationTypeDefinition,w.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:A.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(w.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:A.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(w.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(nu,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Rn.noLocation!==!0&&(e.loc=new eL(t,this.l.lastToken,this.l.source)),e}peek(t){return this.l.token.kind===t}expectToken(t){let e=this.l.token;if(e.kind===t)return this.advanceLexer(),e;throw Zt(this.l.source,e.start,`Expected ${Nb(t)}, found ${ts(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===w.NAME&&e.value===t)this.advanceLexer();else throw Zt(this.l.source,e.start,`Expected "${t}", found ${ts(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===w.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Zt(this.l.source,e.start,`Unexpected ${ts(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.Rn,e=this.l.advance();if(t!==void 0&&e.kind!==w.EOF&&(++this.er,this.er>t))throw Zt(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};kL=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;xL=["\\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"],NL=Object.freeze({});LL=80,XL={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>W(t.definitions,`
|
|
38
38
|
|
|
39
39
|
`)},OperationDefinition:{leave(t){let e=Q("(",W(t.variableDefinitions,", "),")"),n=W([t.operation,W([t.name,e]),W(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+Q(" = ",n)+Q(" ",W(r," "))},SelectionSet:{leave:({selections:t})=>le(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=Q("",t,": ")+e,s=o+Q("(",W(n,", "),")");return s.length>LL&&(s=o+Q(`(
|
|
40
40
|
`,Es(W(n,`
|
|
@@ -43,7 +43,7 @@ spurious results.`)}}return!1},xb=class{constructor(t,e="GraphQL request",n={lin
|
|
|
43
43
|
`)+W(["schema",W(e," "),le(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>Q("",t,`
|
|
44
44
|
`)+W(["scalar",e,W(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>Q("",t,`
|
|
45
45
|
`)+W(["type",e,Q("implements ",W(n," & ")),W(r," "),le(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>Q("",t,`
|
|
46
|
-
`)+e+(
|
|
46
|
+
`)+e+(ng(n)?Q(`(
|
|
47
47
|
`,Es(W(n,`
|
|
48
48
|
`)),`
|
|
49
49
|
)`):Q("(",W(n,", "),")"))+": "+r+Q(" ",W(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>Q("",t,`
|
|
@@ -53,15 +53,15 @@ spurious results.`)}}return!1},xb=class{constructor(t,e="GraphQL request",n={lin
|
|
|
53
53
|
`)+W(["enum",e,W(n," "),le(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>Q("",t,`
|
|
54
54
|
`)+W([e,W(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>Q("",t,`
|
|
55
55
|
`)+W(["input",e,W(n," "),le(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>Q("",t,`
|
|
56
|
-
`)+"directive @"+e+(
|
|
56
|
+
`)+"directive @"+e+(ng(n)?Q(`(
|
|
57
57
|
`,Es(W(n,`
|
|
58
58
|
`)),`
|
|
59
|
-
)`):Q("(",W(n,", "),")"))+(r?" repeatable":"")+" on "+W(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>W(["extend schema",W(t," "),le(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>W(["extend scalar",t,W(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend type",t,Q("implements ",W(e," & ")),W(n," "),le(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend interface",t,Q("implements ",W(e," & ")),W(n," "),le(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>W(["extend union",t,W(e," "),Q("= ",W(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>W(["extend enum",t,W(e," "),le(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>W(["extend input",t,W(e," "),le(n)]," ")}};ah=JSON,WL=t=>t.toUpperCase(),UL=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},ML=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},PL=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},FL=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},ig=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},Lc=t=>{if(typeof t=="string"){let n;try{let r=Nb(t);n=ig(r)}catch(r){}return{query:t,operationName:n}}let e=ig(t);return{query:Gb(t),operationName:e}},Lb=class Rs extends Error{constructor(e,n){let r=`${Rs.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Rs.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Rs)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},AL=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};iu={exports:{}};(function(t,e){var n=typeof self<"u"?self:AL,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var g={next:function(){var Z=y.shift();return{done:Z===void 0,value:Z}}};return a.iterable&&(g[Symbol.iterator]=function(){return g}),g}function m(y){this.map={},y instanceof m?y.forEach(function(g,Z){this.append(Z,g)},this):Array.isArray(y)?y.forEach(function(g){this.append(g[0],g[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(g){this.append(g,y[g])},this)}m.prototype.append=function(y,g){y=h(y),g=p(g);var Z=this.map[y];this.map[y]=Z?Z+", "+g:g},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,g){this.map[h(y)]=p(g)},m.prototype.forEach=function(y,g){for(var Z in this.map)this.map.hasOwnProperty(Z)&&y.call(g,this.map[Z],Z,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(g,Z){y.push(Z)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(g){y.push(g)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(g,Z){y.push([Z,g])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function b(y){return new Promise(function(g,Z){y.onload=function(){g(y.result)},y.onerror=function(){Z(y.error)}})}function v(y){var g=new FileReader,Z=b(g);return g.readAsArrayBuffer(y),Z}function I(y){var g=new FileReader,Z=b(g);return g.readAsText(y),Z}function R(y){for(var g=new Uint8Array(y),Z=new Array(g.length),D=0;D<g.length;D++)Z[D]=String.fromCharCode(g[D]);return Z.join("")}function E(y){if(y.slice)return y.slice(0);var g=new Uint8Array(y.byteLength);return g.set(new Uint8Array(y)),g.buffer}function T(){return this.bodyUsed=!1,this.nr=function(y){this._t=y,y?typeof y=="string"?this.tn=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.oe=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.rr=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.tn=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.H=E(y.buffer),this._t=new Blob([this.H])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.H=E(y):this.tn=y=Object.prototype.toString.call(y):this.tn="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.oe&&this.oe.type?this.headers.set("content-type",this.oe.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.oe)return Promise.resolve(this.oe);if(this.H)return Promise.resolve(new Blob([this.H]));if(this.rr)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.tn]))},this.arrayBuffer=function(){return this.H?d(this)||Promise.resolve(this.H):this.blob().then(v)}),this.text=function(){var y=d(this);if(y)return y;if(this.oe)return I(this.oe);if(this.H)return Promise.resolve(R(this.H));if(this.rr)throw new Error("could not read FormData body as text");return Promise.resolve(this.tn)},a.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var V=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function N(y){var g=y.toUpperCase();return V.indexOf(g)>-1?g:y}function U(y,g){g=g||{};var Z=g.body;if(y instanceof U){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,g.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!Z&&y._t!=null&&(Z=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new m(g.headers)),this.method=N(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");this.nr(Z)}U.prototype.clone=function(){return new U(this,{body:this._t})};function C(y){var g=new FormData;return y.trim().split("&").forEach(function(Z){if(Z){var D=Z.split("="),P=D.shift().replace(/\+/g," "),O=D.join("=").replace(/\+/g," ");g.append(decodeURIComponent(P),decodeURIComponent(O))}}),g}function x(y){var g=new m,Z=y.replace(/\r?\n[\t ]+/g," ");return Z.split(/\r?\n/).forEach(function(D){var P=D.split(":"),O=P.shift().trim();if(O){var it=P.join(":").trim();g.append(O,it)}}),g}T.call(U.prototype);function M(y,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new m(g.headers),this.url=g.url||"",this.nr(y)}T.call(M.prototype),M.prototype.clone=function(){return new M(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},M.error=function(){var y=new M(null,{status:0,statusText:""});return y.type="error",y};var ot=[301,302,303,307,308];M.redirect=function(y,g){if(ot.indexOf(g)===-1)throw new RangeError("Invalid status code");return new M(null,{status:g,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(g,Z){this.message=g,this.name=Z;var D=Error(g);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function lt(y,g){return new Promise(function(Z,D){var P=new U(y,g);if(P.signal&&P.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function it(){O.abort()}O.onload=function(){var ct={status:O.status,statusText:O.statusText,headers:x(O.getAllResponseHeaders()||"")};ct.url="responseURL"in O?O.responseURL:ct.headers.get("X-Request-URL");var Ot="response"in O?O.response:O.responseText;Z(new M(Ot,ct))},O.onerror=function(){D(new TypeError("Network request failed"))},O.ontimeout=function(){D(new TypeError("Network request failed"))},O.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},O.open(P.method,P.url,!0),P.credentials==="include"?O.withCredentials=!0:P.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&a.blob&&(O.responseType="blob"),P.headers.forEach(function(ct,Ot){O.setRequestHeader(Ot,ct)}),P.signal&&(P.signal.addEventListener("abort",it),O.onreadystatechange=function(){O.readyState===4&&P.signal.removeEventListener("abort",it)}),O.send(typeof P._t>"u"?null:P._t)})}return lt.polyfill=!0,o.fetch||(o.fetch=lt,o.Headers=m,o.Request=U,o.Response=M),s.Headers=m,s.Request=U,s.Response=M,s.fetch=lt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(iu,iu.exports);Ws=iu.exports,Cs=Xb(Ws),JL=BG({__proto__:null,default:Cs},[Ws]),jn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||JL&&Ws.Headers&&t instanceof Ws.Headers?e=UL(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},og=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),DL=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(og(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:og(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},YL=t=>e=>ir(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=$({},e.headers),h="",p;t==="POST"?(p=_L(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=DL({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:ah});let f=$({method:t,headers:u,body:p},c),m=r,d=f;if(l){let b=yield Promise.resolve(l(rr($({},f),{url:r,operationName:s,variables:o}))),{url:v}=b,I=ai(b,["url"]);m=v,d=I}return h&&(m=`${m}?${h}`),yield a(m,d)}),KL=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>ir(this,null,function*(){let[r,i,o]=n,s=PL(r,i,o),a=this.requestConfig,{headers:c,fetch:l=Cs,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=ai(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=Lc(s.query);return Xc({url:m,query:s.query,variables:s.variables,headers:$($({},jn(Wc(c))),jn(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(b=>(p&&p(b),b)).catch(b=>{throw p&&p(b),b})})}request(t,...e){return ir(this,null,function*(){let[n,r]=e,i=ML(t,n,r),o=this.requestConfig,{headers:s,fetch:a=Cs,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=ai(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=Lc(i.document);return Xc({url:p,query:f,variables:i.variables,headers:$($({},jn(Wc(s))),jn(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=FL(t,e),i=this.requestConfig,{headers:o}=i,s=ai(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>Lc(l).query),c=r.documents.map(({variables:l})=>l);return Xc({url:this.url,query:a,variables:c,headers:$($({},jn(Wc(o))),jn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:Cs,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},Xc=t=>ir(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=YL(WL((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield HL(c,(n=o.jsonSerializer)!=null?n:ah),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=ai(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return rr($({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new Lb(rr($({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),_L=(t,e,n,r)=>{let i=r!=null?r:ah;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},HL=(t,e)=>ir(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),Wc=t=>typeof t=="function"?t():t,ou={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(ou,ou.exports);zL=ou.exports,BL=Xb(zL),Us=function(){return Us=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Us.apply(this,arguments)},Zs=new Map,su=new Map,Wb=!0,Ms=!1;jr={gql:Ft,resetCaches:tX,disableFragmentWarnings:eX,enableExperimentalFragmentVariables:nX,disableExperimentalFragmentVariables:rX};(function(t){t.gql=jr.gql,t.resetCaches=jr.resetCaches,t.disableFragmentWarnings=jr.disableFragmentWarnings,t.enableExperimentalFragmentVariables=jr.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=jr.disableExperimentalFragmentVariables})(Ft||(Ft={}));Ft.default=Ft;Mb=Ft`
|
|
59
|
+
)`):Q("(",W(n,", "),")"))+(r?" repeatable":"")+" on "+W(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>W(["extend schema",W(t," "),le(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>W(["extend scalar",t,W(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend type",t,Q("implements ",W(e," & ")),W(n," "),le(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>W(["extend interface",t,Q("implements ",W(e," & ")),W(n," "),le(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>W(["extend union",t,W(e," "),Q("= ",W(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>W(["extend enum",t,W(e," "),le(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>W(["extend input",t,W(e," "),le(n)]," ")}};ah=JSON,WL=t=>t.toUpperCase(),UL=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},ML=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},PL=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},FL=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},rg=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},Lc=t=>{if(typeof t=="string"){let n;try{let r=xb(t);n=rg(r)}catch(r){}return{query:t,operationName:n}}let e=rg(t);return{query:Ob(t),operationName:e}},Gb=class Rs extends Error{constructor(e,n){let r=`${Rs.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Rs.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Rs)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},AL=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};iu={exports:{}};(function(t,e){var n=typeof self<"u"?self:AL,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var g={next:function(){var Z=y.shift();return{done:Z===void 0,value:Z}}};return a.iterable&&(g[Symbol.iterator]=function(){return g}),g}function m(y){this.map={},y instanceof m?y.forEach(function(g,Z){this.append(Z,g)},this):Array.isArray(y)?y.forEach(function(g){this.append(g[0],g[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(g){this.append(g,y[g])},this)}m.prototype.append=function(y,g){y=h(y),g=p(g);var Z=this.map[y];this.map[y]=Z?Z+", "+g:g},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,g){this.map[h(y)]=p(g)},m.prototype.forEach=function(y,g){for(var Z in this.map)this.map.hasOwnProperty(Z)&&y.call(g,this.map[Z],Z,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(g,Z){y.push(Z)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(g){y.push(g)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(g,Z){y.push([Z,g])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function b(y){return new Promise(function(g,Z){y.onload=function(){g(y.result)},y.onerror=function(){Z(y.error)}})}function v(y){var g=new FileReader,Z=b(g);return g.readAsArrayBuffer(y),Z}function I(y){var g=new FileReader,Z=b(g);return g.readAsText(y),Z}function R(y){for(var g=new Uint8Array(y),Z=new Array(g.length),D=0;D<g.length;D++)Z[D]=String.fromCharCode(g[D]);return Z.join("")}function E(y){if(y.slice)return y.slice(0);var g=new Uint8Array(y.byteLength);return g.set(new Uint8Array(y)),g.buffer}function T(){return this.bodyUsed=!1,this.nr=function(y){this._t=y,y?typeof y=="string"?this.tn=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.oe=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.rr=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.tn=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.H=E(y.buffer),this._t=new Blob([this.H])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.H=E(y):this.tn=y=Object.prototype.toString.call(y):this.tn="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.oe&&this.oe.type?this.headers.set("content-type",this.oe.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.oe)return Promise.resolve(this.oe);if(this.H)return Promise.resolve(new Blob([this.H]));if(this.rr)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.tn]))},this.arrayBuffer=function(){return this.H?d(this)||Promise.resolve(this.H):this.blob().then(v)}),this.text=function(){var y=d(this);if(y)return y;if(this.oe)return I(this.oe);if(this.H)return Promise.resolve(R(this.H));if(this.rr)throw new Error("could not read FormData body as text");return Promise.resolve(this.tn)},a.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var V=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function N(y){var g=y.toUpperCase();return V.indexOf(g)>-1?g:y}function U(y,g){g=g||{};var Z=g.body;if(y instanceof U){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,g.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!Z&&y._t!=null&&(Z=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new m(g.headers)),this.method=N(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");this.nr(Z)}U.prototype.clone=function(){return new U(this,{body:this._t})};function C(y){var g=new FormData;return y.trim().split("&").forEach(function(Z){if(Z){var D=Z.split("="),P=D.shift().replace(/\+/g," "),O=D.join("=").replace(/\+/g," ");g.append(decodeURIComponent(P),decodeURIComponent(O))}}),g}function x(y){var g=new m,Z=y.replace(/\r?\n[\t ]+/g," ");return Z.split(/\r?\n/).forEach(function(D){var P=D.split(":"),O=P.shift().trim();if(O){var it=P.join(":").trim();g.append(O,it)}}),g}T.call(U.prototype);function M(y,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new m(g.headers),this.url=g.url||"",this.nr(y)}T.call(M.prototype),M.prototype.clone=function(){return new M(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},M.error=function(){var y=new M(null,{status:0,statusText:""});return y.type="error",y};var ot=[301,302,303,307,308];M.redirect=function(y,g){if(ot.indexOf(g)===-1)throw new RangeError("Invalid status code");return new M(null,{status:g,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(g,Z){this.message=g,this.name=Z;var D=Error(g);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function lt(y,g){return new Promise(function(Z,D){var P=new U(y,g);if(P.signal&&P.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function it(){O.abort()}O.onload=function(){var ct={status:O.status,statusText:O.statusText,headers:x(O.getAllResponseHeaders()||"")};ct.url="responseURL"in O?O.responseURL:ct.headers.get("X-Request-URL");var Ot="response"in O?O.response:O.responseText;Z(new M(Ot,ct))},O.onerror=function(){D(new TypeError("Network request failed"))},O.ontimeout=function(){D(new TypeError("Network request failed"))},O.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},O.open(P.method,P.url,!0),P.credentials==="include"?O.withCredentials=!0:P.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&a.blob&&(O.responseType="blob"),P.headers.forEach(function(ct,Ot){O.setRequestHeader(Ot,ct)}),P.signal&&(P.signal.addEventListener("abort",it),O.onreadystatechange=function(){O.readyState===4&&P.signal.removeEventListener("abort",it)}),O.send(typeof P._t>"u"?null:P._t)})}return lt.polyfill=!0,o.fetch||(o.fetch=lt,o.Headers=m,o.Request=U,o.Response=M),s.Headers=m,s.Request=U,s.Response=M,s.fetch=lt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(iu,iu.exports);Ws=iu.exports,Cs=Lb(Ws),JL=BG({__proto__:null,default:Cs},[Ws]),jn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||JL&&Ws.Headers&&t instanceof Ws.Headers?e=UL(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},ig=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),DL=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(ig(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:ig(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},YL=t=>e=>ir(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=$({},e.headers),h="",p;t==="POST"?(p=_L(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=DL({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:ah});let f=$({method:t,headers:u,body:p},c),m=r,d=f;if(l){let b=yield Promise.resolve(l(rr($({},f),{url:r,operationName:s,variables:o}))),{url:v}=b,I=ai(b,["url"]);m=v,d=I}return h&&(m=`${m}?${h}`),yield a(m,d)}),KL=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>ir(this,null,function*(){let[r,i,o]=n,s=PL(r,i,o),a=this.requestConfig,{headers:c,fetch:l=Cs,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=ai(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=Lc(s.query);return Xc({url:m,query:s.query,variables:s.variables,headers:$($({},jn(Wc(c))),jn(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(b=>(p&&p(b),b)).catch(b=>{throw p&&p(b),b})})}request(t,...e){return ir(this,null,function*(){let[n,r]=e,i=ML(t,n,r),o=this.requestConfig,{headers:s,fetch:a=Cs,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=ai(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=Lc(i.document);return Xc({url:p,query:f,variables:i.variables,headers:$($({},jn(Wc(s))),jn(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=FL(t,e),i=this.requestConfig,{headers:o}=i,s=ai(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>Lc(l).query),c=r.documents.map(({variables:l})=>l);return Xc({url:this.url,query:a,variables:c,headers:$($({},jn(Wc(o))),jn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:Cs,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},Xc=t=>ir(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=YL(WL((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield HL(c,(n=o.jsonSerializer)!=null?n:ah),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=ai(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return rr($({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new Gb(rr($({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),_L=(t,e,n,r)=>{let i=r!=null?r:ah;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},HL=(t,e)=>ir(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),Wc=t=>typeof t=="function"?t():t,ou={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(ou,ou.exports);zL=ou.exports,BL=Lb(zL),Us=function(){return Us=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Us.apply(this,arguments)},Zs=new Map,su=new Map,Xb=!0,Ms=!1;jr={gql:Ft,resetCaches:tX,disableFragmentWarnings:eX,enableExperimentalFragmentVariables:nX,disableExperimentalFragmentVariables:rX};(function(t){t.gql=jr.gql,t.resetCaches=jr.resetCaches,t.disableFragmentWarnings=jr.disableFragmentWarnings,t.enableExperimentalFragmentVariables=jr.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=jr.disableExperimentalFragmentVariables})(Ft||(Ft={}));Ft.default=Ft;Ub=Ft`
|
|
60
60
|
fragment MatchParts on MatchConfig {
|
|
61
61
|
regexValue
|
|
62
62
|
matchValue
|
|
63
63
|
}
|
|
64
|
-
`,
|
|
64
|
+
`,Mb=Ft`
|
|
65
65
|
mutation PushPayload(
|
|
66
66
|
$session_secure_id: String!
|
|
67
67
|
$payload_id: ID!
|
|
@@ -226,7 +226,7 @@ spurious results.`)}}return!1},xb=class{constructor(t,e="GraphQL request",n={lin
|
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
${
|
|
229
|
+
${Ub}
|
|
230
230
|
`,uX=Ft`
|
|
231
231
|
query Ignore($id: ID!) {
|
|
232
232
|
ignore(id: $id)
|
|
@@ -280,82 +280,82 @@ spurious results.`)}}return!1},xb=class{constructor(t,e="GraphQL request",n={lin
|
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
${
|
|
284
|
-
`,pX=(t,e,n,r)=>t();Fb=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Fb||{});sg=1e3,yX=1e3*2,gX=14400*1e3,Ab=900*1e3,ag={normal:{bytes:1e7,time:240*1e3},canvas:{bytes:16e6,time:5e3}},bX=100,lg="app.highlight.io",vX="app.launchdarkly.com",SX={"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"},wX="/projects/default",IX=new RegExp("pub\\.(?<domain>.+)");TX={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};Uc=au(TX,{path:"/"}),lu=(t=>(t.CLIENT_ID="highlightClientID",t))(lu||{}),lh="localStorage",cu=!0,EX=class{constructor(){di(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},uu=class{getItem(e){var n;return(n=Uc.get(e))!=null?n:""}setItem(e,n){if(!cu)return;let r=new Date;r.setTime(r.getTime()+Ab),Uc.set(e,n,{expires:r})}removeItem(e){cu&&Uc.remove(e)}},la=new EX,Ps=new uu,ch=()=>{try{switch(lh){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return la}},RX=t=>{lh=t},cg=t=>{cu=t},ie=t=>{try{return ch().getItem(t)}catch(e){return zt("storage","debug",`failed to get item ${t}; using global storage`,e),la.getItem(t)}},je=(t,e)=>{Ps.setItem(t,e);try{return ch().setItem(t,e)}catch(n){return zt("storage","debug",`failed to set item ${t}; using global storage`,n),la.setItem(t,e)}},hu=t=>{Ps.removeItem(t);try{return ch().removeItem(t)}catch(e){return zt("storage","debug",`failed to remove item ${t}; using global storage`,e),la.removeItem(t)}},CX=t=>{if(lh==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}let e=window.localStorage.setItem;window.localStorage.setItem=function(){let[n,r]=arguments;t({keyName:n,keyValue:r}),e.apply(this,[n,r])}},Ht=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(Ht||{}),ca=t=>`${Ht.SESSION_DATA}_${t}`,ZX=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Jb()},kX=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Jb=()=>{var t;return(t=ie(Ht.SESSION_ID))!=null?t:""},li=t=>{je(Ht.SESSION_ID,t)},VX=t=>{let e=ca(t);return JSON.parse(ie(e)||"{}")},ks=t=>{t||(t=Jb());let e=VX(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<Ab)return e;hu(ca(t))},In=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;kX(e),je(ca(e),JSON.stringify(t))},xX=function(){let t=Ps.getItem(Ht.SESSION_ID);li(t);let e=ca(t),n=Ps.getItem(e);try{In(JSON.parse(n))}catch(r){}},Db=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Db||{}),NX=10,OX=1e3,GX=500,LX=[Db.BillingQuotaExceeded.toString()],XX=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>LX.includes(n.message)))===void 0},WX=()=>{let t=(e,n,r,i,o=0)=>ir(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof Lb&&!XX(s))throw s;if(o<NX)return yield new Promise(a=>setTimeout(a,OX+GX*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},UX="$ld:telemetry:session:init",MX="$ld:telemetry:error",ug="$ld:telemetry:track",PX="$ld:telemetry:metric",FX="document_load";DX=class{constructor(t,e){di(this,"client"),di(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(UX,{sessionID:t})}recordGauge(t,e){var n;e.category!==Fb.WebVital&&e.name!==FX||e.name!=="Jank"&&this.client.track(`${PX}:${e.name.toLowerCase()}`,rr($({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>$($({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(MX,rr($({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${ug}:${n}`:ug,rr($({},e),{sessionID:t}))}},pu=class extends Bn{constructor(e,n){super(),di(this,"client"),this.client=new DX(e,n)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(e){return this.h("init",[e])}recordGauge(e,n){return this.h("recordGauge",[e,n])}identify(e,n,r={},i){return this.h("identify",[e,n,r,i])}error(e,n){return this.h("error",[e,n])}track(e,n){return this.h("track",[e,n])}};KX=t=>{let e="",n=t.getAttribute("class"),r=t.getAttribute("id");return r&&(e=e.concat(hg(r,"#"))),n&&(e=e.concat(hg(n,"."))),e===""&&(e=e.concat(t.tagName.toLowerCase())),e},hg=(t,e)=>`${e}${t.trim().split(" ").join(e)}`,_X=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},du=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},HX=class{constructor(t){di(this,"sessionSecureID");try{t!=null&&t.storageMode&&RX(t==null?void 0:t.storageMode),cg(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?xX():cg(!1);let e=ZX(),n=ks(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=du(),li(this.sessionSecureID),In({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){zt("Error initializing @launchdarkly observability plugin","error",e)}}},zX=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Fs=class extends Bn{getSession(){return this.Ln?this.h("getSession",[]):null}start(e){return zX(this,null,function*(){return this.h("start",[e])})}stop(e){return this.h("stop",[e])}getRecordingState(){return this.Ln?this.h("getRecordingState",[]):"NotRecording"}snapshot(e){return this.Ln?this.h("snapshot",[e]):Promise.resolve(void 0)}register(e,n){return this.h("register",[e,n])}};typeof globalThis<"u"?globalThis.LDRecord?Be=globalThis.LDRecord:(Be=new Fs,globalThis.LDRecord=Be):Be=new Fs;BX=Object.defineProperty,jX=Object.defineProperties,QX=Object.getOwnPropertyDescriptors,As=Object.getOwnPropertySymbols,Hb=Object.prototype.hasOwnProperty,zb=Object.prototype.propertyIsEnumerable,fu=(t,e,n)=>e in t?BX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,z=(t,e)=>{for(var n in e||(e={}))Hb.call(e,n)&&fu(t,n,e[n]);if(As)for(var n of As(e))zb.call(e,n)&&fu(t,n,e[n]);return t},Yt=(t,e)=>jX(t,QX(e)),or=(t,e)=>{var n={};for(var r in t)Hb.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&As)for(var r of As(t))e.indexOf(r)<0&&zb.call(t,r)&&(n[r]=t[r]);return n},Y=(t,e,n)=>fu(t,typeof e!="symbol"?e+"":e,n),Dt=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),$X={key:"_sid"},qX="rrweb/sequential-id@1",tW=t=>{let e=$X,n=0;return{name:qX,eventProcessor(r){return Object.assign(r,{[e.key]:++n}),r},options:e}},eW=Object.defineProperty,nW=(t,e,n)=>e in t?eW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k=(t,e,n)=>nW(t,typeof e!="symbol"?e+"":e,n),rW=Object.defineProperty,iW=(t,e,n)=>e in t?rW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dg=(t,e,n)=>iW(t,typeof e!="symbol"?e+"":e,n),Et=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Et||{}),fg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},mg={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ns={},oW=()=>!!globalThis.Zone;Mc={};Pc={};xt={childNodes:sW,parentNode:aW,parentElement:lW,textContent:cW,contains:uW,getRootNode:hW,host:pW,styleSheets:dW,shadowRoot:fW,querySelector:mW,querySelectorAll:yW,mutationObserver:gW,patch:bW};Js=class{constructor(){dg(this,"idNodeMap",new Map),dg(this,"nodeMetaMap",new WeakMap)}getId(e){var n;if(!e)return-1;let r=(n=this.getMeta(e))==null?void 0:n.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){let r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};yg="__rrweb_original__";ZW=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,kW=/^(?:[a-z+]+:)?\/\//i,VW=/^www\..*/i,xW=/^(data:)([^,]*),(.*)/i;GW=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),LW=new RegExp(/[0-9]{9,16}/),XW=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),WW=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),UW=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),MW=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),PW=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),FW=[GW,LW,XW,WW,UW,MW,PW];tv=({maskInputOptions:t,tagName:e,type:n,overwriteRecord:r})=>{let i=n&&n.toLowerCase();return r!=="true"&&(!!t[e.toLowerCase()]||!!(i&&t[i]))},AW=1,JW=new RegExp("[^a-z0-9-_:]"),mi=-2;YW=/^[^ \t\n\r\u000c]+/,KW=/^[, \t\n\r\u000c]+/;bg=new WeakMap;dh={exports:{}},_=String,ov=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};dh.exports=ov();dh.exports.createColors=ov;r2=dh.exports,i2={},o2=Object.freeze(Object.defineProperty({__proto__:null,default:i2},Symbol.toStringTag,{value:"Module"})),ue=n2(o2),Sg=r2,wg=ue,gu=class sv extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,sv)}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(e){if(!this.source)return"";let n=this.source;e==null&&(e=Sg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=Sg.createColors(!0);i=f=>u(p(f)),r=f=>h(f),wg&&(o=f=>wg(f))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),l=String(c).length;return s.slice(a,c).map((u,h)=>{let p=a+1+h,f=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,b=Math.max(0,this.column-d),v=Math.max(this.column+d,this.endColumn+d),I=u.slice(b,v),R=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(f)+o(I)+`
|
|
283
|
+
${Ub}
|
|
284
|
+
`,pX=(t,e,n,r)=>t();Pb=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Pb||{});og=1e3,yX=1e3*2,gX=14400*1e3,Fb=900*1e3,sg={normal:{bytes:1e7,time:240*1e3},canvas:{bytes:16e6,time:5e3}},bX=100,ag="app.highlight.io",vX="app.launchdarkly.com",SX={"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"},wX="/projects/default",IX=new RegExp("pub\\.(?<domain>.+)");TX={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};Uc=au(TX,{path:"/"}),lu=(t=>(t.CLIENT_ID="highlightClientID",t))(lu||{}),lh="localStorage",cu=!0,EX=class{constructor(){di(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},uu=class{getItem(e){var n;return(n=Uc.get(e))!=null?n:""}setItem(e,n){if(!cu)return;let r=new Date;r.setTime(r.getTime()+Fb),Uc.set(e,n,{expires:r})}removeItem(e){cu&&Uc.remove(e)}},la=new EX,Ps=new uu,ch=()=>{try{switch(lh){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return la}},RX=t=>{lh=t},lg=t=>{cu=t},ie=t=>{try{return ch().getItem(t)}catch(e){return zt("storage","debug",`failed to get item ${t}; using global storage`,e),la.getItem(t)}},je=(t,e)=>{Ps.setItem(t,e);try{return ch().setItem(t,e)}catch(n){return zt("storage","debug",`failed to set item ${t}; using global storage`,n),la.setItem(t,e)}},hu=t=>{Ps.removeItem(t);try{return ch().removeItem(t)}catch(e){return zt("storage","debug",`failed to remove item ${t}; using global storage`,e),la.removeItem(t)}},CX=t=>{if(lh==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}let e=window.localStorage.setItem;window.localStorage.setItem=function(){let[n,r]=arguments;t({keyName:n,keyValue:r}),e.apply(this,[n,r])}},Ht=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(Ht||{}),ca=t=>`${Ht.SESSION_DATA}_${t}`,ZX=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Ab()},kX=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Ab=()=>{var t;return(t=ie(Ht.SESSION_ID))!=null?t:""},li=t=>{je(Ht.SESSION_ID,t)},VX=t=>{let e=ca(t);return JSON.parse(ie(e)||"{}")},ks=t=>{t||(t=Ab());let e=VX(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<Fb)return e;hu(ca(t))},In=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;kX(e),je(ca(e),JSON.stringify(t))},xX=function(){let t=Ps.getItem(Ht.SESSION_ID);li(t);let e=ca(t),n=Ps.getItem(e);try{In(JSON.parse(n))}catch(r){}},Jb=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Jb||{}),NX=10,OX=1e3,GX=500,LX=[Jb.BillingQuotaExceeded.toString()],XX=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>LX.includes(n.message)))===void 0},WX=()=>{let t=(e,n,r,i,o=0)=>ir(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof Gb&&!XX(s))throw s;if(o<NX)return yield new Promise(a=>setTimeout(a,OX+GX*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},UX="$ld:telemetry:session:init",MX="$ld:telemetry:error",cg="$ld:telemetry:track",PX="$ld:telemetry:metric",FX="document_load";DX=class{constructor(t,e){di(this,"client"),di(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(UX,{sessionID:t})}recordGauge(t,e){var n;e.category!==Pb.WebVital&&e.name!==FX||e.name!=="Jank"&&this.client.track(`${PX}:${e.name.toLowerCase()}`,rr($({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>$($({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(MX,rr($({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${cg}:${n}`:cg,rr($({},e),{sessionID:t}))}},pu=class extends Bn{constructor(e,n){super(),di(this,"client"),this.client=new DX(e,n)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(e){return this.h("init",[e])}recordGauge(e,n){return this.h("recordGauge",[e,n])}identify(e,n,r={},i){return this.h("identify",[e,n,r,i])}error(e,n){return this.h("error",[e,n])}track(e,n){return this.h("track",[e,n])}};KX=t=>{let e="",n=t.getAttribute("class"),r=t.getAttribute("id");return r&&(e=e.concat(ug(r,"#"))),n&&(e=e.concat(ug(n,"."))),e===""&&(e=e.concat(t.tagName.toLowerCase())),e},ug=(t,e)=>`${e}${t.trim().split(" ").join(e)}`,_X=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},du=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},HX=class{constructor(t){di(this,"sessionSecureID");try{t!=null&&t.storageMode&&RX(t==null?void 0:t.storageMode),lg(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?xX():lg(!1);let e=ZX(),n=ks(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=du(),li(this.sessionSecureID),In({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){zt("Error initializing @launchdarkly observability plugin","error",e)}}},zX=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),Fs=class extends Bn{getSession(){return this.Ln?this.h("getSession",[]):null}start(e){return zX(this,null,function*(){return this.h("start",[e])})}stop(e){return this.h("stop",[e])}getRecordingState(){return this.Ln?this.h("getRecordingState",[]):"NotRecording"}snapshot(e){return this.Ln?this.h("snapshot",[e]):Promise.resolve(void 0)}register(e,n){return this.h("register",[e,n])}};typeof globalThis<"u"?globalThis.LDRecord?Be=globalThis.LDRecord:(Be=new Fs,globalThis.LDRecord=Be):Be=new Fs;BX=Object.defineProperty,jX=Object.defineProperties,QX=Object.getOwnPropertyDescriptors,As=Object.getOwnPropertySymbols,_b=Object.prototype.hasOwnProperty,Hb=Object.prototype.propertyIsEnumerable,fu=(t,e,n)=>e in t?BX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,z=(t,e)=>{for(var n in e||(e={}))_b.call(e,n)&&fu(t,n,e[n]);if(As)for(var n of As(e))Hb.call(e,n)&&fu(t,n,e[n]);return t},Yt=(t,e)=>jX(t,QX(e)),or=(t,e)=>{var n={};for(var r in t)_b.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&As)for(var r of As(t))e.indexOf(r)<0&&Hb.call(t,r)&&(n[r]=t[r]);return n},Y=(t,e,n)=>fu(t,typeof e!="symbol"?e+"":e,n),Dt=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),$X={key:"_sid"},qX="rrweb/sequential-id@1",tW=t=>{let e=$X,n=0;return{name:qX,eventProcessor(r){return Object.assign(r,{[e.key]:++n}),r},options:e}},eW=Object.defineProperty,nW=(t,e,n)=>e in t?eW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k=(t,e,n)=>nW(t,typeof e!="symbol"?e+"":e,n),rW=Object.defineProperty,iW=(t,e,n)=>e in t?rW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pg=(t,e,n)=>iW(t,typeof e!="symbol"?e+"":e,n),Et=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Et||{}),dg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fg={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ns={},oW=()=>!!globalThis.Zone;Mc={};Pc={};xt={childNodes:sW,parentNode:aW,parentElement:lW,textContent:cW,contains:uW,getRootNode:hW,host:pW,styleSheets:dW,shadowRoot:fW,querySelector:mW,querySelectorAll:yW,mutationObserver:gW,patch:bW};Js=class{constructor(){pg(this,"idNodeMap",new Map),pg(this,"nodeMetaMap",new WeakMap)}getId(e){var n;if(!e)return-1;let r=(n=this.getMeta(e))==null?void 0:n.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){let r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};mg="__rrweb_original__";ZW=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,kW=/^(?:[a-z+]+:)?\/\//i,VW=/^www\..*/i,xW=/^(data:)([^,]*),(.*)/i;GW=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),LW=new RegExp(/[0-9]{9,16}/),XW=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),WW=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),UW=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),MW=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),PW=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),FW=[GW,LW,XW,WW,UW,MW,PW];qb=({maskInputOptions:t,tagName:e,type:n,overwriteRecord:r})=>{let i=n&&n.toLowerCase();return r!=="true"&&(!!t[e.toLowerCase()]||!!(i&&t[i]))},AW=1,JW=new RegExp("[^a-z0-9-_:]"),mi=-2;YW=/^[^ \t\n\r\u000c]+/,KW=/^[, \t\n\r\u000c]+/;gg=new WeakMap;dh={exports:{}},_=String,iv=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};dh.exports=iv();dh.exports.createColors=iv;r2=dh.exports,i2={},o2=Object.freeze(Object.defineProperty({__proto__:null,default:i2},Symbol.toStringTag,{value:"Module"})),ue=n2(o2),vg=r2,Sg=ue,gu=class ov extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ov)}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(e){if(!this.source)return"";let n=this.source;e==null&&(e=vg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=vg.createColors(!0);i=f=>u(p(f)),r=f=>h(f),Sg&&(o=f=>Sg(f))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),l=String(c).length;return s.slice(a,c).map((u,h)=>{let p=a+1+h,f=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,b=Math.max(0,this.column-d),v=Math.max(this.column+d,this.endColumn+d),I=u.slice(b,v),R=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(f)+o(I)+`
|
|
285
285
|
`+R+i("^")}let m=r(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(f)+o(u)+`
|
|
286
286
|
`+m+i("^")}return" "+r(f)+o(u)}).join(`
|
|
287
287
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
288
288
|
|
|
289
289
|
`+e+`
|
|
290
|
-
`),this.name+": "+this.message+e}},fh=gu;gu.default=gu;
|
|
290
|
+
`),this.name+": "+this.message+e}},fh=gu;gu.default=gu;wg={after:`
|
|
291
291
|
`,beforeClose:`
|
|
292
292
|
`,beforeComment:`
|
|
293
293
|
`,beforeDecl:`
|
|
294
294
|
`,beforeOpen:" ",beforeRule:`
|
|
295
295
|
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};bu=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;t.type==="decl"?n=this.raw(t,null,"beforeDecl"):t.type==="comment"?n=this.raw(t,null,"beforeComment"):e==="before"?n=this.raw(t,null,"beforeRule"):n=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(n.includes(`
|
|
296
|
-
`)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return
|
|
296
|
+
`)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return wg[n];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(t,n);{let s="raw"+s2(n);this[s]?r=this[s](o,t):o.walk(a=>{if(r=a.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=wg[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return e=n.raws.after,e.includes(`
|
|
297
297
|
`)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let n;return t.walkComments(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
|
|
298
298
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(t,e){let n;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
|
|
299
299
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(t){let e;return t.walk(n=>{if(n.type!=="decl"&&(e=n.raws.between,typeof e<"u"))return!1}),e}rawBeforeRule(t){let e;return t.walk(n=>{if(n.nodes&&(n.parent!==t||t.first!==n)&&typeof n.raws.before<"u")return e=n.raws.before,e.includes(`
|
|
300
300
|
`)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(n=>{if(typeof n.raws.between<"u")return e=n.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length===0&&(e=n.raws.after,typeof e<"u"))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(n=>{let r=n.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof n.raws.before<"u"){let i=n.raws.before.split(`
|
|
301
|
-
`);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},
|
|
302
|
-
`?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice($r(r,this.source.start),$r(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new c2().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=u2){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},ha=wu;wu.default=wu;p2=ha,Iu=class extends p2{constructor(t){super(t),this.type="comment"}},pa=Iu;Iu.default=Iu;d2=ha,Tu=class extends d2{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Yt(z({},t),{value:String(t.value)})),super(t),this.type="decl"}},da=Tu;Tu.default=Tu;lv=pa,cv=da,f2=ha,{isClean:uv,my:hv}=Zi;Le=class yv extends f2{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=fv(pv(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new cv(e)]}else if(e.selector||e.selectors)e=[new yh(e)];else if(e.name)e=[new mh(e)];else if(e.text)e=[new lv(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[hv]||yv.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[uv]&&mv(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Le.registerParse=t=>{pv=t};Le.registerRule=t=>{yh=t};Le.registerAtRule=t=>{mh=t};Le.registerRoot=t=>{dv=t};Rn=Le;Le.default=Le;Le.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,mh.prototype):t.type==="rule"?Object.setPrototypeOf(t,yh.prototype):t.type==="decl"?Object.setPrototypeOf(t,cv.prototype):t.type==="comment"?Object.setPrototypeOf(t,lv.prototype):t.type==="root"&&Object.setPrototypeOf(t,dv.prototype),t[hv]=!0,t.nodes&&t.nodes.forEach(e=>{Le.rebuild(e)})};gv=Rn,zs=class extends gv{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},gh=zs;zs.default=zs;gv.registerAtRule(zs);m2=Rn,yi=class extends m2{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new bv(new vv,this,t).stringify()}};yi.registerLazyResult=t=>{bv=t};yi.registerProcessor=t=>{vv=t};bh=yi;yi.default=yi;y2="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",g2=(t=21)=>{let e="",n=t|0;for(;n--;)e+=y2[Math.random()*64|0];return e},b2={nanoid:g2},{existsSync:v2,readFileSync:S2}=ue,{dirname:Fc,join:w2}=ue,{SourceMapConsumer:Tg,SourceMapGenerator:Eg}=ue;Eu=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Fc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Tg(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return I2(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.bl=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Fc(t),v2(t))return this.mapFile=t,S2(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof Tg)return Eg.fromSourceMap(e).toString();if(e instanceof Eg)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=w2(Fc(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Sv=Eu;Eu.default=Eu;({nanoid:T2}=b2),{isAbsolute:Ru,resolve:Cu}=ue,{SourceMapConsumer:E2,SourceMapGenerator:R2}=ue,{fileURLToPath:Rg,pathToFileURL:is}=ue,Cg=fh,C2=Sv,Ac=ue,Jc=Symbol("fromOffsetCache"),Z2=!!(E2&&R2),Zg=!!(Cu&&Ru),Bs=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Zg||/^\w+:\/\//.test(e.from)||Ru(e.from)?this.file=e.from:this.file=Cu(e.from)),Zg&&Z2){let n=new C2(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+T2(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new Cg(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new Cg(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(is&&(s.input.url=is(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Jc])n=this[Jc];else{let i=this.css.split(`
|
|
303
|
-
`);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[Jc]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Cu(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;Ru(o.source)?a=is(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||is(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(
|
|
304
|
-
`," "];return gi.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},
|
|
301
|
+
`);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},sv=bu;bu.default=bu;a2=sv;ua=vu;vu.default=vu;Zi={};Zi.isClean=Symbol("isClean");Zi.my=Symbol("my");l2=fh,c2=sv,u2=ua,{isClean:Qr,my:h2}=Zi;wu=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Qr]=!1,this[h2]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let n of t[e])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=Su(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new l2(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,n){return t[e]===n||(t[e]=n,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[Qr]=!0}markDirty(){if(this[Qr]){this[Qr]=!1;let t=this;for(;t=t.parent;)t[Qr]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r=n.slice($r(n,this.source.start),$r(n,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,n=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=$r(r,this.source.start),o=i+t;for(let s=i;s<o;s++)r[s]===`
|
|
302
|
+
`?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice($r(r,this.source.start),$r(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new c2().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=u2){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},ha=wu;wu.default=wu;p2=ha,Iu=class extends p2{constructor(t){super(t),this.type="comment"}},pa=Iu;Iu.default=Iu;d2=ha,Tu=class extends d2{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Yt(z({},t),{value:String(t.value)})),super(t),this.type="decl"}},da=Tu;Tu.default=Tu;av=pa,lv=da,f2=ha,{isClean:cv,my:uv}=Zi;Le=class mv extends f2{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=dv(hv(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new lv(e)]}else if(e.selector||e.selectors)e=[new yh(e)];else if(e.name)e=[new mh(e)];else if(e.text)e=[new av(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[uv]||mv.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[cv]&&fv(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Le.registerParse=t=>{hv=t};Le.registerRule=t=>{yh=t};Le.registerAtRule=t=>{mh=t};Le.registerRoot=t=>{pv=t};Rn=Le;Le.default=Le;Le.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,mh.prototype):t.type==="rule"?Object.setPrototypeOf(t,yh.prototype):t.type==="decl"?Object.setPrototypeOf(t,lv.prototype):t.type==="comment"?Object.setPrototypeOf(t,av.prototype):t.type==="root"&&Object.setPrototypeOf(t,pv.prototype),t[uv]=!0,t.nodes&&t.nodes.forEach(e=>{Le.rebuild(e)})};yv=Rn,zs=class extends yv{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},gh=zs;zs.default=zs;yv.registerAtRule(zs);m2=Rn,yi=class extends m2{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new gv(new bv,this,t).stringify()}};yi.registerLazyResult=t=>{gv=t};yi.registerProcessor=t=>{bv=t};bh=yi;yi.default=yi;y2="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",g2=(t=21)=>{let e="",n=t|0;for(;n--;)e+=y2[Math.random()*64|0];return e},b2={nanoid:g2},{existsSync:v2,readFileSync:S2}=ue,{dirname:Fc,join:w2}=ue,{SourceMapConsumer:Ig,SourceMapGenerator:Tg}=ue;Eu=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Fc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Ig(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return I2(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.bl=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Fc(t),v2(t))return this.mapFile=t,S2(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof Ig)return Tg.fromSourceMap(e).toString();if(e instanceof Tg)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=w2(Fc(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},vv=Eu;Eu.default=Eu;({nanoid:T2}=b2),{isAbsolute:Ru,resolve:Cu}=ue,{SourceMapConsumer:E2,SourceMapGenerator:R2}=ue,{fileURLToPath:Eg,pathToFileURL:is}=ue,Rg=fh,C2=vv,Ac=ue,Jc=Symbol("fromOffsetCache"),Z2=!!(E2&&R2),Cg=!!(Cu&&Ru),Bs=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Cg||/^\w+:\/\//.test(e.from)||Ru(e.from)?this.file=e.from:this.file=Cu(e.from)),Cg&&Z2){let n=new C2(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+T2(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new Rg(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new Rg(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(is&&(s.input.url=is(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Jc])n=this[Jc];else{let i=this.css.split(`
|
|
303
|
+
`);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[Jc]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Cu(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;Ru(o.source)?a=is(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||is(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Eg)c.file=Eg(a);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=z({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},fa=Bs;Bs.default=Bs;Ac&&Ac.registerInput&&Ac.registerInput(Bs);Sv=Rn,ar=class extends Sv{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e){if(n==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let n=this.index(t);return!e&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new wv(new Iv,this,t).stringify()}};ar.registerLazyResult=t=>{wv=t};ar.registerProcessor=t=>{Iv=t};ki=ar;ar.default=ar;Sv.registerRoot(ar);gi={comma(t){return gi.split(t,[","],!0)},space(t){let e=[" ",`
|
|
304
|
+
`," "];return gi.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},Tv=gi;gi.default=gi;Ev=Rn,k2=Tv,js=class extends Ev{get selectors(){return k2.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}},vh=js;js.default=js;Ev.registerRule(js);V2=gh,x2=pa,N2=da,O2=fa,G2=vv,L2=ki,X2=vh;W2=bi;bi.default=bi;({dirname:Vs,relative:Rv,resolve:Cv,sep:Zv}=ue),{SourceMapConsumer:kv,SourceMapGenerator:xs}=ue,{pathToFileURL:Zg}=ue,U2=fa,M2=!!(kv&&xs),P2=!!(Vs&&Cv&&Rv&&Zv),F2=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let e=`
|
|
305
305
|
`;this.css.includes(`\r
|
|
306
306
|
`)&&(e=`\r
|
|
307
|
-
`),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||Vs(t.file),r;this.mapOpts.sourcesContent===!1?(r=new
|
|
308
|
-
`),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.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(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?Vs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Vs(Zv(n,this.mapOpts.annotation)));let r=Cv(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new U2(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(kg){let n=kg(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;kv==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},xv=F2,Dc=39,Vg=34,os=92,xg=47,ss=10,qr=32,as=12,ls=9,cs=13,A2=91,J2=93,D2=40,Y2=41,K2=123,_2=125,H2=59,z2=42,B2=58,j2=64,us=/[\t\n\f\r "#'()/;[\\\]{}]/g,hs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Q2=/.[\r\n"'(/\\]/,Ng=/[\da-f]/i,$2=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,b=[],v=[];function I(){return d}function R(N){throw t.error("Unclosed "+N,d)}function E(){return v.length===0&&d>=m}function T(N){if(v.length)return v.pop();if(d>=m)return;let U=N?N.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case ss:case qr:case ls:case cs:case as:{a=d;do a+=1,i=n.charCodeAt(a);while(i===qr||i===ss||i===ls||i===cs||i===as);l=["space",n.slice(d,a)],d=a-1;break}case A2:case J2:case K2:case _2:case B2:case H2:case Y2:{let C=String.fromCharCode(i);l=[C,C,d];break}case D2:{if(f=b.length?b.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Dc&&p!==Vg&&p!==qr&&p!==ss&&p!==ls&&p!==as&&p!==cs){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||U){a=d;break}else R("bracket");for(h=a;n.charCodeAt(h-1)===os;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||Q2.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Dc:case Vg:{c=i===Dc?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||U){a=d+1;break}else R("string");for(h=a;n.charCodeAt(h-1)===os;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case j2:{us.lastIndex=d+1,us.test(n),us.lastIndex===0?a=n.length-1:a=us.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case os:{for(a=d,s=!0;n.charCodeAt(a+1)===os;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==xg&&i!==qr&&i!==ss&&i!==ls&&i!==cs&&i!==as&&(a+=1,Ng.test(n.charAt(a)))){for(;Ng.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===qr&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===xg&&n.charCodeAt(d+1)===z2?(a=n.indexOf("*/",d+2)+1,a===0&&(r||U?a=n.length:R("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(hs.lastIndex=d+1,hs.test(n),hs.lastIndex===0?a=n.length-1:a=hs.lastIndex-2,l=["word",n.slice(d,a+1),d,a],b.push(l),d=a);break}}return d++,l}function V(N){v.push(N)}return{back:V,endOfFile:E,nextToken:T,position:I}},q2=gh,tU=pa,eU=da,nU=ki,Og=vh,rU=$2,Gg={empty:!0,space:!0};oU=class{constructor(t){this.input=t,this.root=new nU,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new q2;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new tU;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=rU(this.input)}decl(t,e){let n=new eU;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||iU(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new Og;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!Gg[u]&&!Gg[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new Og;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},sU=oU,aU=Rn,lU=fa,cU=sU;Sh=Qs;Qs.default=Qs;aU.registerParse(Qs);Zu=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[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}},Nv=Zu;Zu.default=Zu;uU=Nv,ku=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new uU(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},wh=ku;ku.default=ku;Lg={},Ov=function(t){Lg[t]||(Lg[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},hU=Rn,pU=bh,dU=xv,fU=Sh,Xg=wh,mU=ki,yU=ua,{isClean:Se,my:gU}=Zi,bU=Ov,vU={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},SU={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},wU={Once:!0,postcssPlugin:!0,prepare:!0},lr=0;xu={},cr=class Lv{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=Vu(n);else if(n instanceof Lv||n instanceof Xg)i=Vu(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=fU;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[gU]&&hU.rebuild(i)}this.result=new Xg(e,i,r),this.helpers=Yt(z({},xu),{postcss:xu,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?z(z({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!SU[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!wU[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Dt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(ti(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];){e[Se]=!0;let n=[Wg(e)];for(;n.length>0;){let r=this.visitTick(n);if(ti(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ti(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=yU;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new dU(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){let n=this.runOnRoot(e);if(ti(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];)e[Se]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||bU("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ti(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Se]){a[Se]=!0,e.push(Wg(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===lr){r.nodes&&r.nodes.length&&(r[Se]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[Se]=!0;let n=Gv(e);for(let r of n)if(r===lr)e.nodes&&e.each(i=>{i[Se]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};cr.registerPostcss=t=>{xu=t};Xv=cr;cr.default=cr;mU.registerLazyResult(cr);pU.registerLazyResult(cr);IU=xv,TU=Sh,EU=wh,RU=ua,CU=Ov,Nu=class{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.sn)return this.sn;let t,e=TU;try{t=e(this.vr,this.fn)}catch(n){this.error=n}if(this.error)throw this.error;return this.sn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.Co=t,this.vr=e,this.fn=n,this.vl=void 0;let r,i=RU;this.result=new EU(this.Co,r,this.fn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new IU(i,r,this.fn,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.fn||CU("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(t,e)}toString(){return this.vr}warnings(){return[]}},ZU=Nu;Nu.default=Nu;kU=bh,VU=Xv,xU=ZU,NU=ki,vi=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new xU(this,t,e):new VU(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},OU=vi;vi.default=vi;NU.registerProcessor(vi);kU.registerProcessor(vi);Wv=gh,Uv=pa,GU=Rn,LU=fh,Mv=da,Pv=bh,XU=W2,WU=fa,UU=Xv,MU=Ev,PU=ha,FU=Sh,Ih=OU,AU=wh,Fv=ki,Av=vh,JU=ua,DU=Nv;ht.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
307
|
+
`),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||Vs(t.file),r;this.mapOpts.sourcesContent===!1?(r=new kv(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),P2&&M2&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=xs.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new xs({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 xs({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,n="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=s.match(/\n/g),o?(t+=o.length,i=s.lastIndexOf(`
|
|
308
|
+
`),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.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(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?Vs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Vs(Cv(n,this.mapOpts.annotation)));let r=Rv(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new U2(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Zg){let n=Zg(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;Zv==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},Vv=F2,Dc=39,kg=34,os=92,Vg=47,ss=10,qr=32,as=12,ls=9,cs=13,A2=91,J2=93,D2=40,Y2=41,K2=123,_2=125,H2=59,z2=42,B2=58,j2=64,us=/[\t\n\f\r "#'()/;[\\\]{}]/g,hs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Q2=/.[\r\n"'(/\\]/,xg=/[\da-f]/i,$2=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,b=[],v=[];function I(){return d}function R(N){throw t.error("Unclosed "+N,d)}function E(){return v.length===0&&d>=m}function T(N){if(v.length)return v.pop();if(d>=m)return;let U=N?N.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case ss:case qr:case ls:case cs:case as:{a=d;do a+=1,i=n.charCodeAt(a);while(i===qr||i===ss||i===ls||i===cs||i===as);l=["space",n.slice(d,a)],d=a-1;break}case A2:case J2:case K2:case _2:case B2:case H2:case Y2:{let C=String.fromCharCode(i);l=[C,C,d];break}case D2:{if(f=b.length?b.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Dc&&p!==kg&&p!==qr&&p!==ss&&p!==ls&&p!==as&&p!==cs){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||U){a=d;break}else R("bracket");for(h=a;n.charCodeAt(h-1)===os;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||Q2.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Dc:case kg:{c=i===Dc?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||U){a=d+1;break}else R("string");for(h=a;n.charCodeAt(h-1)===os;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case j2:{us.lastIndex=d+1,us.test(n),us.lastIndex===0?a=n.length-1:a=us.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case os:{for(a=d,s=!0;n.charCodeAt(a+1)===os;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==Vg&&i!==qr&&i!==ss&&i!==ls&&i!==cs&&i!==as&&(a+=1,xg.test(n.charAt(a)))){for(;xg.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===qr&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===Vg&&n.charCodeAt(d+1)===z2?(a=n.indexOf("*/",d+2)+1,a===0&&(r||U?a=n.length:R("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(hs.lastIndex=d+1,hs.test(n),hs.lastIndex===0?a=n.length-1:a=hs.lastIndex-2,l=["word",n.slice(d,a+1),d,a],b.push(l),d=a);break}}return d++,l}function V(N){v.push(N)}return{back:V,endOfFile:E,nextToken:T,position:I}},q2=gh,tU=pa,eU=da,nU=ki,Ng=vh,rU=$2,Og={empty:!0,space:!0};oU=class{constructor(t){this.input=t,this.root=new nU,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new q2;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new tU;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=rU(this.input)}decl(t,e){let n=new eU;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||iU(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new Ng;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!Og[u]&&!Og[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new Ng;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},sU=oU,aU=Rn,lU=fa,cU=sU;Sh=Qs;Qs.default=Qs;aU.registerParse(Qs);Zu=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[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}},xv=Zu;Zu.default=Zu;uU=xv,ku=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new uU(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},wh=ku;ku.default=ku;Gg={},Nv=function(t){Gg[t]||(Gg[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},hU=Rn,pU=bh,dU=Vv,fU=Sh,Lg=wh,mU=ki,yU=ua,{isClean:Se,my:gU}=Zi,bU=Nv,vU={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},SU={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},wU={Once:!0,postcssPlugin:!0,prepare:!0},lr=0;xu={},cr=class Gv{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=Vu(n);else if(n instanceof Gv||n instanceof Lg)i=Vu(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=fU;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[gU]&&hU.rebuild(i)}this.result=new Lg(e,i,r),this.helpers=Yt(z({},xu),{postcss:xu,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?z(z({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!SU[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!wU[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Dt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(ti(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];){e[Se]=!0;let n=[Xg(e)];for(;n.length>0;){let r=this.visitTick(n);if(ti(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ti(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=yU;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new dU(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){let n=this.runOnRoot(e);if(ti(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];)e[Se]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||bU("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ti(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[Se]){a[Se]=!0,e.push(Xg(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===lr){r.nodes&&r.nodes.length&&(r[Se]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[Se]=!0;let n=Ov(e);for(let r of n)if(r===lr)e.nodes&&e.each(i=>{i[Se]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};cr.registerPostcss=t=>{xu=t};Lv=cr;cr.default=cr;mU.registerLazyResult(cr);pU.registerLazyResult(cr);IU=Vv,TU=Sh,EU=wh,RU=ua,CU=Nv,Nu=class{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.sn)return this.sn;let t,e=TU;try{t=e(this.vr,this.fn)}catch(n){this.error=n}if(this.error)throw this.error;return this.sn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.Co=t,this.vr=e,this.fn=n,this.vl=void 0;let r,i=RU;this.result=new EU(this.Co,r,this.fn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new IU(i,r,this.fn,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.fn||CU("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(t,e)}toString(){return this.vr}warnings(){return[]}},ZU=Nu;Nu.default=Nu;kU=bh,VU=Lv,xU=ZU,NU=ki,vi=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new xU(this,t,e):new VU(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},OU=vi;vi.default=vi;NU.registerProcessor(vi);kU.registerProcessor(vi);Xv=gh,Wv=pa,GU=Rn,LU=fh,Uv=da,Mv=bh,XU=W2,WU=fa,UU=Lv,MU=Tv,PU=ha,FU=Sh,Ih=OU,AU=wh,Pv=ki,Fv=vh,JU=ua,DU=xv;ht.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
309
309
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
310
|
-
https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new Ih().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return ht([r(a)]).process(o,s)},r};ht.stringify=JU;ht.parse=FU;ht.fromJSON=XU;ht.list=MU;ht.comment=t=>new
|
|
310
|
+
https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new Ih().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return ht([r(a)]).process(o,s)},r};ht.stringify=JU;ht.parse=FU;ht.fromJSON=XU;ht.list=MU;ht.comment=t=>new Wv(t);ht.atRule=t=>new Xv(t);ht.decl=t=>new Uv(t);ht.rule=t=>new Fv(t);ht.root=t=>new Pv(t);ht.document=t=>new Mv(t);ht.CssSyntaxError=LU;ht.Declaration=Uv;ht.Container=GU;ht.Processor=Ih;ht.Document=Mv;ht.Comment=Wv;ht.Warning=DU;ht.AtRule=Xv;ht.Result=AU;ht.Input=WU;ht.Rule=Fv;ht.Root=Pv;ht.Node=PU;UU.registerPostcss(ht);ht.default=ht;YU=Object.defineProperty,KU=(t,e,n)=>e in t?YU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,re=(t,e,n)=>KU(t,typeof e!="symbol"?e+"":e,n);Th={exports:{}},H=String,Av=function(){return{isColorSupported:!1,reset:H,bold:H,dim:H,italic:H,underline:H,inverse:H,hidden:H,strikethrough:H,black:H,red:H,green:H,yellow:H,blue:H,magenta:H,cyan:H,white:H,gray:H,bgBlack:H,bgRed:H,bgGreen:H,bgYellow:H,bgBlue:H,bgMagenta:H,bgCyan:H,bgWhite:H,blackBright:H,redBright:H,greenBright:H,yellowBright:H,blueBright:H,magentaBright:H,cyanBright:H,whiteBright:H,bgBlackBright:H,bgRedBright:H,bgGreenBright:H,bgYellowBright:H,bgBlueBright:H,bgMagentaBright:H,bgCyanBright:H,bgWhiteBright:H}};Th.exports=Av();Th.exports.createColors=Av;HU=Th.exports,zU={},BU=Object.freeze(Object.defineProperty({__proto__:null,default:zU},Symbol.toStringTag,{value:"Module"})),he=_U(BU),Wg=HU,Ug=he,Ou=class Jv extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Jv)}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(e){if(!this.source)return"";let n=this.source;e==null&&(e=Wg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=Wg.createColors(!0);i=f=>u(p(f)),r=f=>h(f),Ug&&(o=f=>Ug(f))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,s.length),l=String(c).length;return s.slice(a,c).map((u,h)=>{let p=a+1+h,f=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,b=Math.max(0,this.column-d),v=Math.max(this.column+d,this.endColumn+d),I=u.slice(b,v),R=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(f)+o(I)+`
|
|
311
311
|
`+R+i("^")}let m=r(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(f)+o(u)+`
|
|
312
312
|
`+m+i("^")}return" "+r(f)+o(u)}).join(`
|
|
313
313
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
314
314
|
|
|
315
315
|
`+e+`
|
|
316
|
-
`),this.name+": "+this.message+e}},Eh=Ou;Ou.default=Ou;
|
|
316
|
+
`),this.name+": "+this.message+e}},Eh=Ou;Ou.default=Ou;Mg={after:`
|
|
317
317
|
`,beforeClose:`
|
|
318
318
|
`,beforeComment:`
|
|
319
319
|
`,beforeDecl:`
|
|
320
320
|
`,beforeOpen:" ",beforeRule:`
|
|
321
321
|
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};Gu=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;t.type==="decl"?n=this.raw(t,null,"beforeDecl"):t.type==="comment"?n=this.raw(t,null,"beforeComment"):e==="before"?n=this.raw(t,null,"beforeRule"):n=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(n.includes(`
|
|
322
|
-
`)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return
|
|
322
|
+
`)){let o=this.raw(t,null,"indent");if(o.length)for(let s=0;s<i;s++)n+=o}return n}block(t,e){let n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return Mg[n];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(t,n);{let s="raw"+jU(n);this[s]?r=this[s](o,t):o.walk(a=>{if(r=a.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=Mg[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return e=n.raws.after,e.includes(`
|
|
323
323
|
`)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let n;return t.walkComments(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
|
|
324
324
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(t,e){let n;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
|
|
325
325
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(e,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(t){let e;return t.walk(n=>{if(n.type!=="decl"&&(e=n.raws.between,typeof e<"u"))return!1}),e}rawBeforeRule(t){let e;return t.walk(n=>{if(n.nodes&&(n.parent!==t||t.first!==n)&&typeof n.raws.before<"u")return e=n.raws.before,e.includes(`
|
|
326
326
|
`)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(n=>{if(typeof n.raws.between<"u")return e=n.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length===0&&(e=n.raws.after,typeof e<"u"))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(n=>{let r=n.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof n.raws.before<"u"){let i=n.raws.before.split(`
|
|
327
|
-
`);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},
|
|
328
|
-
`?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ni(r,this.source.start),ni(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new qU().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=tM){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},ya=Wu;Wu.default=Wu;nM=ya,Uu=class extends nM{constructor(t){super(t),this.type="comment"}},ga=Uu;Uu.default=Uu;rM=ya,Mu=class extends rM{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Yt(z({},t),{value:String(t.value)})),super(t),this.type="decl"}},ba=Mu;Mu.default=Mu;Kv=ga,_v=ba,iM=ya,{isClean:Hv,my:zv}=Vi;Xe=class qv extends iM{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=Qv(Bv(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new _v(e)]}else if(e.selector||e.selectors)e=[new Ch(e)];else if(e.name)e=[new Rh(e)];else if(e.text)e=[new Kv(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[zv]||qv.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Hv]&&$v(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Xe.registerParse=t=>{Bv=t};Xe.registerRule=t=>{Ch=t};Xe.registerAtRule=t=>{Rh=t};Xe.registerRoot=t=>{jv=t};Cn=Xe;Xe.default=Xe;Xe.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Rh.prototype):t.type==="rule"?Object.setPrototypeOf(t,Ch.prototype):t.type==="decl"?Object.setPrototypeOf(t,_v.prototype):t.type==="comment"?Object.setPrototypeOf(t,Kv.prototype):t.type==="root"&&Object.setPrototypeOf(t,jv.prototype),t[zv]=!0,t.nodes&&t.nodes.forEach(e=>{Xe.rebuild(e)})};t0=Cn,$s=class extends t0{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},Zh=$s;$s.default=$s;t0.registerAtRule($s);oM=Cn,Si=class extends oM{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new e0(new n0,this,t).stringify()}};Si.registerLazyResult=t=>{e0=t};Si.registerProcessor=t=>{n0=t};kh=Si;Si.default=Si;sM="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",aM=(t=21)=>{let e="",n=t|0;for(;n--;)e+=sM[Math.random()*64|0];return e},lM={nanoid:aM},{existsSync:cM,readFileSync:uM}=he,{dirname:Yc,join:hM}=he,{SourceMapConsumer:Fg,SourceMapGenerator:Ag}=he;Pu=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Yc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Fg(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return pM(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.bl=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Yc(t),cM(t))return this.mapFile=t,uM(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof Fg)return Ag.fromSourceMap(e).toString();if(e instanceof Ag)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=hM(Yc(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},r0=Pu;Pu.default=Pu;({nanoid:dM}=lM),{isAbsolute:Fu,resolve:Au}=he,{SourceMapConsumer:fM,SourceMapGenerator:mM}=he,{fileURLToPath:Jg,pathToFileURL:ps}=he,Dg=Eh,yM=r0,Kc=he,_c=Symbol("fromOffsetCache"),gM=!!(fM&&mM),Yg=!!(Au&&Fu),qs=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Yg||/^\w+:\/\//.test(e.from)||Fu(e.from)?this.file=e.from:this.file=Au(e.from)),Yg&&gM){let n=new yM(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+dM(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new Dg(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new Dg(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(ps&&(s.input.url=ps(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[_c])n=this[_c];else{let i=this.css.split(`
|
|
329
|
-
`);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[_c]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Au(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;Fu(o.source)?a=ps(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||ps(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(
|
|
330
|
-
`," "];return wi.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},
|
|
327
|
+
`);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(e=n.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},Dv=Gu;Gu.default=Gu;QU=Dv;ma=Lu;Lu.default=Lu;Vi={};Vi.isClean=Symbol("isClean");Vi.my=Symbol("my");$U=Eh,qU=Dv,tM=ma,{isClean:ei,my:eM}=Vi;Wu=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[ei]=!1,this[eM]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let n of t[e])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=Xu(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new $U(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,n){return t[e]===n||(t[e]=n,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[ei]=!0}markDirty(){if(this[ei]){this[ei]=!1;let t=this;for(;t=t.parent;)t[ei]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r=n.slice(ni(n,this.source.start),ni(n,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,n=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=ni(r,this.source.start),o=i+t;for(let s=i;s<o;s++)r[s]===`
|
|
328
|
+
`?(e=1,n+=1):e+=1;return{column:e,line:n}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ni(r,this.source.start),ni(r,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i),n=this.positionInside(i+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return new qU().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let n={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let s=this[o];if(Array.isArray(s))n[o]=s.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,e):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,e);else if(o==="source"){let a=e.get(s.input);a==null&&(a=i,e.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...e.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=tM){t.stringify&&(t=t.stringify);let e="";return t(this,n=>{e+=n}),e}warn(t,e,n){let r={node:this};for(let i in n)r[i]=n[i];return t.warn(e,r)}},ya=Wu;Wu.default=Wu;nM=ya,Uu=class extends nM{constructor(t){super(t),this.type="comment"}},ga=Uu;Uu.default=Uu;rM=ya,Mu=class extends rM{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=Yt(z({},t),{value:String(t.value)})),super(t),this.type="decl"}},ba=Mu;Mu.default=Mu;Yv=ga,Kv=ba,iM=ya,{isClean:_v,my:Hv}=Vi;Xe=class $v extends iM{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(...e){for(let n of e){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:e[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>e[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>e[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r<o&&(this.indexes[s]=o+i.length);return this.markDirty(),this}insertBefore(e,n){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}normalize(e,n){if(typeof e=="string")e=jv(zv(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Kv(e)]}else if(e.selector||e.selectors)e=[new Ch(e)];else if(e.name)e=[new Rh(e)];else if(e.text)e=[new Yv(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[Hv]||$v.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[_v]&&Qv(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let i;try{i=e(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(e)),i})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return n(r,i)}):(n=e,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Xe.registerParse=t=>{zv=t};Xe.registerRule=t=>{Ch=t};Xe.registerAtRule=t=>{Rh=t};Xe.registerRoot=t=>{Bv=t};Cn=Xe;Xe.default=Xe;Xe.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Rh.prototype):t.type==="rule"?Object.setPrototypeOf(t,Ch.prototype):t.type==="decl"?Object.setPrototypeOf(t,Kv.prototype):t.type==="comment"?Object.setPrototypeOf(t,Yv.prototype):t.type==="root"&&Object.setPrototypeOf(t,Bv.prototype),t[Hv]=!0,t.nodes&&t.nodes.forEach(e=>{Xe.rebuild(e)})};qv=Cn,$s=class extends qv{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},Zh=$s;$s.default=$s;qv.registerAtRule($s);oM=Cn,Si=class extends oM{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new t0(new e0,this,t).stringify()}};Si.registerLazyResult=t=>{t0=t};Si.registerProcessor=t=>{e0=t};kh=Si;Si.default=Si;sM="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",aM=(t=21)=>{let e="",n=t|0;for(;n--;)e+=sM[Math.random()*64|0];return e},lM={nanoid:aM},{existsSync:cM,readFileSync:uM}=he,{dirname:Yc,join:hM}=he,{SourceMapConsumer:Pg,SourceMapGenerator:Fg}=he;Pu=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Yc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Pg(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let s=t.match(e)||t.match(n);if(s)return pM(t.substr(s[0].length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t.bl=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Yc(t),cM(t))return this.mapFile=t,uM(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let n=e(t);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(e instanceof Pg)return Fg.fromSourceMap(e).toString();if(e instanceof Fg)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return t&&(n=hM(Yc(t),n)),this.loadFile(n)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},n0=Pu;Pu.default=Pu;({nanoid:dM}=lM),{isAbsolute:Fu,resolve:Au}=he,{SourceMapConsumer:fM,SourceMapGenerator:mM}=he,{fileURLToPath:Ag,pathToFileURL:ps}=he,Jg=Eh,yM=n0,Kc=he,_c=Symbol("fromOffsetCache"),gM=!!(fM&&mM),Dg=!!(Au&&Fu),qs=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Dg||/^\w+:\/\//.test(e.from)||Fu(e.from)?this.file=e.from:this.file=Au(e.from)),Dg&&gM){let n=new yM(this.css,e);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+dM(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&typeof e=="object"){let c=e,l=n;if(typeof c.offset=="number"){let u=this.fromOffset(c.offset);e=u.line,n=u.col}else e=c.line,n=c.column;if(typeof l.offset=="number"){let u=this.fromOffset(l.offset);o=u.line,i=u.col}else o=l.line,i=l.column}else if(!n){let c=this.fromOffset(e);e=c.line,n=c.col}let a=this.origin(e,n,o,i);return a?s=new Jg(t,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new Jg(t,o===void 0?e:{column:n,line:e},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:e,source:this.css},this.file&&(ps&&(s.input.url=ps(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[_c])n=this[_c];else{let i=this.css.split(`
|
|
329
|
+
`);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s<a;s++)n[s]=o,o+=i[s].length+1;this[_c]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let i=n.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<n[o])i=o-1;else if(t>=n[o+1])r=o+1;else{r=o;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Au(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;Fu(o.source)?a=ps(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||ps(this.map.mapFile));let c={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Ag)c.file=Ag(a);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=z({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}},va=qs;qs.default=qs;Kc&&Kc.registerInput&&Kc.registerInput(qs);r0=Cn,ur=class extends r0{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e){if(n==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let n=this.index(t);return!e&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new i0(new o0,this,t).stringify()}};ur.registerLazyResult=t=>{i0=t};ur.registerProcessor=t=>{o0=t};xi=ur;ur.default=ur;r0.registerRoot(ur);wi={comma(t){return wi.split(t,[","],!0)},space(t){let e=[" ",`
|
|
330
|
+
`," "];return wi.split(t,e)},split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:a?u===c&&(a=!1):u==='"'||u==="'"?(a=!0,c=u):u==="("?s+=1:u===")"?s>0&&(s-=1):s===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(n||i!=="")&&r.push(i.trim()),r}},s0=wi;wi.default=wi;a0=Cn,bM=s0,ta=class extends a0{get selectors(){return bM.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}},Vh=ta;ta.default=ta;a0.registerRule(ta);vM=Zh,SM=ga,wM=ba,IM=va,TM=n0,EM=xi,RM=Vh;CM=Ii;Ii.default=Ii;({dirname:Ns,relative:l0,resolve:c0,sep:u0}=he),{SourceMapConsumer:h0,SourceMapGenerator:Os}=he,{pathToFileURL:Yg}=he,ZM=va,kM=!!(h0&&Os),VM=!!(Ns&&c0&&l0&&u0),xM=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let e=`
|
|
331
331
|
`;this.css.includes(`\r
|
|
332
332
|
`)&&(e=`\r
|
|
333
|
-
`),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||Ns(t.file),r;this.mapOpts.sourcesContent===!1?(r=new
|
|
334
|
-
`),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.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(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?Ns(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Ns(u0(n,this.mapOpts.annotation)));let r=c0(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new ZM(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Kg){let n=Kg(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;h0==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},d0=xM,Hc=39,_g=34,ds=92,Hg=47,fs=10,ri=32,ms=12,ys=9,gs=13,NM=91,OM=93,GM=40,LM=41,XM=123,WM=125,UM=59,MM=42,PM=58,FM=64,bs=/[\t\n\f\r "#'()/;[\\\]{}]/g,vs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,AM=/.[\r\n"'(/\\]/,zg=/[\da-f]/i,JM=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,b=[],v=[];function I(){return d}function R(N){throw t.error("Unclosed "+N,d)}function E(){return v.length===0&&d>=m}function T(N){if(v.length)return v.pop();if(d>=m)return;let U=N?N.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case fs:case ri:case ys:case gs:case ms:{a=d;do a+=1,i=n.charCodeAt(a);while(i===ri||i===fs||i===ys||i===gs||i===ms);l=["space",n.slice(d,a)],d=a-1;break}case NM:case OM:case XM:case WM:case PM:case UM:case LM:{let C=String.fromCharCode(i);l=[C,C,d];break}case GM:{if(f=b.length?b.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Hc&&p!==_g&&p!==ri&&p!==fs&&p!==ys&&p!==ms&&p!==gs){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||U){a=d;break}else R("bracket");for(h=a;n.charCodeAt(h-1)===ds;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||AM.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Hc:case _g:{c=i===Hc?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||U){a=d+1;break}else R("string");for(h=a;n.charCodeAt(h-1)===ds;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case FM:{bs.lastIndex=d+1,bs.test(n),bs.lastIndex===0?a=n.length-1:a=bs.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case ds:{for(a=d,s=!0;n.charCodeAt(a+1)===ds;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==Hg&&i!==ri&&i!==fs&&i!==ys&&i!==gs&&i!==ms&&(a+=1,zg.test(n.charAt(a)))){for(;zg.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===ri&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===Hg&&n.charCodeAt(d+1)===MM?(a=n.indexOf("*/",d+2)+1,a===0&&(r||U?a=n.length:R("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(vs.lastIndex=d+1,vs.test(n),vs.lastIndex===0?a=n.length-1:a=vs.lastIndex-2,l=["word",n.slice(d,a+1),d,a],b.push(l),d=a);break}}return d++,l}function V(N){v.push(N)}return{back:V,endOfFile:E,nextToken:T,position:I}},DM=Zh,YM=ga,KM=ba,_M=xi,Bg=Vh,HM=JM,jg={empty:!0,space:!0};BM=class{constructor(t){this.input=t,this.root=new _M,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new DM;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new YM;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=HM(this.input)}decl(t,e){let n=new KM;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||zM(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new Bg;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!jg[u]&&!jg[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new Bg;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},jM=BM,QM=Cn,$M=va,qM=jM;xh=ea;ea.default=ea;QM.registerParse(ea);Ju=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[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}},f0=Ju;Ju.default=Ju;tP=f0,Du=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new tP(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},Nh=Du;Du.default=Du;Qg={},m0=function(t){Qg[t]||(Qg[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},eP=Cn,nP=kh,rP=d0,iP=xh,$g=Nh,oP=xi,sP=ma,{isClean:we,my:aP}=Vi,lP=m0,cP={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},uP={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},hP={Once:!0,postcssPlugin:!0,prepare:!0},hr=0;Ku={},pr=class g0{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=Yu(n);else if(n instanceof g0||n instanceof $g)i=Yu(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=iP;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[aP]&&eP.rebuild(i)}this.result=new $g(e,i,r),this.helpers=Yt(z({},Ku),{postcss:Ku,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?z(z({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!uP[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!hP[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Dt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(ii(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];){e[we]=!0;let n=[qg(e)];for(;n.length>0;){let r=this.visitTick(n);if(ii(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ii(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=sP;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new rP(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){let n=this.runOnRoot(e);if(ii(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];)e[we]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||lP("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ii(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[we]){a[we]=!0,e.push(qg(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===hr){r.nodes&&r.nodes.length&&(r[we]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[we]=!0;let n=y0(e);for(let r of n)if(r===hr)e.nodes&&e.each(i=>{i[we]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};pr.registerPostcss=t=>{Ku=t};b0=pr;pr.default=pr;oP.registerLazyResult(pr);nP.registerLazyResult(pr);pP=d0,dP=xh,fP=Nh,mP=ma,yP=m0,_u=class{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.sn)return this.sn;let t,e=dP;try{t=e(this.vr,this.fn)}catch(n){this.error=n}if(this.error)throw this.error;return this.sn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.Co=t,this.vr=e,this.fn=n,this.vl=void 0;let r,i=mP;this.result=new fP(this.Co,r,this.fn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new pP(i,r,this.fn,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.fn||yP("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(t,e)}toString(){return this.vr}warnings(){return[]}},gP=_u;_u.default=_u;bP=kh,vP=b0,SP=gP,wP=xi,Ti=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new SP(this,t,e):new vP(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},IP=Ti;Ti.default=Ti;wP.registerProcessor(Ti);bP.registerProcessor(Ti);v0=Zh,S0=ga,TP=Cn,EP=Eh,w0=ba,I0=kh,RP=CM,CP=va,ZP=b0,kP=a0,VP=ya,xP=xh,Oh=IP,NP=Nh,T0=xi,E0=Vh,OP=ma,GP=f0;pt.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
333
|
+
`),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),n=t.root||Ns(t.file),r;this.mapOpts.sourcesContent===!1?(r=new h0(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),VM&&kM&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Os.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Os({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 Os({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,n="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=s.match(/\n/g),o?(t+=o.length,i=s.lastIndexOf(`
|
|
334
|
+
`),e=s.length-i):e+=s.length,a&&c!=="start"){let l=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==l.last||l.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.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(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?Ns(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Ns(c0(n,this.mapOpts.annotation)));let r=l0(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new ZM(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Yg){let n=Yg(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;u0==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},p0=xM,Hc=39,Kg=34,ds=92,_g=47,fs=10,ri=32,ms=12,ys=9,gs=13,NM=91,OM=93,GM=40,LM=41,XM=123,WM=125,UM=59,MM=42,PM=58,FM=64,bs=/[\t\n\f\r "#'()/;[\\\]{}]/g,vs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,AM=/.[\r\n"'(/\\]/,Hg=/[\da-f]/i,JM=function(t,e={}){let n=t.css.valueOf(),r=e.ignoreErrors,i,o,s,a,c,l,u,h,p,f,m=n.length,d=0,b=[],v=[];function I(){return d}function R(N){throw t.error("Unclosed "+N,d)}function E(){return v.length===0&&d>=m}function T(N){if(v.length)return v.pop();if(d>=m)return;let U=N?N.ignoreUnclosed:!1;switch(i=n.charCodeAt(d),i){case fs:case ri:case ys:case gs:case ms:{a=d;do a+=1,i=n.charCodeAt(a);while(i===ri||i===fs||i===ys||i===gs||i===ms);l=["space",n.slice(d,a)],d=a-1;break}case NM:case OM:case XM:case WM:case PM:case UM:case LM:{let C=String.fromCharCode(i);l=[C,C,d];break}case GM:{if(f=b.length?b.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Hc&&p!==Kg&&p!==ri&&p!==fs&&p!==ys&&p!==ms&&p!==gs){a=d;do{if(u=!1,a=n.indexOf(")",a+1),a===-1)if(r||U){a=d;break}else R("bracket");for(h=a;n.charCodeAt(h-1)===ds;)h-=1,u=!u}while(u);l=["brackets",n.slice(d,a+1),d,a],d=a}else a=n.indexOf(")",d+1),o=n.slice(d,a+1),a===-1||AM.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Hc:case Kg:{c=i===Hc?"'":'"',a=d;do{if(u=!1,a=n.indexOf(c,a+1),a===-1)if(r||U){a=d+1;break}else R("string");for(h=a;n.charCodeAt(h-1)===ds;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case FM:{bs.lastIndex=d+1,bs.test(n),bs.lastIndex===0?a=n.length-1:a=bs.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case ds:{for(a=d,s=!0;n.charCodeAt(a+1)===ds;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==_g&&i!==ri&&i!==fs&&i!==ys&&i!==gs&&i!==ms&&(a+=1,Hg.test(n.charAt(a)))){for(;Hg.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===ri&&(a+=1)}l=["word",n.slice(d,a+1),d,a],d=a;break}default:{i===_g&&n.charCodeAt(d+1)===MM?(a=n.indexOf("*/",d+2)+1,a===0&&(r||U?a=n.length:R("comment")),l=["comment",n.slice(d,a+1),d,a],d=a):(vs.lastIndex=d+1,vs.test(n),vs.lastIndex===0?a=n.length-1:a=vs.lastIndex-2,l=["word",n.slice(d,a+1),d,a],b.push(l),d=a);break}}return d++,l}function V(N){v.push(N)}return{back:V,endOfFile:E,nextToken:T,position:I}},DM=Zh,YM=ga,KM=ba,_M=xi,zg=Vh,HM=JM,Bg={empty:!0,space:!0};BM=class{constructor(t){this.input=t,this.root=new _M,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new DM;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let n,r,i,o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else a.push(t);else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(e.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(e,"params",a),o&&(t=a[a.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),s&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let n=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,n,r,i;for(let[o,s]of t.entries()){if(r=s,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(t){let e=new YM;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=HM(this.input)}decl(t,e){let n=new KM;this.init(n,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(r[3]||r[2]||zM(t)),n.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let a=t[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=t.shift()[1]}n.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;t.length&&(s=t[0][0],!(s!=="space"&&s!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let a=t.length-1;a>=0;a--){if(i=t[a],i[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(t,a);c=this.spacesFromEnd(t)+c,c!==" !important"&&(n.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let u=a;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(n.important=!0,n.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new zg;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),e=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s=n.length,a="",c=!0,l,u;for(let h=0;h<s;h+=1)i=n[h],o=i[0],o==="space"&&h===s-1&&!r?c=!1:o==="comment"?(u=n[h-1]?n[h-1][0]:"empty",l=n[h+1]?n[h+1][0]:"empty",!Bg[u]&&!Bg[l]?a.slice(-1)===","?c=!1:a+=i[1]:c=!1):a+=i[1];if(!c){let h=n.reduce((p,f)=>p+f[1],"");t.raws[e]={raw:h,value:a}}t[e]=a}rule(t){t.pop();let e=new zg;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],e==="space");)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},jM=BM,QM=Cn,$M=va,qM=jM;xh=ea;ea.default=ea;QM.registerParse(ea);Ju=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in e)this[n]=e[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}},d0=Ju;Ju.default=Ju;tP=d0,Du=class{get content(){return this.css}constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new tP(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},Nh=Du;Du.default=Du;jg={},f0=function(t){jg[t]||(jg[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},eP=Cn,nP=kh,rP=p0,iP=xh,Qg=Nh,oP=xi,sP=ma,{isClean:we,my:aP}=Vi,lP=f0,cP={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},uP={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},hP={Once:!0,postcssPlugin:!0,prepare:!0},hr=0;Ku={},pr=class y0{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(e,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=Yu(n);else if(n instanceof y0||n instanceof Qg)i=Yu(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=iP;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[aP]&&eP.rebuild(i)}this.result=new Qg(e,i,r),this.helpers=Yt(z({},Ku),{postcss:Ku,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?z(z({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,s=this.result.processor.version,a=o.split("."),c=s.split(".");(a[0]!==c[0]||parseInt(a[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!uP[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!hP[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?e(n,r,n[r][i]):e(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Dt(this,null,function*(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let n=this.plugins[e],r=this.runOnRoot(n);if(ii(r))try{yield r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];){e[we]=!0;let n=[$g(e)];for(;n.length>0;){let r=this.visitTick(n);if(ii(r))try{yield r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));yield Promise.all(i)}else yield r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()})}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ii(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=sP;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new rP(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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 e of this.plugins){let n=this.runOnRoot(e);if(ii(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];)e[we]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||lP("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ii(o))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[s,a]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let s=n.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[we]){a[we]=!0,e.push($g(a));return}n.iterator=0,delete r.indexes[s]}let o=n.events;for(;n.eventIndex<o.length;){let s=o[n.eventIndex];if(n.eventIndex+=1,s===hr){r.nodes&&r.nodes.length&&(r[we]=!0,n.iterator=r.getIterator());return}else if(this.listeners[s]){n.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[we]=!0;let n=m0(e);for(let r of n)if(r===hr)e.nodes&&e.each(i=>{i[we]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};pr.registerPostcss=t=>{Ku=t};g0=pr;pr.default=pr;oP.registerLazyResult(pr);nP.registerLazyResult(pr);pP=p0,dP=xh,fP=Nh,mP=ma,yP=f0,_u=class{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.sn)return this.sn;let t,e=dP;try{t=e(this.vr,this.fn)}catch(n){this.error=n}if(this.error)throw this.error;return this.sn=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this.Co=t,this.vr=e,this.fn=n,this.vl=void 0;let r,i=mP;this.result=new fP(this.Co,r,this.fn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new pP(i,r,this.fn,e);if(s.isMap()){let[a,c]=s.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return process.env.NODE_ENV!=="production"&&("from"in this.fn||yP("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(t,e)}toString(){return this.vr}warnings(){return[]}},gP=_u;_u.default=_u;bP=kh,vP=g0,SP=gP,wP=xi,Ti=class{constructor(t=[]){this.version="8.5.3",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)e.push(n);else if(typeof n=="function")e.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new SP(this,t,e):new vP(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},IP=Ti;Ti.default=Ti;wP.registerProcessor(Ti);bP.registerProcessor(Ti);b0=Zh,v0=ga,TP=Cn,EP=Eh,S0=ba,w0=kh,RP=CM,CP=va,ZP=g0,kP=s0,VP=ya,xP=xh,Oh=IP,NP=Nh,I0=xi,T0=Vh,OP=ma,GP=d0;pt.plugin=function(t,e){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
335
335
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
336
|
-
https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new Oh().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return pt([r(a)]).process(o,s)},r};pt.stringify=OP;pt.parse=xP;pt.fromJSON=RP;pt.list=kP;pt.comment=t=>new
|
|
336
|
+
https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new Oh().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return pt([r(a)]).process(o,s)},r};pt.stringify=OP;pt.parse=xP;pt.fromJSON=RP;pt.list=kP;pt.comment=t=>new v0(t);pt.atRule=t=>new b0(t);pt.decl=t=>new S0(t);pt.rule=t=>new T0(t);pt.root=t=>new I0(t);pt.document=t=>new w0(t);pt.CssSyntaxError=EP;pt.Declaration=S0;pt.Container=TP;pt.Processor=Oh;pt.Document=w0;pt.Comment=v0;pt.Warning=GP;pt.AtRule=b0;pt.Result=NP;pt.Input=CP;pt.Rule=T0;pt.Root=I0;pt.Node=VP;ZP.registerPostcss(pt);pt.default=pt;Hu=class t{constructor(...e){re(this,"parentElement",null),re(this,"parentNode",null),re(this,"ownerDocument"),re(this,"firstChild",null),re(this,"lastChild",null),re(this,"previousSibling",null),re(this,"nextSibling",null),re(this,"ELEMENT_NODE",1),re(this,"TEXT_NODE",3),re(this,"nodeType"),re(this,"nodeName"),re(this,"RRNodeType")}get childNodes(){let e=[],n=this.firstChild;for(;n;)e.push(n),n=n.nextSibling;return e}contains(e){if(e instanceof t){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},qg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ss={},LP=()=>!!globalThis.Zone;zc={};Bc={};q={childNodes:XP,parentNode:WP,parentElement:UP,textContent:MP,contains:PP,getRootNode:FP,host:AP,styleSheets:JP,shadowRoot:DP,querySelector:YP,querySelectorAll:KP,mutationObserver:R0,patch:Zn};$n=`Please stop import mirror directly. Instead of that,\r
|
|
337
337
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
338
|
-
or you can use record.mirror to access the mirror instance during recording.`,nb={map:{},getId(){return console.error($n),-1},getNode(){return console.error($n),null},removeNodeFromMap(){console.error($n)},has(){return console.error($n),!1},reset(){console.error($n)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(nb=new Proxy(nb,{get(t,e,n){return e==="map"&&console.error($n),Reflect.get(t,e,n)}}));na=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(na=()=>new Date().getTime());_P=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch(e){return!1}return!1};ju=class{constructor(){k(this,"id",1),k(this,"styleIDMap",new WeakMap),k(this,"idStyleMap",new Map)}getId(e){var n;return(n=this.styleIDMap.get(e))!=null?n:-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};rt=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(rt||{}),et=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(et||{}),Jt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Jt||{}),He=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(He||{}),dr=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(dr||{}),qn=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(qn||{}),W0=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(W0||{});Qu=class{constructor(){k(this,"length",0),k(this,"head",null),k(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=(n==null?void 0:n.next)||null;return n}addNode(e){let n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&rb(e.previousSibling)){let r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&rb(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){let n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},ib=(t,e)=>`${t}@${e}`,$u=class{constructor(){k(this,"frozen",!1),k(this,"locked",!1),k(this,"texts",[]),k(this,"attributes",[]),k(this,"attributeMap",new WeakMap),k(this,"removes",[]),k(this,"mapRemoves",[]),k(this,"movedMap",{}),k(this,"addedSet",new Set),k(this,"movedSet",new Set),k(this,"droppedSet",new Set),k(this,"removesSubTreeCache",new Set),k(this,"mutationCb"),k(this,"blockClass"),k(this,"blockSelector"),k(this,"maskTextClass"),k(this,"maskTextSelector"),k(this,"inlineStylesheet"),k(this,"maskInputOptions"),k(this,"maskTextFn"),k(this,"maskInputFn"),k(this,"keepIframeSrcFn"),k(this,"recordCanvas"),k(this,"inlineImages"),k(this,"inlineVideos"),k(this,"privacySetting"),k(this,"slimDOMOptions"),k(this,"dataURLOptions"),k(this,"doc"),k(this,"mirror"),k(this,"iframeManager"),k(this,"stylesheetManager"),k(this,"shadowDomManager"),k(this,"canvasManager"),k(this,"processedNodeManager"),k(this,"unattachedDoc"),k(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),k(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],n=new Set,r=new Qu,i=c=>{let l=c,u=mi;for(;u===mi;)l=l&&l.nextSibling,u=l&&this.mirror.getId(l);return u},o=c=>{let l=q.parentNode(c);if(!l||!X0(c))return;let u=!1;if(c.nodeType===Node.TEXT_NODE){let m=l.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(l)&&(u=!0)}let h=ci(l)?this.mirror.getId(L0(c)):this.mirror.getId(l),p=i(c);if(h===-1||p===-1)return r.addNode(c);let f=er(c,{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:m=>{O0(m,this.mirror)&&this.iframeManager.addIframe(m),G0(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Bu(c)&&this.shadowDomManager.addShadowRoot(q.shadowRoot(c),this.doc)},onIframeLoad:(m,d)=>{this.iframeManager.attachIframe(m,d),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,d)=>{this.stylesheetManager.attachLinkElement(m,d)},cssCaptured:u});f&&(e.push({parentId:h,nextId:p,node:f}),n.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)ob(this.removesSubTreeCache,c)&&!this.movedSet.has(q.parentNode(c))||o(c);for(let c of this.addedSet)!sb(this.droppedSet,c)&&!ob(this.removesSubTreeCache,c)||sb(this.movedSet,c)?o(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){let l=this.mirror.getId(q.parentNode(s.value)),u=i(s.value);l!==-1&&u!==-1&&(c=s)}if(!c){let l=r.tail;for(;l;){let u=l;if(l=l.previous,u){let h=this.mirror.getId(q.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){c=u;break}else{let p=u.value,f=q.parentNode(p);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=q.host(f);if(this.mirror.getId(m)!==-1){c=u;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),o(c.value)}let a={texts:this.texts.map(c=>{var l,u;let h=c.node,p=q.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);let f=c.value,m=this.privacySetting==="strict",d=this.privacySetting==="default"&&qb(f),b=(u=(l=c.node)==null?void 0:l.parentElement)==null?void 0:u.getAttribute("data-hl-record");return(m||d)&&!b&&f&&(f=hh(f)),{id:this.mirror.getId(h),value:f}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:l}=c;if(typeof l.style=="string"){let u=JSON.stringify(c.styleDiff),h=JSON.stringify(c.Zo);u.length<l.style.length&&(u+h).split("var(").length===l.style.split("var(").length&&(l.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:l}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),k(this,"genTextAreaValueMutation",e=>{let n=this.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},Zo:{}},this.attributes.push(n),this.attributeMap.set(e,n));let r=Array.from(q.childNodes(e),i=>q.textContent(i)||"").join("");n.attributes.value=Ds({overwriteRecord:null,element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ys(e),value:r,maskInputFn:this.maskInputFn})}),k(this,"processMutation",e=>{if(!jc(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let n=q.textContent(e.target);!Nt(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:iv(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,x0(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{let n=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let s=Ys(n);i=Ds({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:s,value:i,overwriteRecord:n.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Nt(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},Zo:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!rv(n.tagName,r)){if(e.target.tagName==="INPUT"){let s=e.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}if(o.attributes[r]=nv(this.doc,sr(n.tagName),sr(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||l!==s.style.getPropertyPriority(a)?l===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,l]:o.Zo[a]=[c,l]}for(let a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Nt(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{let r=this.mirror.getId(n),i=ci(e.target)?this.mirror.getId(q.host(e.target)):this.mirror.getId(e.target);Nt(e.target,this.blockClass,this.blockSelector,!1)||jc(n,this.mirror,this.slimDOMOptions)||!HP(n,this.mirror)||(this.addedSet.has(n)?(qu(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||N0(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[ib(r,i)]?qu(this.movedSet,n):(this.removes.push({parentId:i,id:r,isShadow:ci(e.target)&&ui(e.target)?!0:void 0}),QP(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),k(this,"genAdds",(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(jc(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[ib(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Nt(e,this.blockClass,this.blockSelector,!1)||(q.childNodes(e).forEach(r=>this.genAdds(r)),Bu(e)&&q.childNodes(q.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}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()}};nt=t=>hi?(...e)=>{try{return t(...e)}catch(n){if(hi&&hi(n)===!0)return;throw n}}:t,Tn=[];iF=["INPUT","TEXTAREA","SELECT"],ab=new WeakMap;ia=class{constructor(e){k(this,"iframeIdToRemoteIdMap",new WeakMap),k(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,n,r,i){let o=r||this.getIdToRemoteIdMap(e),s=i||this.getRemoteIdToIdMap(e),a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(e,n){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return n.map(o=>this.getId(e,o,r,i))}getRemoteId(e,n,r){let i=r||this.getRemoteIdToIdMap(e);return typeof n!="number"?n:i.get(n)||-1}getRemoteIds(e,n){let r=this.getRemoteIdToIdMap(e);return n.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}},th=class{constructor(e){k(this,"iframes",new WeakMap),k(this,"crossOriginIframeMap",new WeakMap),k(this,"crossOriginIframeMirror",new ia(ev)),k(this,"crossOriginIframeStyleMirror"),k(this,"crossOriginIframeRootIdMap",new WeakMap),k(this,"mirror"),k(this,"mutationCb"),k(this,"wrappedEmit"),k(this,"loadListener"),k(this,"stylesheetManager"),k(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ia(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin)return;let r=e.source;if(!r)return;let i=this.crossOriginIframeMap.get(r);if(!i)return;let o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){var r;switch(n.type){case rt.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);let i=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(n.data.node,i),{timestamp:n.timestamp,type:rt.IncrementalSnapshot,data:{source:et.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case rt.Meta:case rt.Load:case rt.DomContentLoaded:return!1;case rt.Plugin:return n;case rt.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case rt.IncrementalSnapshot:switch(n.data.source){case et.Mutation:return n.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),n.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),n.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),n.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case et.Drag:case et.TouchMove:case et.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case et.ViewportResize:return!1;case et.MediaInteraction:case et.MouseInteraction:case et.Scroll:case et.CanvasMutation:case et.Input:return this.replaceIds(n.data,e,["id"]),n;case et.StyleSheetRule:case et.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case et.Font:return n;case et.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),n;case et.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),(r=n.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),n}}return!1}replace(e,n,r,i){for(let o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=e.getIds(r,n[o]):n[o]=e.getId(r,n[o]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==W0.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},eh=class{constructor(e){k(this,"shadowDoms",new WeakSet),k(this,"mutationCb"),k(this,"scrollCb"),k(this,"bypassOptions"),k(this,"mirror"),k(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!ui(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=M0(Yt(z({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(P0(Yt(z({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(q.host(e))),this.restoreHandlers.push(F0({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){let r=this;this.restoreHandlers.push(Zn(e.prototype,"attachShadow",function(i){return function(o){let s=i.call(this,o),a=q.shadowRoot(this);return a&&X0(this)&&r.addShadowRoot(a,n),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(n){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fF=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(oi=0;oi<nr.length;oi++)fF[nr.charCodeAt(oi)]=oi;mF=function(t){var e=new Uint8Array(t),n,r=e.length,i="";for(n=0;n<r;n+=3)i+=nr[e[n]>>2],i+=nr[(e[n]&3)<<4|e[n+1]>>4],i+=nr[(e[n+1]&15)<<2|e[n+2]>>6],i+=nr[e[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},lb=new Map;A0=(t,e,n)=>{if(!t||!(D0(t,e)||typeof t=="object"))return;let r=t.constructor.name,i=yF(n,r),o=i.indexOf(t);return o===-1&&(o=i.length,i.push(t)),o};J0=(t,e,n)=>t.map(r=>Gs(r,e,n)),D0=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function").find(n=>t instanceof e[n]);Y0="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY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IGR5LAogICAgICAgIGR3LAogICAgICAgIGRoCiAgICAgIH07CiAgICAgIGRlYnVnKCJbaGlnaGxpZ2h0LXdvcmtlcl0gY2FudmFzIGJpdG1hcCBwcm9jZXNzZWQiLCBtc2cpOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UobXNnKTsKICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgfSBlbHNlIHsKICAgICAgZGVidWcoIltoaWdobGlnaHQtd29ya2VyXSBubyBvZmZzY3JlZW5jYW52YXMgc3VwcG9ydCIsIHsKICAgICAgICBpZDogZS5kYXRhLmlkCiAgICAgIH0pOwogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCwgc3RhdHVzOiAidW5zdXBwb3J0ZWQiIH0pOwogICAgfQogIH07Cn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWltYWdlLWJpdG1hcC1kYXRhLXVybC13b3JrZXItRHd0SzhBMHouanMubWFwCg==",SF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),hb=typeof self<"u"&&self.Blob&&new Blob([SF(Y0)],{type:"text/javascript;charset=utf-8"});nh=class{constructor(e){k(this,"pendingCanvasMutations",new Map),k(this,"rafStamps",{latestId:0,invokeId:null}),k(this,"mirror"),k(this,"logger"),k(this,"worker"),k(this,"snapshotInProgressMap",new Map),k(this,"lastSnapshotTime",new Map),k(this,"options"),k(this,"mutationCb"),k(this,"resetObservers"),k(this,"frozen",!1),k(this,"locked",!1),k(this,"processMutation",(h,p)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(h)||this.pendingCanvasMutations.set(h,[]),this.pendingCanvasMutations.get(h).push(p)});let{sampling:n,win:r,blockClass:i,blockSelector:o,recordCanvas:s,recordLocalVideos:a,recordRemoteVideos:c,initialSnapshotDelay:l,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.logger=e.logger,this.worker=new wF,this.worker.onmessage=h=>{let{id:p}=h.data;if(this.snapshotInProgressMap.set(p,!1),!("base64"in h.data)){this.debug(null,"canvas worker received empty message",{id:p,data:h.data,status:h.data.status});return}let{base64:f,type:m,dx:d,dy:b,dw:v,dh:I}=h.data,R={id:p,type:dr["2D"],commands:[{property:"clearRect",args:[d,b,v,I]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:m}]},d,b,v,I]}]};this.debug(null,"canvas worker recording mutation",R),this.mutationCb(R)},this.options=e,s&&n==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:n}),this.initCanvasMutationObserver(r,i,o)):s&&typeof n=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:n}),this.initCanvasFPSObserver(a,c,n,r,i,o,{initialSnapshotDelay:l,dataURLOptions:u},e.resizeFactor,e.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(e,...n){if(!this.logger)return;let r=this.mirror.getId(e),i="[highlight-canvas-manager]";e&&(i=`[highlight-canvas] [id:${r}]`,e.tagName.toLowerCase()==="canvas"&&(i+=` [ctx:${e.__context}]`)),this.logger.debug(i,e,...n)}snapshot(e){return Dt(this,null,function*(){var n;let r=this.mirror.getId(e);if(this.snapshotInProgressMap.get(r)){this.debug(e,"snapshotting already in progress for",r);return}let i=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),o=this.lastSnapshotTime.get(r);if(!(o&&new Date().getTime()-o<i)){if(this.debug(e,"starting snapshotting"),e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}this.lastSnapshotTime.set(r,new Date().getTime()),this.snapshotInProgressMap.set(r,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(e.__context)){let u=e.getContext(e.__context);((n=u==null?void 0:u.getContextAttributes())==null?void 0:n.preserveDrawingBuffer)===!1&&(u.clear(u.COLOR_BUFFER_BIT),this.debug(e,"cleared webgl canvas to load it into memory",{attributes:u==null?void 0:u.getContextAttributes()}))}if(e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}let s=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){let u=Math.max(e.width,e.height);s=Math.min(s,this.options.maxSnapshotDimension/u)}let a=e.width*s,c=e.height*s,l=yield createImageBitmap(e,{resizeWidth:a,resizeHeight:c});this.debug(e,"created image bitmap",{width:l.width,height:l.height}),this.worker.postMessage({id:r,bitmap:l,width:a,height:c,dx:0,dy:0,dw:e.width,dh:e.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[l]),this.debug(e,"sent message")}catch(s){this.debug(e,"failed to snapshot",s)}finally{this.snapshotInProgressMap.set(r,!1)}}})}initCanvasFPSObserver(e,n,r,i,o,s,a,c,l){let u=cb(i,o,s,!0),h=1e3/r,p=0,f,m=new Map,d=(R,E)=>{let T=[];R.querySelectorAll(E).forEach(U=>T.push(U));let V=document.createNodeIterator(R,Node.ELEMENT_NODE),N;for(;N=V.nextNode();)N!=null&&N.shadowRoot&&T.push(...d(N.shadowRoot,E));return T},b=R=>{let E=[];return d(i.document,"canvas").forEach(T=>{if(!Nt(T,o,s,!0)){this.debug(T,"discovered canvas"),E.push(T);let V=this.mirror.getId(T);m.has(V)||m.set(V,R)}}),E},v=R=>{let E=[];return(e||n)&&d(i.document,"video").forEach(T=>{if(!(!n&&T.src!==""&&T.src.indexOf("blob:")===-1)&&!(!e&&(T.src===""||T.src.indexOf("blob:")!==-1))&&!Nt(T,o,s,!0)){E.push(T);let V=this.mirror.getId(T);m.has(V)||m.set(V,R)}}),E},I=R=>Dt(this,null,function*(){if(p&&R-p<h){f=requestAnimationFrame(I);return}p=R;let E=V=>{let N=this.mirror.getId(V),U=m.get(N),C=!a.initialSnapshotDelay||R-U>a.initialSnapshotDelay;return this.debug(V,{delay:a.initialSnapshotDelay,delta:R-U,hadLoadingTime:C}),C},T=[];T.push(...b(R).filter(E).map(V=>this.snapshot(V))),T.push(...v(R).filter(E).map(V=>Dt(this,null,function*(){this.debug(V,"starting video snapshotting");let N=this.mirror.getId(V);if(this.snapshotInProgressMap.get(N)){this.debug(V,"video snapshotting already in progress for",N);return}this.snapshotInProgressMap.set(N,!0);try{let{width:U,height:C}=V.getBoundingClientRect(),{actualWidth:x,actualHeight:M}={actualWidth:V.videoWidth,actualHeight:V.videoHeight},ot=Math.max(x,M);if(ot===0){this.debug(V,"not yet ready",{width:V.width,height:V.height,actualWidth:x,actualHeight:M,boxWidth:U,boxHeight:C});return}let lt=c||1;l&&(lt=Math.min(lt,l/ot));let y=x*lt,g=M*lt,Z=yield createImageBitmap(V,{resizeWidth:y,resizeHeight:g}),D=Math.max(U,C)/ot,P=x*D,O=M*D,it=(U-P)/2,ct=(C-O)/2;this.debug(V,"created image bitmap",{actualWidth:x,actualHeight:M,boxWidth:U,boxHeight:C,outputWidth:P,outputHeight:O,resizeWidth:y,resizeHeight:g,scale:lt,outputScale:D,offsetX:it,offsetY:ct}),this.worker.postMessage({id:N,bitmap:Z,width:y,height:g,dx:it,dy:ct,dw:P,dh:O,dataURLOptions:a.dataURLOptions,logDebug:!!this.logger},[Z]),this.debug(V,"send message")}catch(U){this.debug(V,"failed to snapshot",U)}finally{this.snapshotInProgressMap.set(N,!1)}}))),yield Promise.all(T).catch(console.error),f=requestAnimationFrame(I)});f=requestAnimationFrame(I),this.resetObservers=()=>{u(),f&&cancelAnimationFrame(f)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=cb(e,n,r,!1),o=gF(this.processMutation.bind(this),e,n,r),s=vF(this.processMutation.bind(this),e,n,r);this.resetObservers=()=>{i(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;let i=r.map(s=>or(s,["type"])),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},rh=class{constructor(e){k(this,"trackedLinkElements",new WeakSet),k(this,"mutationCb"),k(this,"adoptedStyleSheetCb"),k(this,"styleMirror",new ju),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;let r={id:n,styleIds:[]},i=[];for(let o of e){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:Qb(a,o.href),index:c}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},ih=class{constructor(){k(this,"nodeMap",new WeakMap),k(this,"active",!1)}inOtherBuffer(e,n){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==n)}add(e,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}},oa=!1;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((pg=t.contentWindow)==null?void 0:pg.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}ce=EW();Ge.addCustomEvent=(t,e)=>{oa&&vt({type:rt.Custom,data:{tag:t,payload:e}})};Ge.freezePage=()=>{Tn.forEach(t=>t.freeze())};Ge.takeFullSnapshot=t=>{if(!oa)throw new Error("please take full snapshot after start recording");Ls(t)};Ge.snapshotCanvas=t=>Dt(void 0,null,function*(){if(!pi)throw new Error("canvas manager is not initialized");yield pi.snapshot(t)});Ge.mirror=ce;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(pb||(pb={}));({addCustomEvent:db}=Ge),IF=t=>{t(window.location.href);let e=history.pushState;history.pushState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),s})(history.pushState);let n=history.replaceState;history.replaceState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),s})(history.replaceState);let r=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",r);let i=function(){t(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",i),history.pushState=e,history.replaceState=n}},TF=t=>{switch(t){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!1,{password:!0}]}},EF=t=>{let e=n=>{if(n.target){let r=n.target,i=_b(r);t(i,n)}};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},RF=t=>{let e=n=>{if(n.target){let r=_b(n.target);t(r)}};return window.addEventListener("focusin",e),()=>window.removeEventListener("focusin",e)},CF=t=>{let e,n;if(typeof document.hidden<"u"?(e="hidden",n="visibilitychange"):typeof document.msHidden<"u"?(e="msHidden",n="msvisibilitychange"):typeof document.webkitHidden<"u"&&(e="webkitHidden",n="webkitvisibilitychange"),n===void 0)return()=>{};if(e===void 0)return()=>{};let r=e,i=()=>{let s=document[r];t(!!s)};document.addEventListener(n,i);let o=n;return()=>document.removeEventListener(o,i)},ZF=t=>{t(window.location.href);var e=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(o){setTimeout(()=>{var s,a;try{a=JSON.parse((s=o==null?void 0:o.toString())!=null?s:"")}catch(c){return}(a.type==="track"||a.type==="identify")&&Qc(a)&&t(a)},100),e.call(this,o)};let n=o=>{if(o.key==="ajs_user_id"||o.key==="ajs_anonymous_id"||o.key==="ajs_user_traits"){let{userId:s,userTraits:a}=fb();if(s){let c={};a&&(c=JSON.parse(a));let l={type:"identify",userId:s.toString(),traits:c};Qc(l)&&t(l)}}},{userId:r,userTraits:i}=fb();if(r){let o={};i&&(o=JSON.parse(i));let s={type:"identify",userId:r.toString(),traits:o};Qc(s)&&t(s)}return window.addEventListener("storage",n),CX(({keyName:o})=>{n({key:o})}),()=>{window.removeEventListener("storage",n),XMLHttpRequest.prototype.send=e}},fb=()=>{let t=ie("ajs_user_id"),e=ie("ajs_user_traits"),n=ie("ajs_anonymous_id");return{userId:t,userTraits:e,anonymousId:n}},Qc=t=>{if(!t)return!1;let e="";try{e=JSON.stringify(t)}catch(i){return!1}let n=kF(e),r=ie(Ht.SEGMENT_LAST_SENT_HASH_KEY);return r===void 0||n!==r?(je(Ht.SEGMENT_LAST_SENT_HASH_KEY,n),!0):!1},kF=t=>{var e=0,n=t.length,r=0;if(n>0)for(;r<n;)e=(e<<5)-e+t.charCodeAt(r++)|0;return e.toString()},VF=(t,e)=>{let n=xF(t),r=[],i=!1,o=!0;for(let s=0;s<n.length;s++){let a=n[s].split("+");r=[],a.length>1&&(r=GF(K0,a)),a=a[a.length-1],a=a==="*"?"*":OF(a),a in Ie||(Ie[a]=[]),Ie[a].push({mods:r,shortcut:n[s],key:n[s],method:e,keyup:i,keydown:o,scope:"all",splitKey:"+"})}LF(document,"keydown",s=>{WF(s)})},Ut=[];Ie={},$c=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,NF={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,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":$c?173:189,"=":$c?61:187,";":$c?59:186,"'":222,"[":219,"]":221,"\\":220},mb={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Mt={16:!1,18:!1,17:!1,91:!1},K0={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},OF=t=>NF[t.toLowerCase()]||K0[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);yb="iframe parent ready",gb="iframe ok",Ri="highlightLogs",UF=t=>{let e=ie(Ri)||"";e=e+"["+new Date().getTime()+"] "+t+`
|
|
338
|
+
or you can use record.mirror to access the mirror instance during recording.`,eb={map:{},getId(){return console.error($n),-1},getNode(){return console.error($n),null},removeNodeFromMap(){console.error($n)},has(){return console.error($n),!1},reset(){console.error($n)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(eb=new Proxy(eb,{get(t,e,n){return e==="map"&&console.error($n),Reflect.get(t,e,n)}}));na=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(na=()=>new Date().getTime());_P=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch(e){return!1}return!1};ju=class{constructor(){k(this,"id",1),k(this,"styleIDMap",new WeakMap),k(this,"idStyleMap",new Map)}getId(e){var n;return(n=this.styleIDMap.get(e))!=null?n:-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};rt=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(rt||{}),et=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(et||{}),Jt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Jt||{}),He=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(He||{}),dr=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(dr||{}),qn=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(qn||{}),X0=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(X0||{});Qu=class{constructor(){k(this,"length",0),k(this,"head",null),k(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=(n==null?void 0:n.next)||null;return n}addNode(e){let n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&nb(e.previousSibling)){let r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&nb(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(e){let n=e.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},rb=(t,e)=>`${t}@${e}`,$u=class{constructor(){k(this,"frozen",!1),k(this,"locked",!1),k(this,"texts",[]),k(this,"attributes",[]),k(this,"attributeMap",new WeakMap),k(this,"removes",[]),k(this,"mapRemoves",[]),k(this,"movedMap",{}),k(this,"addedSet",new Set),k(this,"movedSet",new Set),k(this,"droppedSet",new Set),k(this,"removesSubTreeCache",new Set),k(this,"mutationCb"),k(this,"blockClass"),k(this,"blockSelector"),k(this,"maskTextClass"),k(this,"maskTextSelector"),k(this,"inlineStylesheet"),k(this,"maskInputOptions"),k(this,"maskTextFn"),k(this,"maskInputFn"),k(this,"keepIframeSrcFn"),k(this,"recordCanvas"),k(this,"inlineImages"),k(this,"inlineVideos"),k(this,"privacySetting"),k(this,"slimDOMOptions"),k(this,"dataURLOptions"),k(this,"doc"),k(this,"mirror"),k(this,"iframeManager"),k(this,"stylesheetManager"),k(this,"shadowDomManager"),k(this,"canvasManager"),k(this,"processedNodeManager"),k(this,"unattachedDoc"),k(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),k(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],n=new Set,r=new Qu,i=c=>{let l=c,u=mi;for(;u===mi;)l=l&&l.nextSibling,u=l&&this.mirror.getId(l);return u},o=c=>{let l=q.parentNode(c);if(!l||!L0(c))return;let u=!1;if(c.nodeType===Node.TEXT_NODE){let m=l.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(l)&&(u=!0)}let h=ci(l)?this.mirror.getId(G0(c)):this.mirror.getId(l),p=i(c);if(h===-1||p===-1)return r.addNode(c);let f=er(c,{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:m=>{N0(m,this.mirror)&&this.iframeManager.addIframe(m),O0(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Bu(c)&&this.shadowDomManager.addShadowRoot(q.shadowRoot(c),this.doc)},onIframeLoad:(m,d)=>{this.iframeManager.attachIframe(m,d),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,d)=>{this.stylesheetManager.attachLinkElement(m,d)},cssCaptured:u});f&&(e.push({parentId:h,nextId:p,node:f}),n.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)ib(this.removesSubTreeCache,c)&&!this.movedSet.has(q.parentNode(c))||o(c);for(let c of this.addedSet)!ob(this.droppedSet,c)&&!ib(this.removesSubTreeCache,c)||ob(this.movedSet,c)?o(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){let l=this.mirror.getId(q.parentNode(s.value)),u=i(s.value);l!==-1&&u!==-1&&(c=s)}if(!c){let l=r.tail;for(;l;){let u=l;if(l=l.previous,u){let h=this.mirror.getId(q.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){c=u;break}else{let p=u.value,f=q.parentNode(p);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=q.host(f);if(this.mirror.getId(m)!==-1){c=u;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),o(c.value)}let a={texts:this.texts.map(c=>{var l,u;let h=c.node,p=q.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);let f=c.value,m=this.privacySetting==="strict",d=this.privacySetting==="default"&&$b(f),b=(u=(l=c.node)==null?void 0:l.parentElement)==null?void 0:u.getAttribute("data-hl-record");return(m||d)&&!b&&f&&(f=hh(f)),{id:this.mirror.getId(h),value:f}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:l}=c;if(typeof l.style=="string"){let u=JSON.stringify(c.styleDiff),h=JSON.stringify(c.Zo);u.length<l.style.length&&(u+h).split("var(").length===l.style.split("var(").length&&(l.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:l}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),k(this,"genTextAreaValueMutation",e=>{let n=this.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},Zo:{}},this.attributes.push(n),this.attributeMap.set(e,n));let r=Array.from(q.childNodes(e),i=>q.textContent(i)||"").join("");n.attributes.value=Ds({overwriteRecord:null,element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ys(e),value:r,maskInputFn:this.maskInputFn})}),k(this,"processMutation",e=>{if(!jc(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let n=q.textContent(e.target);!Nt(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:rv(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,V0(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{let n=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let s=Ys(n);i=Ds({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:s,value:i,overwriteRecord:n.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Nt(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},Zo:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!nv(n.tagName,r)){if(e.target.tagName==="INPUT"){let s=e.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}if(o.attributes[r]=ev(this.doc,sr(n.tagName),sr(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||l!==s.style.getPropertyPriority(a)?l===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,l]:o.Zo[a]=[c,l]}for(let a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Nt(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{let r=this.mirror.getId(n),i=ci(e.target)?this.mirror.getId(q.host(e.target)):this.mirror.getId(e.target);Nt(e.target,this.blockClass,this.blockSelector,!1)||jc(n,this.mirror,this.slimDOMOptions)||!HP(n,this.mirror)||(this.addedSet.has(n)?(qu(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||x0(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[rb(r,i)]?qu(this.movedSet,n):(this.removes.push({parentId:i,id:r,isShadow:ci(e.target)&&ui(e.target)?!0:void 0}),QP(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),k(this,"genAdds",(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(jc(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[rb(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Nt(e,this.blockClass,this.blockSelector,!1)||(q.childNodes(e).forEach(r=>this.genAdds(r)),Bu(e)&&q.childNodes(q.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=e[n]})}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()}};nt=t=>hi?(...e)=>{try{return t(...e)}catch(n){if(hi&&hi(n)===!0)return;throw n}}:t,Tn=[];iF=["INPUT","TEXTAREA","SELECT"],sb=new WeakMap;ia=class{constructor(e){k(this,"iframeIdToRemoteIdMap",new WeakMap),k(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,n,r,i){let o=r||this.getIdToRemoteIdMap(e),s=i||this.getRemoteIdToIdMap(e),a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(e,n){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return n.map(o=>this.getId(e,o,r,i))}getRemoteId(e,n,r){let i=r||this.getRemoteIdToIdMap(e);return typeof n!="number"?n:i.get(n)||-1}getRemoteIds(e,n){let r=this.getRemoteIdToIdMap(e);return n.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}},th=class{constructor(e){k(this,"iframes",new WeakMap),k(this,"crossOriginIframeMap",new WeakMap),k(this,"crossOriginIframeMirror",new ia(tv)),k(this,"crossOriginIframeStyleMirror"),k(this,"crossOriginIframeRootIdMap",new WeakMap),k(this,"mirror"),k(this,"mutationCb"),k(this,"wrappedEmit"),k(this,"loadListener"),k(this,"stylesheetManager"),k(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ia(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin)return;let r=e.source;if(!r)return;let i=this.crossOriginIframeMap.get(r);if(!i)return;let o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(e,n){var r;switch(n.type){case rt.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);let i=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(n.data.node,i),{timestamp:n.timestamp,type:rt.IncrementalSnapshot,data:{source:et.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case rt.Meta:case rt.Load:case rt.DomContentLoaded:return!1;case rt.Plugin:return n;case rt.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case rt.IncrementalSnapshot:switch(n.data.source){case et.Mutation:return n.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),n.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),n.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),n.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case et.Drag:case et.TouchMove:case et.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),n;case et.ViewportResize:return!1;case et.MediaInteraction:case et.MouseInteraction:case et.Scroll:case et.CanvasMutation:case et.Input:return this.replaceIds(n.data,e,["id"]),n;case et.StyleSheetRule:case et.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case et.Font:return n;case et.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),n;case et.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),(r=n.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),n}}return!1}replace(e,n,r,i){for(let o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=e.getIds(r,n[o]):n[o]=e.getId(r,n[o]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==X0.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},eh=class{constructor(e){k(this,"shadowDoms",new WeakSet),k(this,"mutationCb"),k(this,"scrollCb"),k(this,"bypassOptions"),k(this,"mirror"),k(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!ui(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=U0(Yt(z({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(M0(Yt(z({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(q.host(e))),this.restoreHandlers.push(P0({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,n){let r=this;this.restoreHandlers.push(Zn(e.prototype,"attachShadow",function(i){return function(o){let s=i.call(this,o),a=q.shadowRoot(this);return a&&L0(this)&&r.addShadowRoot(a,n),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(n){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fF=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(oi=0;oi<nr.length;oi++)fF[nr.charCodeAt(oi)]=oi;mF=function(t){var e=new Uint8Array(t),n,r=e.length,i="";for(n=0;n<r;n+=3)i+=nr[e[n]>>2],i+=nr[(e[n]&3)<<4|e[n+1]>>4],i+=nr[(e[n+1]&15)<<2|e[n+2]>>6],i+=nr[e[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},ab=new Map;F0=(t,e,n)=>{if(!t||!(J0(t,e)||typeof t=="object"))return;let r=t.constructor.name,i=yF(n,r),o=i.indexOf(t);return o===-1&&(o=i.length,i.push(t)),o};A0=(t,e,n)=>t.map(r=>Gs(r,e,n)),J0=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function").find(n=>t instanceof e[n]);D0="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIH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aXRtYXAgaXMgdW5jaGFuZ2VkIiwgewogICAgICAgICAgaWQsCiAgICAgICAgICBiYXNlNjQKICAgICAgICB9KTsKICAgICAgfQogICAgICBjb25zdCBtc2cgPSB7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0LAogICAgICAgIGR4LAogICAgICAgIGR5LAogICAgICAgIGR3LAogICAgICAgIGRoCiAgICAgIH07CiAgICAgIGRlYnVnKCJbaGlnaGxpZ2h0LXdvcmtlcl0gY2FudmFzIGJpdG1hcCBwcm9jZXNzZWQiLCBtc2cpOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UobXNnKTsKICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgfSBlbHNlIHsKICAgICAgZGVidWcoIltoaWdobGlnaHQtd29ya2VyXSBubyBvZmZzY3JlZW5jYW52YXMgc3VwcG9ydCIsIHsKICAgICAgICBpZDogZS5kYXRhLmlkCiAgICAgIH0pOwogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCwgc3RhdHVzOiAidW5zdXBwb3J0ZWQiIH0pOwogICAgfQogIH07Cn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWltYWdlLWJpdG1hcC1kYXRhLXVybC13b3JrZXItRHd0SzhBMHouanMubWFwCg==",SF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),ub=typeof self<"u"&&self.Blob&&new Blob([SF(D0)],{type:"text/javascript;charset=utf-8"});nh=class{constructor(e){k(this,"pendingCanvasMutations",new Map),k(this,"rafStamps",{latestId:0,invokeId:null}),k(this,"mirror"),k(this,"logger"),k(this,"worker"),k(this,"snapshotInProgressMap",new Map),k(this,"lastSnapshotTime",new Map),k(this,"options"),k(this,"mutationCb"),k(this,"resetObservers"),k(this,"frozen",!1),k(this,"locked",!1),k(this,"processMutation",(h,p)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(h)||this.pendingCanvasMutations.set(h,[]),this.pendingCanvasMutations.get(h).push(p)});let{sampling:n,win:r,blockClass:i,blockSelector:o,recordCanvas:s,recordLocalVideos:a,recordRemoteVideos:c,initialSnapshotDelay:l,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.logger=e.logger,this.worker=new wF,this.worker.onmessage=h=>{let{id:p}=h.data;if(this.snapshotInProgressMap.set(p,!1),!("base64"in h.data)){this.debug(null,"canvas worker received empty message",{id:p,data:h.data,status:h.data.status});return}let{base64:f,type:m,dx:d,dy:b,dw:v,dh:I}=h.data,R={id:p,type:dr["2D"],commands:[{property:"clearRect",args:[d,b,v,I]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:m}]},d,b,v,I]}]};this.debug(null,"canvas worker recording mutation",R),this.mutationCb(R)},this.options=e,s&&n==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:n}),this.initCanvasMutationObserver(r,i,o)):s&&typeof n=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:n}),this.initCanvasFPSObserver(a,c,n,r,i,o,{initialSnapshotDelay:l,dataURLOptions:u},e.resizeFactor,e.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(e,...n){if(!this.logger)return;let r=this.mirror.getId(e),i="[highlight-canvas-manager]";e&&(i=`[highlight-canvas] [id:${r}]`,e.tagName.toLowerCase()==="canvas"&&(i+=` [ctx:${e.__context}]`)),this.logger.debug(i,e,...n)}snapshot(e){return Dt(this,null,function*(){var n;let r=this.mirror.getId(e);if(this.snapshotInProgressMap.get(r)){this.debug(e,"snapshotting already in progress for",r);return}let i=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),o=this.lastSnapshotTime.get(r);if(!(o&&new Date().getTime()-o<i)){if(this.debug(e,"starting snapshotting"),e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}this.lastSnapshotTime.set(r,new Date().getTime()),this.snapshotInProgressMap.set(r,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(e.__context)){let u=e.getContext(e.__context);((n=u==null?void 0:u.getContextAttributes())==null?void 0:n.preserveDrawingBuffer)===!1&&(u.clear(u.COLOR_BUFFER_BIT),this.debug(e,"cleared webgl canvas to load it into memory",{attributes:u==null?void 0:u.getContextAttributes()}))}if(e.width===0||e.height===0){this.debug(e,"not yet ready",{width:e.width,height:e.height});return}let s=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){let u=Math.max(e.width,e.height);s=Math.min(s,this.options.maxSnapshotDimension/u)}let a=e.width*s,c=e.height*s,l=yield createImageBitmap(e,{resizeWidth:a,resizeHeight:c});this.debug(e,"created image bitmap",{width:l.width,height:l.height}),this.worker.postMessage({id:r,bitmap:l,width:a,height:c,dx:0,dy:0,dw:e.width,dh:e.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[l]),this.debug(e,"sent message")}catch(s){this.debug(e,"failed to snapshot",s)}finally{this.snapshotInProgressMap.set(r,!1)}}})}initCanvasFPSObserver(e,n,r,i,o,s,a,c,l){let u=lb(i,o,s,!0),h=1e3/r,p=0,f,m=new Map,d=(R,E)=>{let T=[];R.querySelectorAll(E).forEach(U=>T.push(U));let V=document.createNodeIterator(R,Node.ELEMENT_NODE),N;for(;N=V.nextNode();)N!=null&&N.shadowRoot&&T.push(...d(N.shadowRoot,E));return T},b=R=>{let E=[];return d(i.document,"canvas").forEach(T=>{if(!Nt(T,o,s,!0)){this.debug(T,"discovered canvas"),E.push(T);let V=this.mirror.getId(T);m.has(V)||m.set(V,R)}}),E},v=R=>{let E=[];return(e||n)&&d(i.document,"video").forEach(T=>{if(!(!n&&T.src!==""&&T.src.indexOf("blob:")===-1)&&!(!e&&(T.src===""||T.src.indexOf("blob:")!==-1))&&!Nt(T,o,s,!0)){E.push(T);let V=this.mirror.getId(T);m.has(V)||m.set(V,R)}}),E},I=R=>Dt(this,null,function*(){if(p&&R-p<h){f=requestAnimationFrame(I);return}p=R;let E=V=>{let N=this.mirror.getId(V),U=m.get(N),C=!a.initialSnapshotDelay||R-U>a.initialSnapshotDelay;return this.debug(V,{delay:a.initialSnapshotDelay,delta:R-U,hadLoadingTime:C}),C},T=[];T.push(...b(R).filter(E).map(V=>this.snapshot(V))),T.push(...v(R).filter(E).map(V=>Dt(this,null,function*(){this.debug(V,"starting video snapshotting");let N=this.mirror.getId(V);if(this.snapshotInProgressMap.get(N)){this.debug(V,"video snapshotting already in progress for",N);return}this.snapshotInProgressMap.set(N,!0);try{let{width:U,height:C}=V.getBoundingClientRect(),{actualWidth:x,actualHeight:M}={actualWidth:V.videoWidth,actualHeight:V.videoHeight},ot=Math.max(x,M);if(ot===0){this.debug(V,"not yet ready",{width:V.width,height:V.height,actualWidth:x,actualHeight:M,boxWidth:U,boxHeight:C});return}let lt=c||1;l&&(lt=Math.min(lt,l/ot));let y=x*lt,g=M*lt,Z=yield createImageBitmap(V,{resizeWidth:y,resizeHeight:g}),D=Math.max(U,C)/ot,P=x*D,O=M*D,it=(U-P)/2,ct=(C-O)/2;this.debug(V,"created image bitmap",{actualWidth:x,actualHeight:M,boxWidth:U,boxHeight:C,outputWidth:P,outputHeight:O,resizeWidth:y,resizeHeight:g,scale:lt,outputScale:D,offsetX:it,offsetY:ct}),this.worker.postMessage({id:N,bitmap:Z,width:y,height:g,dx:it,dy:ct,dw:P,dh:O,dataURLOptions:a.dataURLOptions,logDebug:!!this.logger},[Z]),this.debug(V,"send message")}catch(U){this.debug(V,"failed to snapshot",U)}finally{this.snapshotInProgressMap.set(N,!1)}}))),yield Promise.all(T).catch(console.error),f=requestAnimationFrame(I)});f=requestAnimationFrame(I),this.resetObservers=()=>{u(),f&&cancelAnimationFrame(f)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=lb(e,n,r,!1),o=gF(this.processMutation.bind(this),e,n,r),s=vF(this.processMutation.bind(this),e,n,r);this.resetObservers=()=>{i(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;let i=r.map(s=>or(s,["type"])),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},rh=class{constructor(e){k(this,"trackedLinkElements",new WeakSet),k(this,"mutationCb"),k(this,"adoptedStyleSheetCb"),k(this,"styleMirror",new ju),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;let r={id:n,styleIds:[]},i=[];for(let o of e){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:jb(a,o.href),index:c}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},ih=class{constructor(){k(this,"nodeMap",new WeakMap),k(this,"active",!1)}inOtherBuffer(e,n){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==n)}add(e,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}},oa=!1;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((hg=t.contentWindow)==null?void 0:hg.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}ce=EW();Ge.addCustomEvent=(t,e)=>{oa&&vt({type:rt.Custom,data:{tag:t,payload:e}})};Ge.freezePage=()=>{Tn.forEach(t=>t.freeze())};Ge.takeFullSnapshot=t=>{if(!oa)throw new Error("please take full snapshot after start recording");Ls(t)};Ge.snapshotCanvas=t=>Dt(void 0,null,function*(){if(!pi)throw new Error("canvas manager is not initialized");yield pi.snapshot(t)});Ge.mirror=ce;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(hb||(hb={}));({addCustomEvent:pb}=Ge),IF=t=>{t(window.location.href);let e=history.pushState;history.pushState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),s})(history.pushState);let n=history.replaceState;history.replaceState=(o=>function(){var s=o.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),s})(history.replaceState);let r=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",r);let i=function(){t(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",i),history.pushState=e,history.replaceState=n}},TF=t=>{switch(t){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!1,{password:!0}]}},EF=t=>{let e=n=>{if(n.target){let r=n.target,i=Kb(r);t(i,n)}};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},RF=t=>{let e=n=>{if(n.target){let r=Kb(n.target);t(r)}};return window.addEventListener("focusin",e),()=>window.removeEventListener("focusin",e)},CF=t=>{let e,n;if(typeof document.hidden<"u"?(e="hidden",n="visibilitychange"):typeof document.msHidden<"u"?(e="msHidden",n="msvisibilitychange"):typeof document.webkitHidden<"u"&&(e="webkitHidden",n="webkitvisibilitychange"),n===void 0)return()=>{};if(e===void 0)return()=>{};let r=e,i=()=>{let s=document[r];t(!!s)};document.addEventListener(n,i);let o=n;return()=>document.removeEventListener(o,i)},ZF=t=>{t(window.location.href);var e=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(o){setTimeout(()=>{var s,a;try{a=JSON.parse((s=o==null?void 0:o.toString())!=null?s:"")}catch(c){return}(a.type==="track"||a.type==="identify")&&Qc(a)&&t(a)},100),e.call(this,o)};let n=o=>{if(o.key==="ajs_user_id"||o.key==="ajs_anonymous_id"||o.key==="ajs_user_traits"){let{userId:s,userTraits:a}=db();if(s){let c={};a&&(c=JSON.parse(a));let l={type:"identify",userId:s.toString(),traits:c};Qc(l)&&t(l)}}},{userId:r,userTraits:i}=db();if(r){let o={};i&&(o=JSON.parse(i));let s={type:"identify",userId:r.toString(),traits:o};Qc(s)&&t(s)}return window.addEventListener("storage",n),CX(({keyName:o})=>{n({key:o})}),()=>{window.removeEventListener("storage",n),XMLHttpRequest.prototype.send=e}},db=()=>{let t=ie("ajs_user_id"),e=ie("ajs_user_traits"),n=ie("ajs_anonymous_id");return{userId:t,userTraits:e,anonymousId:n}},Qc=t=>{if(!t)return!1;let e="";try{e=JSON.stringify(t)}catch(i){return!1}let n=kF(e),r=ie(Ht.SEGMENT_LAST_SENT_HASH_KEY);return r===void 0||n!==r?(je(Ht.SEGMENT_LAST_SENT_HASH_KEY,n),!0):!1},kF=t=>{var e=0,n=t.length,r=0;if(n>0)for(;r<n;)e=(e<<5)-e+t.charCodeAt(r++)|0;return e.toString()},VF=(t,e)=>{let n=xF(t),r=[],i=!1,o=!0;for(let s=0;s<n.length;s++){let a=n[s].split("+");r=[],a.length>1&&(r=GF(Y0,a)),a=a[a.length-1],a=a==="*"?"*":OF(a),a in Ie||(Ie[a]=[]),Ie[a].push({mods:r,shortcut:n[s],key:n[s],method:e,keyup:i,keydown:o,scope:"all",splitKey:"+"})}LF(document,"keydown",s=>{WF(s)})},Ut=[];Ie={},$c=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,NF={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,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":$c?173:189,"=":$c?61:187,";":$c?59:186,"'":222,"[":219,"]":221,"\\":220},fb={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Mt={16:!1,18:!1,17:!1,91:!1},Y0={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},OF=t=>NF[t.toLowerCase()]||Y0[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);mb="iframe parent ready",yb="iframe ok",Ri="highlightLogs",UF=t=>{let e=ie(Ri)||"";e=e+"["+new Date().getTime()+"] "+t+`
|
|
339
339
|
`,je(Ri,e)},MF=()=>ie(Ri)||"",PF=t=>{if(!t)return;let e=ie(Ri)||"";e&&(e.startsWith(t)?(e=e.slice(t.length),je(Ri,e)):UF("Unable to clear logs "+t.replace(`
|
|
340
340
|
`," ")+"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zc2FnZS5yZWNvcmRpbmdTdGFydFRpbWUsYy5kZWJ1Zz1zLGU9RHIobmV3IGNyKHQse2hlYWRlcnM6e319KSxNcigpKTtyZXR1cm59aWYoZCgpKXRyeXtnLmRhdGEubWVzc2FnZS50eXBlPT09Sy5Bc3luY0V2ZW50cz95aWVsZCB5KGcuZGF0YS5tZXNzYWdlKTpnLmRhdGEubWVzc2FnZS50eXBlPT09Sy5JZGVudGlmeT95aWVsZCB2KGcuZGF0YS5tZXNzYWdlKTpnLmRhdGEubWVzc2FnZS50eXBlPT09Sy5Qcm9wZXJ0aWVzP3lpZWxkIGIoZy5kYXRhLm1lc3NhZ2UpOmcuZGF0YS5tZXNzYWdlLnR5cGU9PT1LLk1ldHJpY3M/eWllbGQgbShnLmRhdGEubWVzc2FnZSk6Zy5kYXRhLm1lc3NhZ2UudHlwZT09PUsuRmVlZGJhY2smJih5aWVsZCBOKGcuZGF0YS5tZXNzYWdlKSksaT0wfWNhdGNoKEUpe3MmJmNvbnNvbGUuZXJyb3IoRSksaSs9MX19KX19fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aGlnaGxpZ2h0LWNsaWVudC13b3JrZXItQ3BtbDJKMXQuanMubWFwCg==",FF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),bb=typeof self<"u"&&self.Blob&&new Blob([FF(_0)],{type:"text/javascript;charset=utf-8"});Ne=(t=>(t[t.Initialize=0]="Initialize",t[t.AsyncEvents=1]="AsyncEvents",t[t.Identify=2]="Identify",t[t.Properties=3]="Properties",t[t.Metrics=4]="Metrics",t[t.Feedback=5]="Feedback",t[t.CustomEvent=6]="CustomEvent",t[t.Stop=7]="Stop",t))(Ne||{}),JF=({apiKey:t})=>{(function(e,n){var r=e.amplitude||{Sr:[],Fr:{}},i=n.createElement("script");i.type="text/javascript",i.integrity="sha384-+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+",i.crossOrigin="anonymous",i.async=!0,i.src="https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js",i.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(t)};var o=n.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o);function s(d,b){d.prototype[b]=function(){return this.Sr.push([b].concat(Array.prototype.slice.call(arguments,0))),this}}for(var a=function(){return this.Sr=[],this},c=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],l=0;l<c.length;l++)s(a,c[l]);r.Identify=a;for(var u=function(){return this.Sr=[],this},h=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],p=0;p<h.length;p++)s(u,h[p]);r.Revenue=u;var f=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function m(d){function b(I){d[I]=function(){d.Sr.push([I].concat(Array.prototype.slice.call(arguments,0)))}}for(var v=0;v<f.length;v++)b(f[v])}m(r),r.getInstance=function(d){return d=(!d||d.length===0?"$default_instance":d).toLowerCase(),Object.prototype.hasOwnProperty.call(r.Fr,d)||(r.Fr[d]={Sr:[]},m(r.Fr[d])),r.Fr[d]},e.amplitude=r})(window,document)},DF=({projectToken:t})=>{if(window.mixpanel)return;(function(n,r){if(!r.__SV){var i,o;window.mixpanel=r,r.Ar=[],r.init=function(s,a,c){function l(p,f){var m=f.split(".");m.length==2&&(p=p[m[0]],f=m[1]),p[f]=function(){p.push([f].concat(Array.prototype.slice.call(arguments,0)))}}var u=r;for(typeof c<"u"?u=r[c]=[]:c="mixpanel",u.people=u.people||[],u.toString=function(p){var f="mixpanel";return c!=="mixpanel"&&(f+="."+c),p||(f+=" (stub)"),f},u.people.toString=function(){return u.toString(1)+".people (stub)"},i="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(" "),o=0;o<i.length;o++)l(u,i[o]);var h="set set_once union unset remove delete".split(" ");u.get_group=function(){function p(b){f[b]=function(){call2_args=arguments,call2=[b].concat(Array.prototype.slice.call(call2_args,0)),u.push([m,call2])}}for(var f={},m=["get_group"].concat(Array.prototype.slice.call(arguments,0)),d=0;d<h.length;d++)p(h[d]);return f},r.Ar.push([s,a,c])},r.__SV=1.2}})(document,window.mixpanel||[]);let e=document.createElement("script");e.src=YF,document.head.appendChild(e),e.addEventListener("load",()=>{var n;(n=window.mixpanel)==null||n.init(t)})},YF="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",KF="9.15.0",oh=class{constructor(e){Y(this,"options"),Y(this,"isRunningOnHighlight"),Y(this,"organizationID"),Y(this,"graphqlSDK"),Y(this,"events"),Y(this,"sessionData"),Y(this,"ready"),Y(this,"manualStopped"),Y(this,"state"),Y(this,"logger"),Y(this,"enableSegmentIntegration"),Y(this,"privacySetting"),Y(this,"enableCanvasRecording"),Y(this,"samplingStrategy"),Y(this,"inlineImages"),Y(this,"inlineVideos"),Y(this,"inlineStylesheet"),Y(this,"debugOptions"),Y(this,"listeners"),Y(this,"firstloadVersion"),Y(this,"environment"),Y(this,"sessionShortcut"),Y(this,"appVersion"),Y(this,"serviceName"),Y(this,"_worker"),Y(this,"_optionsInternal"),Y(this,"_backendUrl"),Y(this,"_recordingStartTime"),Y(this,"_isOnLocalHost"),Y(this,"_onToggleFeedbackFormVisibility"),Y(this,"_isCrossOriginIframe"),Y(this,"_eventBytesSinceSnapshot"),Y(this,"_lastSnapshotTime"),Y(this,"_lastVisibilityChangeTime"),Y(this,"pushPayloadTimerId"),Y(this,"hasSessionUnloaded"),Y(this,"hasPushedData"),Y(this,"reloaded"),Y(this,"_hasPreviouslyInitialized"),Y(this,"_recordStop"),Y(this,"_integrations",[]);var n,r,i,o,s;this.options=e,typeof((n=this.options)==null?void 0:n.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(i=(r=this.options)==null?void 0:r.debug)!=null?i:{},this.logger=new vb(this.debugOptions.clientInteractions),this.Qn=new AF,this.Qn.onmessage=c=>{var l,u,h;((l=c.data.response)==null?void 0:l.type)===Ne.AsyncEvents?(this.wr+=c.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${c.data.response.id} size ${c.data.response.eventsSize} bytes, compression ratio ${c.data.response.eventsSize/c.data.response.compressedSize}.
|
|
341
|
+
`," ")))},K0="dmFyIFZyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxqcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyIEJlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIFF0PU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksWHQ9T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgY3Q9KE0sRCxDKT0+RCBpbiBNP1ZyKE0sRCx7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6Q30pOk1bRF09QyxQPShNLEQpPT57Zm9yKHZhciBDIGluIER8fChEPXt9KSlRdC5jYWxsKEQsQykmJmN0KE0sQyxEW0NdKTtpZihCZSlmb3IodmFyIEMgb2YgQmUoRCkpWHQuY2FsbChELEMpJiZjdChNLEMsRFtDXSk7cmV0dXJuIE19LFVlPShNLEQpPT5qcihNLHFyKEQpKTt2YXIgZ2U9KE0sRCk9Pnt2YXIgQz17fTtmb3IodmFyIEogaW4gTSlRdC5jYWxsKE0sSikmJkQuaW5kZXhPZihKKTwwJiYoQ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&new Blob([FF(K0)],{type:"text/javascript;charset=utf-8"});Ne=(t=>(t[t.Initialize=0]="Initialize",t[t.AsyncEvents=1]="AsyncEvents",t[t.Identify=2]="Identify",t[t.Properties=3]="Properties",t[t.Metrics=4]="Metrics",t[t.Feedback=5]="Feedback",t[t.CustomEvent=6]="CustomEvent",t[t.Stop=7]="Stop",t))(Ne||{}),JF=({apiKey:t})=>{(function(e,n){var r=e.amplitude||{Sr:[],Fr:{}},i=n.createElement("script");i.type="text/javascript",i.integrity="sha384-+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+",i.crossOrigin="anonymous",i.async=!0,i.src="https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js",i.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(t)};var o=n.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o);function s(d,b){d.prototype[b]=function(){return this.Sr.push([b].concat(Array.prototype.slice.call(arguments,0))),this}}for(var a=function(){return this.Sr=[],this},c=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],l=0;l<c.length;l++)s(a,c[l]);r.Identify=a;for(var u=function(){return this.Sr=[],this},h=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],p=0;p<h.length;p++)s(u,h[p]);r.Revenue=u;var f=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function m(d){function b(I){d[I]=function(){d.Sr.push([I].concat(Array.prototype.slice.call(arguments,0)))}}for(var v=0;v<f.length;v++)b(f[v])}m(r),r.getInstance=function(d){return d=(!d||d.length===0?"$default_instance":d).toLowerCase(),Object.prototype.hasOwnProperty.call(r.Fr,d)||(r.Fr[d]={Sr:[]},m(r.Fr[d])),r.Fr[d]},e.amplitude=r})(window,document)},DF=({projectToken:t})=>{if(window.mixpanel)return;(function(n,r){if(!r.__SV){var i,o;window.mixpanel=r,r.Ar=[],r.init=function(s,a,c){function l(p,f){var m=f.split(".");m.length==2&&(p=p[m[0]],f=m[1]),p[f]=function(){p.push([f].concat(Array.prototype.slice.call(arguments,0)))}}var u=r;for(typeof c<"u"?u=r[c]=[]:c="mixpanel",u.people=u.people||[],u.toString=function(p){var f="mixpanel";return c!=="mixpanel"&&(f+="."+c),p||(f+=" (stub)"),f},u.people.toString=function(){return u.toString(1)+".people (stub)"},i="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(" "),o=0;o<i.length;o++)l(u,i[o]);var h="set set_once union unset remove delete".split(" ");u.get_group=function(){function p(b){f[b]=function(){call2_args=arguments,call2=[b].concat(Array.prototype.slice.call(call2_args,0)),u.push([m,call2])}}for(var f={},m=["get_group"].concat(Array.prototype.slice.call(arguments,0)),d=0;d<h.length;d++)p(h[d]);return f},r.Ar.push([s,a,c])},r.__SV=1.2}})(document,window.mixpanel||[]);let e=document.createElement("script");e.src=YF,document.head.appendChild(e),e.addEventListener("load",()=>{var n;(n=window.mixpanel)==null||n.init(t)})},YF="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",KF="9.15.0",oh=class{constructor(e){Y(this,"options"),Y(this,"isRunningOnHighlight"),Y(this,"organizationID"),Y(this,"graphqlSDK"),Y(this,"events"),Y(this,"sessionData"),Y(this,"ready"),Y(this,"manualStopped"),Y(this,"state"),Y(this,"logger"),Y(this,"enableSegmentIntegration"),Y(this,"privacySetting"),Y(this,"enableCanvasRecording"),Y(this,"samplingStrategy"),Y(this,"inlineImages"),Y(this,"inlineVideos"),Y(this,"inlineStylesheet"),Y(this,"debugOptions"),Y(this,"listeners"),Y(this,"firstloadVersion"),Y(this,"environment"),Y(this,"sessionShortcut"),Y(this,"appVersion"),Y(this,"serviceName"),Y(this,"_worker"),Y(this,"_optionsInternal"),Y(this,"_backendUrl"),Y(this,"_recordingStartTime"),Y(this,"_isOnLocalHost"),Y(this,"_onToggleFeedbackFormVisibility"),Y(this,"_isCrossOriginIframe"),Y(this,"_eventBytesSinceSnapshot"),Y(this,"_lastSnapshotTime"),Y(this,"_lastVisibilityChangeTime"),Y(this,"pushPayloadTimerId"),Y(this,"hasSessionUnloaded"),Y(this,"hasPushedData"),Y(this,"reloaded"),Y(this,"_hasPreviouslyInitialized"),Y(this,"_recordStop"),Y(this,"_integrations",[]);var n,r,i,o,s;this.options=e,typeof((n=this.options)==null?void 0:n.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(i=(r=this.options)==null?void 0:r.debug)!=null?i:{},this.logger=new bb(this.debugOptions.clientInteractions),this.Qn=new AF,this.Qn.onmessage=c=>{var l,u,h;((l=c.data.response)==null?void 0:l.type)===Ne.AsyncEvents?(this.wr+=c.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${c.data.response.id} size ${c.data.response.eventsSize} bytes, compression ratio ${c.data.response.eventsSize/c.data.response.compressedSize}.
|
|
342
342
|
Total since snapshot: ${(this.wr/1e6).toFixed(1)}MB`)):((u=c.data.response)==null?void 0:u.type)===Ne.CustomEvent?this.addCustomEvent(c.data.response.tag,c.data.response.payload):((h=c.data.response)==null?void 0:h.type)===Ne.Stop&&(zt("worker.onmessage","warn","Stopping recording due to worker failure",c.data.response),this.stop(!1))};let a=ks();if(this.reloaded=!1,!((o=this.sessionData)!=null&&o.sessionSecureID)&&a!=null&&a.sessionSecureID)this.sessionData=a,this.options.sessionSecureID=a.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(let c of Object.values(Ht))hu(c);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now()}}this.Ms=!1;try{window.parent.document&&(this.ko=!1)}catch(c){this.ko=(s=this.options.recordCrossOriginIframe)!=null?s:!0}this.Sl(this.options)}Ps(e){return Dt(this,arguments,function*({forceNew:n}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let r,i;if(!n)try{r=ie(Ht.USER_IDENTIFIER);let o=ie(Ht.USER_OBJECT);o&&(i=JSON.parse(o))}catch(o){}for(let o of Object.values(Ht))hu(o);this.sessionData.sessionSecureID=du(),this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),yield this.start(),r&&i&&this.identify(r,i)})}Sl(e){var n,r,i,o,s,a,c,l,u;this.sessionShortcut=!1,this.$n=0,this.Vo=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=!!e.enableSegmentIntegration,this.privacySetting=(n=e.privacySetting)!=null?n:"default",this.enableCanvasRecording=(r=e.enableCanvasRecording)!=null?r:!1,this.inlineImages=(i=e.inlineImages)!=null?i:this.Vo,this.inlineVideos=(o=e.inlineVideos)!=null?o:this.Vo,this.inlineStylesheet=(s=e.inlineStylesheet)!=null?s:this.Vo,this.samplingStrategy=z({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:mX()},(a=e.samplingStrategy)!=null?a:{canvas:2}),this.mn=(c=e==null?void 0:e.backendUrl)!=null?c:"https://pub.observability.app.launchdarkly.com",this.mn[0]==="/"&&(this.mn=new URL(this.mn,document.baseURI).href);let h=new KL(`${this.mn}`,{headers:{}});this.graphqlSDK=dX(h,WX()),this.environment=(l=e.environment)!=null?l:"production",this.appVersion=e.appVersion,this.serviceName=(u=e.serviceName)!=null?u:"browser",typeof e.organizationID=="string"?this.organizationID=e.organizationID:this.organizationID=e.organizationID.toString(),this.isRunningOnHighlight=this.organizationID==="1"||this.organizationID==="1jdkoe52",this.firstloadVersion=e.firstloadVersion||"unknown",this.sessionShortcut=e.sessionShortcut||!1,this.kl=()=>{};let p=e,f=or(p,["firstloadVersion"]);this.wl=f,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.wr=0,this.xo=new Date().getTime(),this.Fs=new Date().getTime()}identify(e,n={},r){if(!e||e===""){console.warn("Highlight's identify() call was passed an empty identifier.",{user_identifier:e,user_object:n});return}this.sessionData.userIdentifier=e.toString(),this.sessionData.userObject=n,je(Ht.USER_IDENTIFIER,e.toString()),je(Ht.USER_OBJECT,JSON.stringify(n)),this.Qn.postMessage({message:{type:Ne.Identify,userIdentifier:e,userObject:n,source:r}})}track(e,n){this.addProperties(Yt(z({},n),{event:e}))}addProperties(e={},n){let r=z({},e);Object.entries(r).forEach(([i,o])=>{try{structuredClone(o)}catch(s){delete r[i]}}),this.Qn.postMessage({message:{type:Ne.Properties,propertiesObject:r,propertyType:n}})}start(e){return Dt(this,null,function*(){var n,r,i,o,s,a,c,l;if(!(navigator!=null&&navigator.webdriver&&!window.Cypress||(n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("Googlebot")||(r=navigator==null?void 0:navigator.userAgent)!=null&&r.includes("AdsBot")))try{if(e!=null&&e.forceNew){yield this.Ps(e);return}this.logger.log("Initializing...",e,this.sessionData,this.options),this.sessionData=(i=ks(this.sessionData.sessionSecureID))!=null?i:this.sessionData,(o=this.sessionData)!=null&&o.sessionStartTime?this.$n=(s=this.sessionData)==null?void 0:s.sessionStartTime:(this.$n=new Date().getTime(),this.sessionData.sessionStartTime=this.$n);let u=ie(lu.CLIENT_ID);u||(u=du(),je(lu.CLIENT_ID,u));let h;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?h=!1:h=((a=this.options.networkRecording)==null?void 0:a.recordHeadersAndBody)||!1;let p=[];if(typeof this.options.networkRecording=="object"&&(c=this.options.networkRecording.destinationDomains)!=null&&c.length&&(p=this.options.networkRecording.destinationDomains),this.ko)yield this.Il();else{let v=yield this.graphqlSDK.initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:h,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this.wl),environment:this.environment,id:u,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,client_id:u,network_recording_domains:p,disable_session_recording:this.options.disableSessionRecording});if(v.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${v.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=v.initializeSession.secure_id,this.sessionData.projectID=parseInt(((l=v==null?void 0:v.initializeSession)==null?void 0:l.project_id)||"0"),!this.sessionData.projectID||!this.sessionData.sessionSecureID){console.error("Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}li(""),In(this.sessionData),this.logger.log(`Loaded Highlight
|
|
343
343
|
Remote: ${this.mn}
|
|
344
344
|
Project ID: ${this.sessionData.projectID}
|
|
345
|
-
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.Qn.postMessage({message:{type:Ne.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this.mn,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this.$n}});for(let v of this.Gn)v.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.ko||(this.pushPayloadTimerId=setTimeout(()=>{this.As()},
|
|
345
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.Qn.postMessage({message:{type:Ne.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this.mn,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this.$n}});for(let v of this.Gn)v.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.ko||(this.pushPayloadTimerId=setTimeout(()=>{this.As()},og)),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}let f=(v,I)=>{I&&this.logger.log("received isCheckout emit",{event:v}),this.events.push(v)};f.bind(this);let m=!!this.Tn;this.Tn&&(this.Tn(),this.Tn=void 0);let[d,b]=TF(this.privacySetting);this.Tn=Ge({ignoreClass:"highlight-ignore",blockClass:"highlight-block",emit:f,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:this.privacySetting,maskAllInputs:d,maskInputOptions:b,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:v=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,plugins:[tW()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:zt.bind("RecordSDK","warn")}:void 0}),m||this.options.recordCrossOriginIframe&&this.Tl(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.El(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(u){zt("initializeSession _setupWindowListeners","warn",u)}})}Js(e){return Dt(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this.Fs<bX||(this.Fs=new Date().getTime(),this.logger.log(`Detected window ${e?"hidden":"visible"}.`),e?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stop()):(this.options.disableBackgroundRecording&&(yield this.start()),this.addCustomEvent("TabHidden",!1)))})}Il(){return Dt(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(e=>{let n=r=>{if(r.data.highlight===mb){let i=r.data;this.logger.log("highlight got window message ",i),this.sessionData.projectID=i.projectID,this.sessionData.sessionSecureID=i.sessionSecureID,window.parent.postMessage({highlight:yb},"*"),window.removeEventListener("message",n),e()}};window.addEventListener("message",n)})})}Tl(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(e=>{var n;(n=e.contentWindow)==null||n.postMessage({highlight:mb,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},og),window.addEventListener("message",e=>{e.data.highlight===yb&&this.logger.log("highlight got response from initialized iframe")})}El(){var e;try{let r=this;this.enableSegmentIntegration&&this.listeners.push(ZF(o=>{if(o.type==="track"){let s={};s["segment-event"]=o.event,r.addProperties(s,{type:"track",source:"segment"})}else if(o.type==="identify"){let s=o.userId.replace(/^"(.*)"$/,"$1");r.identify(s,o.traits,"segment")}})),this.listeners.push(IF(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,r.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(_X(o=>{this.addCustomEvent("Viewport",o)})),this.listeners.push(EF((o,s)=>{let a=null,c=null;if(s&&s.target){let l=s.target;a=YX(l),c=l.textContent,c&&c.length>2e3&&(c=c.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:o,clickTextContent:c,clickSelector:a})})),this.listeners.push(RF(o=>{o&&this.addCustomEvent("Focus",o)})),this.sessionShortcut&&VF(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")}),this.Ms||((e=window.electron)!=null&&e.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:o})=>{this.Js(!o)}),this.logger.log("Set up Electron highlight.run events.")):(CF(o=>this.Js(o)),this.logger.log("Set up document visibility listener.")),this.Ms=!0);let i=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",i),this.listeners.push(()=>window.removeEventListener("beforeunload",i))}catch(r){zt("initializeSession _setupWindowListeners","warn",r)}let n=()=>{this.addCustomEvent("Page Unload",""),li(this.sessionData.sessionSecureID),In(this.sessionData)};if(window.addEventListener("beforeunload",n),this.listeners.push(()=>window.removeEventListener("beforeunload",n)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){let r=()=>{this.addCustomEvent("Page Unload",""),li(this.sessionData.sessionSecureID),In(this.sessionData)};window.addEventListener("pagehide",r),this.listeners.push(()=>window.removeEventListener("beforeunload",r))}}stop(e){this.manualStopped=!!e,this.manualStopped&&this.addCustomEvent("Stop","H.stop() was called which stops Highlight from recording."),this.state="NotRecording",e&&this.Tn&&(this.Tn(),this.Tn=void 0),this.listeners.forEach(n=>n()),this.listeners=[]}getCurrentSessionURLWithTimestamp(){let e=new Date().getTime(),{projectID:n,sessionSecureID:r}=this.sessionData,i=(e-this.$n)/1e3;return`https://${ag}/${n}/sessions/${r}?ts=${i}`}getCurrentSessionURL(){let e=this.sessionData.projectID,n=this.sessionData.sessionSecureID;return e&&n?`https://${ag}/${e}/sessions/${n}`:null}snapshot(e){return Dt(this,null,function*(){yield Ge.snapshotCanvas(e)})}addSessionFeedback({timestamp:e,verbatim:n,user_email:r,user_name:i}){var o;this.Qn.postMessage({message:{type:Ne.Feedback,verbatim:n,timestamp:e,userName:i||this.sessionData.userIdentifier,userEmail:r||((o=this.sessionData.userObject)==null?void 0:o.name)}})}As(){return Dt(this,null,function*(){var e;try{this.state==="Recording"&&this.listeners&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>gX&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this.Ps({}));let n;((e=this.options)==null?void 0:e.sendMode)==="local"&&(n=r=>Dt(this,null,function*(){let i=new Blob([JSON.stringify({query:Ob(Mb),variables:r})],{type:"application/json"});return yield window.fetch(`${this.mn}`,{method:"POST",body:i}),0})),yield this.Rl({sendFn:n}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),In(this.sessionData)}catch(n){zt("_save","warn",n)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this.As()},yX))})}addCustomEvent(e,n){if(this.state==="NotRecording"){let r,i=()=>{clearInterval(r),this.state==="Recording"&&this.events.length>0?pb(e,n):r=setTimeout(i,500)};r=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&pb(e,n)}Rl(e){return Dt(this,arguments,function*({sendFn:n}){let r=[...this.events],{bytes:i,time:o}=this.enableCanvasRecording?sg.canvas:sg.normal;this.wr>=i&&new Date().getTime()-this.xo>=o&&this.takeFullSnapshot(),this.logger.log(`Sending: ${r.length} events,
|
|
346
346
|
To: ${this.mn}
|
|
347
347
|
Org: ${this.organizationID}
|
|
348
|
-
SessionSecureID: ${this.sessionData.sessionSecureID}`);let s=MF();n?yield n({session_secure_id:this.sessionData.sessionSecureID,payload_id:(this.sessionData.payloadID++).toString(),events:{events:r},messages:BL({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:s||void 0}):this.Qn.postMessage({message:{type:Ne.AsyncEvents,id:this.sessionData.payloadID++,events:r,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:s}}),In(this.sessionData),this.events=this.events.slice(r.length),PF(s)})}takeFullSnapshot(){if(!this.Tn){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this.wr,lastSnapshotTime:this.xo}),Ge.takeFullSnapshot(),this.wr=0,this.xo=new Date().getTime()}register(e,n){this.Gn.push(new pu(e,n))}getHooks(e){return this.Gn.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}getRecordingState(){var e;return(e=this==null?void 0:this.state)!=null?e:"NotRecording"}getSession(){let e=this.sessionData.sessionSecureID,n=ks(e);if(!n)return null;let r=`${this.getFrontendUrl()}/sessions/${e}`;if(!r||!(n!=null&&n.sessionStartTime))return null;let i=new Date().getTime(),o=new URL(r),s=new URL(r),a=(i-this.$n)/1e3;return s.searchParams.set("ts",a.toString()),{url:o.toString(),urlWithTimestamp:s.toString(),sessionSecureID:e}}getFrontendUrl(){var e,n;let r=this.mn.match(IX);if(r&&(e=r==null?void 0:r.groups)!=null&&e.domain){let i=(n=r.groups.domain)!=null?n:"";return`https://${SX[i]}${wX}`}return vX}},Ci=class extends HX{constructor(e,n){var r=(...f)=>(super(...f),Y(this,"record"),this),i,o,s,a,c,l,u,h,p;try{if(r(n),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(!e){console.warn("@launchdarkly/session-replay is not initializing because projectID was passed undefined.");return}let f=Yt(z({},n),{organizationID:e,firstloadVersion:KF,environment:(n==null?void 0:n.environment)||"production",appVersion:n==null?void 0:n.version,sessionSecureID:this.sessionSecureID,privacySetting:(i=n==null?void 0:n.privacySetting)!=null?i:"strict"});this.record=new oh(f),n!=null&&n.manualStart||this.record.start(),Be.load(this.record),!((s=(o=n==null?void 0:n.integrations)==null?void 0:o.mixpanel)!=null&&s.disabled)&&(c=(a=n==null?void 0:n.integrations)==null?void 0:a.mixpanel)!=null&&c.projectToken&&DF(n.integrations.mixpanel),!((u=(l=n==null?void 0:n.integrations)==null?void 0:l.amplitude)!=null&&u.disabled)&&(p=(h=n==null?void 0:n.integrations)==null?void 0:h.amplitude)!=null&&p.apiKey&&JF(n.integrations.amplitude)}catch(f){zt("Error initializing @launchdarkly/session-replay SDK","error",f)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(e,n){var r;(r=this.record)==null||r.register(e,n)}getHooks(e){return[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(n,r,i)=>{var o,s,a,c,l,u,h;for(let p of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=p.afterIdentify)==null||c.call(p,n,r,i);if(i.status==="completed"){let p=AX(n.context),f=JX(n.context);(h=this.record)==null||h.identify(typeof f=="string"?f:(u=(l=f.user)==null?void 0:l.toString())!=null?u:p,Yt(z({key:p},typeof f=="object"?f:{}),{timeout:n.timeout}),"LaunchDarkly")}return r},afterEvaluation:(n,r,i)=>{var o,s,a,c;for(let l of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=l.afterEvaluation)==null||c.call(l,n,r,i);return r},afterTrack:n=>{var r,i,o,s,a;for(let c of(o=(i=(r=this.record)==null?void 0:r.getHooks)==null?void 0:i.call(r,e))!=null?o:[])(s=c.afterTrack)==null||s.call(c,n);(a=this.record)==null||a.track(n.key,{data:n.data,value:n.metricValue})}}]}}});var HF={};Yh(HF,{LDObserve:()=>De,LDRecord:()=>Be,basicLogger:()=>QI,createClient:()=>_F});module.exports=nS(HF);var rS=Object.defineProperty,iS=Object.defineProperties,oS=Object.getOwnPropertyDescriptors,Pi=Object.getOwnPropertySymbols,mp=Object.prototype.hasOwnProperty,yp=Object.prototype.propertyIsEnumerable,Kh=(t,e,n)=>e in t?rS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,at=(t,e)=>{for(var n in e||(e={}))mp.call(e,n)&&Kh(t,n,e[n]);if(Pi)for(var n of Pi(e))yp.call(e,n)&&Kh(t,n,e[n]);return t},me=(t,e)=>iS(t,oS(e)),gp=(t,e)=>{var n={};for(var r in t)mp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Pi)for(var r of Pi(t))e.indexOf(r)<0&&yp.call(t,r)&&(n[r]=t[r]);return n};function sS(t){return`/${t.replace(/~/g,"~0").replace(/\//g,"~1")}`}function bp(t){return t.indexOf("~")?t.replace(/~1/g,"/").replace(/~0/g,"~"):t}function aS(t){return(t.startsWith("/")?t.substring(1):t).split("/").map(e=>bp(e))}function lS(t){return!t.startsWith("/")}function cS(t){return!t.match(/\/\/|(^\/.*~[^0|^1])|~$/)}var Nn=class{constructor(t,e=!1){if(e){let n=t;this.g=[n],this.isValid=n!=="",this.redactionName=n.startsWith("/")?sS(n):n}else{if(this.redactionName=t,t===""||t==="/"||!cS(t)){this.isValid=!1,this.g=[];return}lS(t)?this.g=[t]:t.indexOf("/",1)<0?this.g=[bp(t.slice(1))]:this.g=aS(t),this.g[0]==="_meta"?this.isValid=!1:this.isValid=!0}}get(t){let{g:e,isValid:n}=this;if(!n)return;let r=t;for(let i=0;i<e.length;i+=1){let o=e[i];if(r!=null&&Object.prototype.hasOwnProperty.call(r,o)&&typeof r=="object"&&!Array.isArray(r))r=r[o];else return}return r}getComponent(t){return this.g[t]}get depth(){return this.g.length}get isKind(){return this.g.length===1&&this.g[0]==="kind"}compare(t){return this.depth===t.depth&&this.g.every((e,n)=>e===t.getComponent(n))}get components(){return[...this.g]}};Nn.InvalidReference=new Nn("");var uS=class{is(t){if(Array.isArray(t))return!1;let e=typeof t;return e==="function"||e==="object"}getType(){return"factory method or object"}},Ln=class{constructor(t,e){this.wt=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?!1:typeof t===this.typeOf}getType(){return this.wt}},vp=class{constructor(t,e){this.wt=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?t.length>0?t.every(e=>typeof e===this.typeOf):!0:!1}getType(){return this.wt}},Sp=class extends Ln{constructor(t){super(`number with minimum value of ${t}`,0),this.min=t}is(t){return typeof t===this.typeOf&&t>=this.min}},wp=class extends Ln{constructor(t){super(`string matching ${t}`,""),this.expression=t}is(t){return typeof t=="string"&&!!t.match(this.expression)}},hS=class{is(t){return typeof t=="function"}getType(){return"function"}},pS=class{is(t){return typeof t=="boolean"||typeof t=="undefined"||t===null}getType(){return"boolean | undefined | null"}},dS=/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d*)?(Z|[-+]\d\d(:\d\d)?)/,fS=class{is(t){return typeof t=="number"||typeof t=="string"&&dS.test(t)}getType(){return"date"}},mS=class extends wp{constructor(){super(/^(\w|\.|-)+$/)}is(t){return super.is(t)&&t!=="kind"}},G=class{static createTypeArray(t,e){return new vp(t,e)}static numberWithMin(t){return new Sp(t)}static stringMatchingRegex(t){return new wp(t)}};G.String=new Ln("string","");G.Number=new Ln("number",0);G.ObjectOrFactory=new uS;G.Object=new Ln("object",{});G.StringArray=new vp("string[]","");G.Boolean=new Ln("boolean",!0);G.Function=new hS;G.Date=new fS;G.Kind=new mS;G.NullableBoolean=new pS;function Ip(t){return"kind"in t?G.String.is(t.kind)&&t.kind!=="multi":!1}function Tp(t){return"kind"in t?G.String.is(t.kind)&&t.kind==="multi":!1}function Ep(t){return!("kind"in t)||t.kind===null||t.kind===void 0}function Fi(t,e=[]){if(t===null||typeof t!="object")return JSON.stringify(t);if(e.includes(t))throw new Error("Cycle detected");return Array.isArray(t)?`[${t.map(n=>Fi(n,[...e,t])).map(n=>n===void 0?"null":n).join(",")}]`:`{${Object.keys(t).sort().map(n=>{let r=Fi(t[n],[...e,t]);if(r!==void 0)return`${JSON.stringify(n)}:${r}`}).filter(n=>n!==void 0).join(",")}}`}var Xa="user";function _h(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function yS(t){return t&&G.Object.is(t)}function Hh(t){return G.Kind.is(t)}function zh(t){return G.String.is(t)&&t!==""}function Ca(t,e=!1){return t?t.map(n=>new Nn(n,e)):[]}function gS(t){return t!=null}function bS(t){let e=me(at({},t.custom||[]),{kind:"user",key:String(t.key)});if(gS(t.anonymous)){let n=!!t.anonymous;delete e.anonymous,e.anonymous=n}return t.name!==null&&t.name!==void 0&&(e.name=t.name),t.ip!==null&&t.ip!==void 0&&(e.ip=t.ip),t.firstName!==null&&t.firstName!==void 0&&(e.firstName=t.firstName),t.lastName!==null&&t.lastName!==void 0&&(e.lastName=t.lastName),t.email!==null&&t.email!==void 0&&(e.email=t.email),t.avatar!==null&&t.avatar!==void 0&&(e.avatar=t.avatar),t.country!==null&&t.country!==void 0&&(e.country=t.country),t.privateAttributeNames!==null&&t.privateAttributeNames!==void 0&&(e._meta={privateAttributes:t.privateAttributeNames}),e}var xn=class wt{constructor(e,n,r){this.I=!1,this.it=!1,this.ie=!1,this.R={},this.kind=n,this.valid=e,this.message=r}static k(e,n){return new wt(!1,e,n)}static je(e,n){if(!(!n||!e.isValid))return e.depth===1&&e.getComponent(0)==="anonymous"?!!(n!=null&&n.anonymous):e.get(n)}se(e){if(this.I)return this.R[e];if(this.kind===e)return this.y}static He(e){let n=Object.keys(e).filter(c=>c!=="kind"),r=n.every(Hh);if(!n.length)return wt.k("multi","A multi-kind context must contain at least one kind");if(!r)return wt.k("multi","Context contains invalid kinds");let i={},o=!0,s=n.reduce((c,l)=>{var u;let h=e[l];return yS(h)?(c[l]=h,i[l]=Ca((u=h._meta)==null?void 0:u.privateAttributes)):o=!1,c},{});if(!o)return wt.k("multi","Context contained contexts that were not objects");if(!Object.values(s).every(c=>zh(c.key)))return wt.k("multi","Context contained invalid keys");if(n.length===1){let c=n[0],l=new wt(!0,c);return l.y=me(at({},s[c]),{kind:c}),l.st=i,l.it=c==="user",l}let a=new wt(!0,e.kind);return a.R=s,a.st=i,a.I=!0,a}static ze(e){var n;let{key:r,kind:i}=e,o=Hh(i),s=zh(r);if(!o)return wt.k(i!=null?i:"unknown","The kind was not valid for the context");if(!s)return wt.k(i,"The key for the context was not valid");let a=Ca((n=e._meta)==null?void 0:n.privateAttributes),c=new wt(!0,i);return c.it=i==="user",c.y=e,c.st={[i]:a},c}static Be(e){if(!(e.key!==void 0&&e.key!==null))return wt.k("user","The key for the context was not valid");let n=new wt(!0,"user");return n.it=!0,n.ie=!0,n.y=bS(e),n.st={user:Ca(e.privateAttributeNames,!0)},n}static fromLDContext(e){return e?Ip(e)?wt.ze(e):Tp(e)?wt.He(e):Ep(e)?wt.Be(e):wt.k("unknown","Context was not of a valid kind"):wt.k("unknown","No context specified. Returning default value")}static toLDContext(e){if(!e.valid)return;let n=e.getContexts();if(!e.I)return n[0][1];let r={kind:"multi"};return n.forEach(i=>{let o=i[0],s=i[1];r[o]=s}),r}valueForKind(e,n=Xa){return e.isKind?this.kinds:wt.je(e,this.se(n))}key(e=Xa){var n;return(n=this.se(e))==null?void 0:n.key}get isMultiKind(){return this.I}get canonicalKey(){return this.it?this.y.key:this.I?Object.keys(this.R).sort().map(e=>`${e}:${_h(this.R[e].key)}`).join(":"):`${this.kind}:${_h(this.y.key)}`}get kinds(){return this.I?Object.keys(this.R):[this.kind]}get kindsAndKeys(){return this.I?Object.entries(this.R).reduce((e,[n,r])=>(e[n]=r.key,e),{}):{[this.kind]:this.y.key}}privateAttributes(e){var n;return((n=this.st)==null?void 0:n[e])||[]}getContexts(){return this.I?Object.entries(this.R):[[this.kind,this.y]]}get legacy(){return this.ie}canonicalUnfilteredJson(){if(this.valid){if(this.Et)return this.Et;try{this.Et=Fi(wt.toLDContext(this))}catch(e){}return this.Et}}};xn.UserKind=Xa;var vS=["key","kind","_meta","anonymous"].map(t=>new Nn(t,!0)),SS=["name","ip","firstName","lastName","email","avatar","country"];function wS(t,e){return t.depth===e.length&&e.every((n,r)=>n===t.getComponent(r))}function IS(t,e){let n=[],r={},i=[];for(n.push(...Object.keys(t).map(o=>({key:o,ptr:[o],source:t,parent:r,visited:[t]})));n.length;){let o=n.pop(),s=e.find(a=>wS(a,o.ptr));if(s)i.push(s.redactionName);else{let a=o.source[o.key];a===null?o.parent[o.key]=a:Array.isArray(a)?o.parent[o.key]=[...a]:typeof a=="object"?o.visited.includes(a)||(o.parent[o.key]={},n.push(...Object.keys(a).map(c=>({key:c,ptr:[...o.ptr,c],source:a,parent:o.parent[o.key],visited:[...o.visited,a]})))):o.parent[o.key]=a}}return{cloned:r,excluded:i.sort()}}var TS=class{constructor(t,e){this.Ke=t,this.Ge=e}filter(t,e=!1){let n=t.getContexts();if(n.length===1)return this.ne(t,n[0][1],n[0][0],e);let r={kind:"multi"};return n.forEach(([i,o])=>{r[i]=this.ne(t,o,i,e)}),r}We(t,e,n,r){return(r?Object.keys(e).map(i=>new Nn(i,!0)):[...this.Ge,...t.privateAttributes(n)]).filter(i=>!vS.some(o=>o.compare(i)))}ne(t,e,n,r){let i=this.Ke||r&&e.anonymous===!0,{cloned:o,excluded:s}=IS(e,this.We(t,e,n,i));return t.legacy&&SS.forEach(a=>{a in o&&(o[a]=String(o[a]))}),s.length&&(o._meta||(o._meta={}),o._meta.redactedAttributes=s),o._meta&&(delete o._meta.privateAttributes,Object.keys(o._meta).length===0&&delete o._meta),o}},Bh=30*1e3,ES=.5,RS=class{constructor(t,e,n=Math.random){this.Ds=e,this.Je=n,this.Dt=0,this.re=Math.max(1,t),this.qe=Math.ceil(Math.log2(Bh/this.re))}A(){let t=Math.min(this.Dt,this.qe),e=this.re*2**t;return Math.min(e,Bh)}Ye(t){return t-Math.trunc(this.Je()*ES*t)}success(t=Date.now()){this.bt=t}fail(t=Date.now()){this.bt!==void 0&&t-this.bt>this.Ds&&(this.Dt=0),this.bt=void 0;let e=this.Ye(this.A());return this.Dt+=1,e}},jh;(function(t){t[t.Valid=0]="Valid",t[t.Initializing=1]="Initializing",t[t.Interrupted=2]="Interrupted",t[t.Closed=3]="Closed"})(jh||(jh={}));var Ai=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.status=n,this.name="LaunchDarklyPollingError",this.recoverable=r}},Wa=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.code=n,this.name="LaunchDarklyStreamingError",this.recoverable=r}},BF=120*1e3,jF=300*1e3,_t;(function(t){t.Unknown="UNKNOWN",t.NetworkError="NETWORK_ERROR",t.ErrorResponse="ERROR_RESPONSE",t.InvalidData="INVALID_DATA"})(_t||(_t={}));var Ji;(function(t){t[t.Disabled=0]="Disabled",t[t.Enabled=1]="Enabled"})(Ji||(Ji={}));var On;(function(t){t[t.AnalyticsEvents=0]="AnalyticsEvents",t[t.DiagnosticEvent=1]="DiagnosticEvent"})(On||(On={}));var en;(function(t){t[t.Succeeded=0]="Succeeded",t[t.Failed=1]="Failed",t[t.FailedAndMustShutDown=2]="FailedAndMustShutDown"})(en||(en={}));function Vn(t){if(typeof t=="string")return t;if(t===void 0)return"undefined";if(t===null)return"null";if(Object.prototype.hasOwnProperty.call(t,"toString"))try{return t.toString()}catch(e){}if(typeof t=="bigint")return`${t}n`;try{return JSON.stringify(t)}catch(e){return e instanceof TypeError&&e.message.indexOf("circular")>=0?"[Circular]":"[Not Stringifiable]"}}function CS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(Number(t))}function ZS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(parseInt(t,10))}function kS(t){return typeof t=="symbol"?"NaN":String(parseFloat(t))}var Za={s:t=>Vn(t),d:t=>CS(t),i:t=>ZS(t),f:t=>kS(t),j:t=>Vn(t),o:t=>Vn(t),O:t=>Vn(t),c:()=>""};function Ua(...t){var e;let n=t.shift();if(G.String.is(n)){let r="",i=0;for(;i<n.length;){let o=n.charAt(i);if(o==="%"){if(i+1<n.length){let s=n.charAt(i+1);if(s in Za&&t.length){let a=t.shift();r+=(e=Za[s])==null?void 0:e.call(Za,a)}else s==="%"?r+="%":r+=`%${s}`;i+=2}}else r+=o,i+=1}return t.length&&(r.length&&(r+=" "),r+=t.map(Vn).join(" ")),r}return t.map(Vn).join(" ")}var Vt;(function(t){t[t.debug=0]="debug",t[t.info=1]="info",t[t.warn=2]="warn",t[t.error=3]="error",t[t.none=4]="none"})(Vt||(Vt={}));var VS=["debug","info","warn","error","none"],Fa=class Rp{static get(){return new Rp({})}constructor(e){var n,r,i;if(this.ni=(r=Vt[(n=e.level)!=null?n:"info"])!=null?r:Vt.info,this.ri=(i=e.name)!=null?i:"LaunchDarkly",this.ue=e.formatter,typeof e.destination=="object")this.he={[Vt.debug]:e.destination.debug,[Vt.info]:e.destination.info,[Vt.warn]:e.destination.warn,[Vt.error]:e.destination.error};else if(typeof e.destination=="function"){let{destination:o}=e;this.he={[Vt.debug]:o,[Vt.info]:o,[Vt.warn]:o,[Vt.error]:o}}}ai(...e){var n;try{return this.ue?(n=this.ue)==null?void 0:n.call(this,...e):Ua(...e)}catch(r){return Ua(...e)}}oi(e,n){try{e(n)}catch(r){console.error(n)}}x(e,n){var r;if(e>=this.ni){let i=`${VS[e]}: [${this.ri}]`;try{let o=(r=this.he)==null?void 0:r[e];o?this.oi(o,`${i} ${this.ai(...n)}`):console.error(...n)}catch(o){console.error(...n)}}}error(...e){this.x(Vt.error,e)}warn(...e){this.x(Vt.warn,e)}info(...e){this.x(Vt.info,e)}debug(...e){this.x(Vt.debug,e)}},xS={error:G.Function,warn:G.Function,info:G.Function,debug:G.Function},Cp=class{constructor(t,e){Object.entries(xS).forEach(([n,r])=>{if(!r.is(t[n]))throw new Error(`Provided logger instance must support logger.${n}(...) method`)}),this.t=t,this.ci=e}x(t,e){try{this.t[t](...e)}catch(n){this.ci[t](...e)}}error(...t){this.x("error",t)}warn(...t){this.x("warn",t)}info(...t){this.x("info",t)}debug(...t){this.x("debug",t)}},Zp=t=>{let e=new Fa({level:"info",destination:console.error,formatter:Ua});return t?new Cp(t,e):e},Ue=class{static deprecated(t,e){return`"${t}" is deprecated, please use "${e}"`}static optionBelowMinimum(t,e,n){return`Config option "${t}" had invalid value of ${e}, using minimum of ${n} instead`}static unknownOption(t){return`Ignoring unknown config option "${t}"`}static wrongOptionType(t,e,n){return`Config option "${t}" should be of type ${e}, got ${n}, using default value`}static wrongOptionTypeBoolean(t,e){return`Config option "${t}" should be a boolean, got ${e}, converting to boolean`}static invalidTagValue(t){return`Config option "${t}" must only contain letters, numbers, ., _ or -.`}static tagValueTooLong(t){return`Value of "${t}" was longer than 64 characters and was discarded.`}static partialEndpoint(t){return`You have set custom uris without specifying the ${t} URI; connections may not work properly`}},NS=/^(\w|\.|-)+$/,OS=G.stringMatchingRegex(NS),GS={is:(t,e)=>OS.is(t)?t.length>64?{valid:!1,message:Ue.tagValueTooLong(e)}:{valid:!0}:{valid:!1,message:Ue.invalidTagValue(e)}},LS=class{constructor(t){let e={},n=t==null?void 0:t.application,r=t==null?void 0:t.logger;n&&Object.entries(n).forEach(([o,s])=>{if(s!=null){let{valid:a,message:c}=GS.is(s,`application.${o}`);a?o==="versionName"?e["application-version-name"]=[s]:e[`application-${o}`]=[s]:r==null||r.warn(c)}});let i=Object.keys(e);i.length&&(this.value=i.sort().flatMap(o=>e[o].sort().map(s=>`${o}/${s}`)).join(" "))}},XS=class{constructor(t,e,n){this.platform=n,this.basicConfiguration={tags:e.tags,logger:e.logger,offline:e.offline,serviceEndpoints:e.serviceEndpoints,sdkKey:t}}};function ka(t){return t.replace(/\/+$/,"")}function Aa(t){return t.replace(/^\/+/,"").replace(/\?$/,"")}var Di=class kp{constructor(e,n,r=kp.DEFAULT_EVENTS,i="/bulk",o="/diagnostic",s=!0,a){this.streaming=ka(e),this.polling=ka(n),this.events=ka(r),this.analyticsEventPath=i,this.diagnosticEventPath=o,this.includeAuthorizationHeader=s,this.payloadFilterKey=a}};Di.DEFAULT_EVENTS="https://events.launchdarkly.com";function Ja(t,e=[]){if(e.length===0)return t;let n=e.map(({key:r,value:i})=>`${r}=${i}`);return`${t}?${n.join("&")}`}function WS(t,e,n){let r=Aa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Ja(`${t.streaming}/${r}`,i)}function US(t,e,n=[]){let r=Aa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Ja(`${t.polling}/${r}`,i)}function Qh(t,e,n=[]){let r=Aa(e);return Ja(`${t.events}/${r}`,n)}var Vp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyUnexpectedResponseError"}},$h=class extends Error{constructor(t){super(t),this.name="LaunchDarklyClientError"}},xp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyTimeoutError"}};function _i(t){return t>=400&&t<500?t===400||t===408||t===429:!0}function MS(t){return t===413?!0:_i(t)}function PS(t,e){let n,r;return{promise:new Promise((i,o)=>{r=i,n=setTimeout(()=>{let s=`${e} timed out after ${t} seconds.`;o(new xp(s))},t*1e3)}),cancel:()=>{r(),clearTimeout(n)}}}function Np(t){return t==null?t:JSON.parse(JSON.stringify(t))}function Va(t){return Math.trunc(t*1e3)}var FS=t=>JSON.stringify(t)==="{}",Da=(t,e)=>t&&Object.entries(t).reduce((n,[r,i])=>(i&&!FS(i)&&!(e!=null&&e.includes(r))&&(n[r]=typeof i=="object"?Da(i,e):i),n),{});function Ui(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!Ui(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!Ui(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){var o=i[r];if(!Ui(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function AS(t,e,n,r=!0,i="user-agent"){let{userAgentBase:o,version:s,wrapperName:a,wrapperVersion:c}=e.sdkData(),l={[i]:`${o!=null?o:"NodeJSClient"}/${s}`};return r&&(l.authorization=t),a&&(l["x-launchdarkly-wrapper"]=c?`${a}/${c}`:a),n!=null&&n.value&&(l["x-launchdarkly-tags"]=n.value),l}function Gn(t,e,n){let r;t.status?r=`error ${t.status}${t.status===401?" (invalid SDK key)":""}`:r=`I/O error (${t.message||"unknown error"})`;let i=n!=null?n:"giving up permanently";return`Received ${r} for ${e} - ${i}`}function Op({status:t}){return t?_i(t):!0}var qh=(t,e)=>e.btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),Gp=async(t=1e3)=>new Promise(e=>{setTimeout(e,t)}),JS=class{constructor(t,e,n){this.p=e,this.li=n,this.St=[],this.de=Date.now(),this.fe=this.de,this.pe={diagnosticId:e.crypto.randomUUID(),sdkKeySuffix:t.length>6?t.substring(t.length-6):t}}createInitEvent(){var t,e,n;let r=this.p.info.sdkData(),i=this.p.info.platformData();return{kind:"diagnostic-init",id:this.pe,creationDate:this.de,sdk:r,configuration:this.li,platform:at({name:i.name,osArch:(t=i.os)==null?void 0:t.arch,osName:(e=i.os)==null?void 0:e.name,osVersion:(n=i.os)==null?void 0:n.version},i.additional||{})}}recordStreamInit(t,e,n){let r={timestamp:t,failed:e,durationMillis:n};this.St.push(r)}createStatsEventAndReset(t,e,n){let r=Date.now(),i={kind:"diagnostic",id:this.pe,creationDate:r,dataSinceDate:this.fe,droppedEvents:t,deduplicatedUsers:e,eventsInLastBatch:n,streamInits:this.St};return this.St=[],this.fe=r,i}},Ma;(function(t){t.MalformedFlag="MALFORMED_FLAG",t.UserNotSpecified="USER_NOT_SPECIFIED",t.FlagNotFound="FLAG_NOT_FOUND",t.ClientNotReady="CLIENT_NOT_READY",t.WrongType="WRONG_TYPE"})(Ma||(Ma={}));var DS=Ma,Lp=class{static invalidMetricValue(t){return`The track function was called with a non-numeric "metricValue" (${t}), only numeric metric values are supported.`}};Lp.MissingContextKeyNoEvent="Context was unspecified or had no key; event will not be sent";var YS=class{constructor(t,e){let{basicConfiguration:n,platform:r}=t,{serviceEndpoints:{analyticsEventPath:i,diagnosticEventPath:o}}=n,{crypto:s,requests:a}=r;this.ui=at({},e),this.ge=Qh(n.serviceEndpoints,i,[]),this.hi=Qh(n.serviceEndpoints,o,[]),this.T=a,this.di=s}async nt(t,e,n,r){let i={status:en.Succeeded},o=me(at({},this.ui),{"content-type":"application/json"});n&&(o["x-launchdarkly-payload-id"]=n,o["x-launchDarkly-event-schema"]="4");let s;try{let{status:a,headers:c}=await this.T.fetch(e,{headers:o,body:JSON.stringify(t),compressBodyIfPossible:!0,method:"POST",keepalive:!0}),l=Date.parse(c.get("date")||"");if(l&&(i.serverTime=l),a<=204)return i;if(s=new Vp(Gn({status:a,message:"some events were dropped"},"event posting")),!_i(a))return MS(a)?i.status=en.Failed:i.status=en.FailedAndMustShutDown,i.error=s,i}catch(a){s=a}return s&&!r?(i.status=en.Failed,i.error=s,i):(await Gp(),this.nt(t,this.ge,n,!1))}async sendEventData(t,e){let n=t===On.AnalyticsEvents?this.di.randomUUID():void 0,r=t===On.AnalyticsEvents?this.ge:this.hi;return this.nt(e,r,n,!0)}};function Yi(t){return t.kind==="feature"}function KS(t){return t.kind==="identify"}function _S(t){return t.kind==="migration_op"}var HS=class{constructor(t,e,n,r,i,o){this.count=t,this.key=e,this.value=n,this.version=i,this.variation=o,this.default=r}increment(){this.count+=1}};function zS(t){return`${t.key}:${t.variation!==null&&t.variation!==void 0?t.variation:""}:${t.version!==null&&t.version!==void 0?t.version:""}`}var Xp=class{constructor(t=!1,e){this.fi=t,this.S=e,this.Y=0,this.rt=0,this.at={},this.ot={}}summarizeEvent(t){if(Yi(t)&&!t.excludeFromSummaries){this.y||(this.y=t.context);let e=zS(t),n=this.at[e],r=this.ot[t.key];r||(r=new Set,this.ot[t.key]=r),t.context.kinds.forEach(i=>r.add(i)),n?n.increment():this.at[e]=new HS(1,t.key,t.value,t.default,t.version,t.variation),(this.Y===0||t.creationDate<this.Y)&&(this.Y=t.creationDate),t.creationDate>this.rt&&(this.rt=t.creationDate)}}getSummary(){var t;let e=Object.values(this.at).reduce((r,i)=>{let o=r[i.key];o||(o={default:i.default,counters:[],contextKinds:[...this.ot[i.key]]},r[i.key]=o);let s={value:i.value,count:i.count};return i.variation!==void 0&&i.variation!==null&&(s.variation=i.variation),i.version!==void 0&&i.version!==null?s.version=i.version:s.unknown=!0,o.counters.push(s),r},{}),n={startDate:this.Y,endDate:this.rt,features:e,kind:"summary",context:this.y!==void 0&&this.fi?(t=this.S)==null?void 0:t.filter(this.y):void 0};return this.pi(),n}pi(){this.Y=0,this.rt=0,this.at={},this.ot={}}},BS=class extends Error{constructor(t){super(t),this.name="LaunchDarklyInvalidSDKKeyError"}},jS=class{constructor(t,e){this.S=t,this.t=e,this.Z={}}summarizeEvent(t){var e;if(Yi(t)){let n=t.context.canonicalUnfilteredJson();if(!n){t.context.valid&&((e=this.t)==null||e.error("Unable to serialize context, likely the context contains a cycle."));return}let r=this.Z[n];r||(this.Z[n]=new Xp(!0,this.S),r=this.Z[n]),r.summarizeEvent(t)}}getSummaries(){let t=this.Z;return this.Z={},Object.values(t).map(e=>e.getSummary())}};function Mi(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}function QS(t){return t.getSummaries!==void 0}var $S=class{constructor(t,e,n,r,i,o=!0,s=!1){this.e=t,this.ct=r,this.L=i,this.lt=[],this.me=0,this.Lt=0,this.Ct=0,this.It=!1,this.ye=0,this.At=!1,this.Pt=null,this.gi=t.eventsCapacity,this.t=e.basicConfiguration.logger,this.ve=new YS(e,n),this.S=new TS(t.allAttributesPrivate,t.privateAttributes.map(a=>new Nn(a))),s?this.X=new jS(this.S,this.t):this.X=new Xp,o&&this.start()}start(){var t,e;if(((t=this.ct)==null?void 0:t.flushInterval)!==void 0&&(this.Pt=setInterval(()=>{var n;(n=this.ct)==null||n.flush()},this.ct.flushInterval*1e3)),this.mi=setInterval(async()=>{var n;try{await this.flush()}catch(r){(n=this.t)==null||n.debug(`Flush failed: ${r}`)}},this.e.flushInterval*1e3),this.L){let n=this.L.createInitEvent();this.we(n),this.Ee=setInterval(()=>{let r=this.L.createStatsEventAndReset(this.Lt,this.Ct,this.ye);this.Lt=0,this.Ct=0,this.we(r)},this.e.diagnosticRecordingInterval*1e3)}(e=this.t)==null||e.debug("Started EventProcessor.")}we(t){this.ve.sendEventData(On.DiagnosticEvent,t)}close(){clearInterval(this.mi),this.Pt&&clearInterval(this.Pt),this.Ee&&clearInterval(this.Ee)}async flush(){var t;if(this.At)throw new BS("Events cannot be posted because a permanent error has been encountered. This is most likely an invalid SDK key. The specific error information is logged independently.");let e=this.lt;if(this.lt=[],QS(this.X))this.X.getSummaries().forEach(n=>{Object.keys(n.features).length&&e.push(n)});else{let n=this.X.getSummary();Object.keys(n.features).length&&e.push(n)}e.length&&(this.ye=e.length,(t=this.t)==null||t.debug("Flushing %d events",e.length),await this.nt(e))}sendEvent(t){var e;if(this.At)return;if(_S(t)){if(Mi(t.samplingRatio)){let a=me(at({},t),{context:t.context?this.S.filter(t.context):void 0});a.samplingRatio===1&&delete a.samplingRatio,this.ut(a)}return}this.X.summarizeEvent(t);let n=Yi(t),r=n&&t.trackEvents||!n,i=this.yi(t),o=KS(t),s=(e=this.ct)==null?void 0:e.processContext(t.context);s||o||(this.Ct+=1),s&&!o&&this.ut(this.Ot({kind:"index",creationDate:t.creationDate,context:t.context,samplingRatio:1},!1)),r&&Mi(t.samplingRatio)&&this.ut(this.Ot(t,!1)),i&&Mi(t.samplingRatio)&&this.ut(this.Ot(t,!0))}Ot(t,e){switch(t.kind){case"feature":{let n={kind:e?"debug":"feature",creationDate:t.creationDate,context:this.S.filter(t.context,!e),key:t.key,value:t.value,default:t.default};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.prereqOf&&(n.prereqOf=t.prereqOf),t.variation!==void 0&&(n.variation=t.variation),t.version!==void 0&&(n.version=t.version),t.reason&&(n.reason=t.reason),n}case"index":case"identify":{let n={kind:t.kind,creationDate:t.creationDate,context:this.S.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),n}case"custom":{let n={kind:"custom",creationDate:t.creationDate,key:t.key,context:this.S.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.data!==void 0&&(n.data=t.data),t.metricValue!==void 0&&(n.metricValue=t.metricValue),t.url!==void 0&&(n.url=t.url),n}case"click":return{kind:"click",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url,selector:t.selector};case"pageview":return{kind:"pageview",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url};default:return t}}ut(t){var e;this.lt.length<this.gi?(this.lt.push(t),this.It=!1):(this.It||(this.It=!0,(e=this.t)==null||e.warn("Exceeded event queue capacity. Increase capacity to avoid dropping events.")),this.Lt+=1)}yi(t){return Yi(t)&&t.debugEventsUntilDate&&t.debugEventsUntilDate>this.me&&t.debugEventsUntilDate>Date.now()}async nt(t){let e=await this.ve.sendEventData(On.AnalyticsEvents,t);if(e.status===en.FailedAndMustShutDown&&(this.At=!0),e.serverTime&&(this.me=e.serverTime),e.error)throw e.error}},Wp=class{constructor(t,e,n,r,i=1,o){this.context=t,this.key=e,this.data=n,this.metricValue=r,this.samplingRatio=i,this.url=o,this.kind="custom",this.creationDate=Date.now(),this.context=t}},Pa=class{constructor(t,e,n,r,i,o,s,a,c,l,u,h,p=1){this.withReasons=t,this.context=e,this.key=n,this.samplingRatio=p,this.kind="feature",this.creationDate=Date.now(),this.value=r,this.default=i,o!==void 0&&(this.version=o),s!==void 0&&(this.variation=s),a!==void 0&&(this.trackEvents=a),c!==void 0&&(this.prereqOf=c),l!==void 0&&(this.reason=l),u!==void 0&&(this.debugEventsUntilDate=u),h!==void 0&&(this.excludeFromSummaries=h)}},Up=class{constructor(t,e=1){this.context=t,this.samplingRatio=e,this.kind="identify",this.creationDate=Date.now()}},qS=class{close(){}async flush(){}sendEvent(){}},tw=class{constructor(t){this.Tt=t}evalEvent(t){var e;return new Pa(this.Tt,t.context,t.flagKey,t.value,t.defaultVal,t.version,(e=t.variation)!=null?e:void 0,t.trackEvents||t.addExperimentData,t.prereqOfFlagKey,this.Tt||t.addExperimentData?t.reason:void 0,t.debugEventsUntilDate,t.excludeFromSummaries,t.samplingRatio)}unknownFlagEvent(t,e,n){return new Pa(this.Tt,n,t,e,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}identifyEvent(t){return new Up(t,1)}customEvent(t,e,n,r,i=1){return new Wp(e,t,n!=null?n:void 0,r!=null?r:void 0,i)}},tp="FDv1Fallback";function ew(t){return{vi:t,De:"",useSelector(e){return this.De=e,this},processFullTransfer(e){let n=[{event:"server-intent",data:{payloads:[{id:tp,target:1,intentCode:"xfer-full",reason:"payload-missing"}]}}];Object.entries((e==null?void 0:e.flags)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"flag",key:r,version:i.version||1,object:i}})}),Object.entries((e==null?void 0:e.segments)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"segment",key:r,version:i.version||1,object:i}})}),n.push({event:"payload-transferred",data:{state:this.De,version:1,id:tp}}),this.vi.processEvents(n)}}}var Mp=class{constructor(t,e,n){this.wi=t,this.m=e,this.t=n,this.n=[],this.M=void 0,this.z=!1,this.B=[],this.Ei=r=>{var i;if(this.$t(),!r.payloads.length)return;let o=r.payloads[0];switch(o==null?void 0:o.intentCode){case"xfer-full":this.z=!0;break;case"xfer-changes":this.z=!1;break;case"none":this.z=!1,this.Di(o);break;default:(i=this.t)==null||i.warn(`Unable to process intent code '${o==null?void 0:o.intentCode}'.`);return}this.M=o==null?void 0:o.id},this.bi=r=>{var i;if(!this.M||!r.kind||!r.key||!r.version||!r.object)return;let o=this.ki(r.kind,r.object);if(!o){(i=this.t)==null||i.warn(`Unable to process object for kind: '${r.kind}'`);return}this.B.push({kind:r.kind,key:r.key,version:r.version,object:o})},this.xi=r=>{!this.M||!r.kind||!r.key||!r.version||this.B.push({kind:r.kind,key:r.key,version:r.version,deleted:!0})},this.Di=r=>{if(!r.id||!r.target)return;let i={id:r.id,version:r.target,basis:!1,updates:[]};this.n.forEach(o=>o(i)),this.be()},this.Si=r=>{if(!this.M||r.state===null||r.state===void 0||!r.version){this.$t();return}let i={id:this.M,version:r.version,state:r.state,basis:this.z,updates:this.B};this.n.forEach(o=>o(i)),this.be()},this.Li=r=>{var i;(i=this.t)==null||i.info(`Goodbye was received from the LaunchDarkly connection with reason: ${r.reason}.`),this.$t()},this.Ci=r=>{var i;(i=this.t)==null||i.info(`An issue was encountered receiving updates for payload ${this.M} with reason: ${r.reason}.`),this.Ii()}}addPayloadListener(t){this.n.push(t)}removePayloadListener(t){let e=this.n.indexOf(t,0);e>-1&&this.n.splice(e,1)}processEvents(t){t.forEach(e=>{switch(e.event){case"server-intent":{this.Ei(e.data);break}case"put-object":{this.bi(e.data);break}case"delete-object":{this.xi(e.data);break}case"payload-transferred":{this.Si(e.data);break}case"goodbye":{this.Li(e.data);break}case"error":{this.Ci(e.data);break}}})}ki(t,e){var n,r;return(r=(n=this.wi)[t])==null?void 0:r.call(n,e)}be(){this.z=!1,this.B=[]}Ii(){this.B=[]}$t(){this.M=void 0,this.z=!1,this.B=[]}},nw=class{constructor(t,e,n,r){this.m=n,this.t=r,this.K(t,"server-intent"),this.K(t,"put-object"),this.K(t,"delete-object"),this.K(t,"payload-transferred"),this.K(t,"goodbye"),this.K(t,"error"),this.Nt=new Mp(e,n,r)}addPayloadListener(t){this.Nt.addPayloadListener(t)}removePayloadListener(t){this.Nt.removePayloadListener(t)}K(t,e){t.addEventListener(e,async n=>{var r,i,o,s,a;if(n!=null&&n.data){(r=this.t)==null||r.debug(`Received ${e} event. Data is ${n.data}`);try{this.Nt.processEvents([{event:e,data:JSON.parse(n.data)}])}catch(c){(i=this.t)==null||i.error(`Stream received data that was unable to be processed in "${e}" message`),(o=this.t)==null||o.debug(`Data follows: ${n.data}`),(s=this.m)==null||s.call(this,_t.InvalidData,"Malformed data in EventStream.")}}else(a=this.m)==null||a.call(this,_t.Unknown,"Event from EventStream missing data.")})}};function rw(t){if(t){let e=Object.keys(t).find(n=>n.toLowerCase()==="x-ld-envid");if(e)return{environmentId:t[e]}}}var ep="unknown plugin";function Ki(t,e){try{return e.getMetadata().name||ep}catch(n){return t.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),ep}}function iw(t,e,n){let r=[];return n.forEach(i=>{var o;try{let s=(o=i.getHooks)==null?void 0:o.call(i,e);s===void 0?t.error(`Plugin ${Ki(t,i)} returned undefined from getHooks.`):s&&s.length>0&&r.push(...s)}catch(s){t.error(`Exception thrown getting hooks for plugin ${Ki(t,i)}. Unable to get hooks.`)}}),r}function ow(t,e,n,r){r.forEach(i=>{try{i.register(n,e)}catch(o){t.error(`Exception thrown registering plugin ${Ki(t,i)}.`)}})}var de=Object.freeze({__proto__:null,ClientMessages:Lp,DiagnosticsManager:JS,ErrorKinds:DS,EventFactoryBase:tw,EventProcessor:$S,FDv1PayloadAdaptor:ew,InputCustomEvent:Wp,InputEvalEvent:Pa,InputIdentifyEvent:Up,NullEventProcessor:qS,PayloadProcessor:Mp,PayloadStreamReader:nw,canonicalize:Fi,initMetadataFromHeaders:rw,isLegacyUser:Ep,isMultiKind:Tp,isSingleKind:Ip,safeGetHooks:iw,safeGetName:Ki,safeRegisterPlugins:ow,shouldSample:Mi}),Kt;(function(t){t.Initializing="INITIALIZING",t.Valid="VALID",t.Interrupted="INTERRUPTED",t.SetOffline="SET_OFFLINE",t.Closed="CLOSED"})(Kt||(Kt={}));function sw(t){return t>=200&&t<=299}var np=class extends Error{constructor(t,e){super(t),this.status=e,this.name="LaunchDarklyRequestError"}},aw=class{constructor(t,e,n,r,i){this.T=t,this.Ai=e,this.ht=n,this.Pi=r,this.Oi=i}async requestPayload(){let t;try{let e=await this.T.fetch(this.Ai,{method:this.Pi,headers:this.ht,body:this.Oi});if(sw(e.status))return await e.text();t=e.status}catch(e){throw new np(e==null?void 0:e.message)}throw new np(`Unexpected status code: ${t}`,t)}};function rp(t,e,n,r,i,o,s,a,c,l){let u,h="GET",p=at({},o);c&&(h="REPORT",p["content-type"]="application/json",u=t);let f=c?n.pathReport(i,t):n.pathGet(i,t),m=[...s!=null?s:[]];a&&m.push({key:"withReasons",value:"true"}),l&&m.push({key:"h",value:l});let d=US(e,f,m);return new aw(r,d,p,h,u)}var ip=new Error("Task has already been executed or shed. This is likely an implementation error. The task will not be executed again.");function lw(t,e,n=!1){let r,i=new Promise(a=>{r=(c,l)=>{var u;try{(u=t.after)==null||u.call(t,c,l)}catch(h){e==null||e.error(`Error in after callback: ${h}`)}a(c)}}),o=t.before?t.before():Promise.resolve(void 0),s=!1;return{execute:()=>{s&&(e==null||e.error(ip)),s=!0,o.then(a=>{t.execute(a).then(c=>r({status:"complete",result:c},a)).catch(c=>r({status:"error",error:c},a))}).catch(a=>{e==null||e.error(a),r({status:"error",error:a},void 0)})},shed:()=>{s&&(e==null||e.error(ip)),s=!0,o.then(a=>{r({status:"shed"},a)})},promise:i,sheddable:n}}function cw(t){let e,n=[];function r(){if(!e&&n.length>0){let i=n.shift();e=i.promise.finally(()=>{e=void 0,r()}),i.execute()}}return{execute(i,o=!1){var s,a;let c=lw(i,t,o);return e?((s=n[n.length-1])!=null&&s.sheddable&&((a=n.pop())==null||a.shed()),n.push(c)):(e=c.promise.finally(()=>{e=void 0,r()}),c.execute()),c.promise},pendingCount(){return n.length}}}var uw={logger:G.Object,maxCachedContexts:G.numberWithMin(0),baseUri:G.String,streamUri:G.String,eventsUri:G.String,capacity:G.numberWithMin(1),diagnosticRecordingInterval:G.numberWithMin(2),flushInterval:G.numberWithMin(2),streamInitialReconnectDelay:G.numberWithMin(0),allAttributesPrivate:G.Boolean,debug:G.Boolean,diagnosticOptOut:G.Boolean,withReasons:G.Boolean,sendEvents:G.Boolean,pollInterval:G.numberWithMin(30),useReport:G.Boolean,privateAttributes:G.StringArray,applicationInfo:G.Object,wrapperName:G.String,wrapperVersion:G.String,payloadFilterKey:G.stringMatchingRegex(/^[a-zA-Z0-9](\w|\.|-)*$/),hooks:G.createTypeArray("Hook[]",{}),inspectors:G.createTypeArray("LDInspection",{}),cleanOldPersistentData:G.Boolean},hw=300,Pp="https://clientsdk.launchdarkly.com",Fp="https://clientstream.launchdarkly.com";function pw(t){return t instanceof Cp?t:Zp(t)}var dw=class{constructor(t={},e={getImplementationHooks:()=>[],credentialType:"mobileKey"}){var n,r,i;this.logger=Zp(),this.baseUri=Pp,this.eventsUri=Di.DEFAULT_EVENTS,this.streamUri=Fp,this.maxCachedContexts=5,this.capacity=100,this.diagnosticRecordingInterval=900,this.flushInterval=30,this.streamInitialReconnectDelay=1,this.allAttributesPrivate=!1,this.debug=!1,this.diagnosticOptOut=!1,this.sendEvents=!0,this.sendLDHeaders=!0,this.useReport=!1,this.withReasons=!1,this.privateAttributes=[],this.pollInterval=hw,this.hooks=[],this.inspectors=[],this.logger=pw(t.logger),this.Ti(t).forEach(o=>this.logger.warn(o)),this.serviceEndpoints=new Di(this.streamUri,this.baseUri,this.eventsUri,e.analyticsEventPath,e.diagnosticEventPath,e.includeAuthorizationHeader,t.payloadFilterKey),this.useReport=(n=t.useReport)!=null?n:!1,this.tags=new LS({application:this.applicationInfo,logger:this.logger}),this.userAgentHeaderName=(r=e.userAgentHeaderName)!=null?r:"user-agent",this.trackEventModifier=(i=e.trackEventModifier)!=null?i:(o=>o),this.credentialType=e.credentialType,this.getImplementationHooks=e.getImplementationHooks}Ti(t){let e=[];return Object.entries(t).forEach(([n,r])=>{let i=uw[n];if(i)if(i.is(r))n==="logger"||(this[n]=r!=null?r:void 0);else{let o=i.getType();if(o==="boolean")e.push(Ue.wrongOptionTypeBoolean(n,typeof r)),this[n]=!!r;else if(o==="boolean | undefined | null")e.push(Ue.wrongOptionTypeBoolean(n,typeof r)),typeof r!="boolean"&&typeof r!="undefined"&&r!==null&&(this[n]=!!r);else if(i instanceof Sp&&G.Number.is(r)){let{min:s}=i;e.push(Ue.optionBelowMinimum(n,r,s)),this[n]=s}else e.push(Ue.wrongOptionType(n,i.getType(),typeof r))}else e.push(Ue.unknownOption(n))}),e}};async function Ap(t,e){if(t.digest)return t.digest(e);if(t.asyncDigest)return t.asyncDigest(e);throw new Error("Platform must implement digest or asyncDigest")}var Jp=async(t,{crypto:e,storage:n})=>{let r=await(n==null?void 0:n.get(t));return r||(r=e.randomUUID(),await(n==null?void 0:n.set(t,r))),r};function Dp(t){return async e=>Ap(t.createHash("sha256").update(e),"base64")}var fe=async t=>t;async function gr(t){return(await Promise.all(t.map(e=>e.transform(e.value)))).join("_")}async function fw(t,e){return gr([{value:"LaunchDarkly",transform:fe},{value:e,transform:Dp(t)}])}async function mw(t){return gr([{value:"LaunchDarkly",transform:fe},{value:"AnonymousKeys",transform:fe},{value:t,transform:fe}])}async function yw(t){return gr([{value:"LaunchDarkly",transform:fe},{value:"ContextKeys",transform:fe},{value:t,transform:fe}])}async function gw(t){return gr([{value:t,transform:fe},{value:"ContextIndex",transform:fe}])}async function op(t,e,n){return gr([{value:e,transform:fe},{value:n.canonicalKey,transform:Dp(t)}])}var{isLegacyUser:bw,isSingleKind:xa,isMultiKind:sp}=de,Yp="1.0",vw=t=>{let e=t,{kind:n}=e,r=gp(e,["kind"]);return{kind:"multi",[n]:r}},Sw=async({crypto:t,info:e},{applicationInfo:n})=>{var r;let{ld_application:i}=e.platformData(),o=(r=Da(i))!=null?r:{},s=(n==null?void 0:n.id)||(o==null?void 0:o.id);if(s){let a=(n==null?void 0:n.version)||(o==null?void 0:o.version),c=(n==null?void 0:n.name)||(o==null?void 0:o.name),l=(n==null?void 0:n.versionName)||(o==null?void 0:o.versionName);return o=at(at(at(me(at({},o),{id:s}),a?{version:a}:{}),c?{name:c}:{}),l?{versionName:l}:{}),o.key=await Ap(t.createHash("sha256").update(s),"base64"),o.envAttributesVersion=o.envAttributesVersion||Yp,o}},ww=async t=>{var e,n,r,i;let{ld_device:o,os:s}=t.info.platformData(),a=(e=Da(o))!=null?e:{},c=(s==null?void 0:s.name)||((n=a.os)==null?void 0:n.name),l=(s==null?void 0:s.version)||((r=a.os)==null?void 0:r.version),u=(i=a.os)==null?void 0:i.family;if((c||l||u)&&(a.os=at(at(at({},c?{name:c}:{}),l?{version:l}:{}),u?{family:u}:{})),Object.keys(a).filter(h=>h!=="key"&&h!=="envAttributesVersion").length){let h=await yw("ld_device");return a.key=await Jp(h,t),a.envAttributesVersion=a.envAttributesVersion||Yp,a}},Iw=async(t,e,n)=>{if(bw(t))return t;let r,i;if(xa(t)&&t.kind!=="ld_application"||sp(t)&&!t.ld_application?r=await Sw(e,n):n.logger.warn("Not adding ld_application environment attributes because it already exists."),xa(t)&&t.kind!=="ld_device"||sp(t)&&!t.ld_device?i=await ww(e):n.logger.warn("Not adding ld_device environment attributes because it already exists."),r||i){let o=xa(t)?vw(t):t;return at(at(at({},o),r?{ld_application:r}:{}),i?{ld_device:i}:{})}return t};function Tw(){let t,e;return{set(n,r){t=n,e=r},getContext(){return e},getUnwrappedContext(){return t},newIdentificationPromise(){let n,r;return{identifyPromise:new Promise((i,o)=>{n=i,r=o}),identifyResolve:n,identifyReject:r}},hasContext(){return e!==void 0},hasValidContext(){return this.hasContext()&&e.valid}}}var{isLegacyUser:Ew,isMultiKind:Rw,isSingleKind:Cw}=de,Ya=async(t,e,n)=>{let{anonymous:r,key:i}=e;if(r&&!i){let o=await mw(t);e.key=await Jp(o,n)}},Zw=async(t,e)=>{await Ya(t.kind,t,e)},kw=async(t,e)=>{let n=t,{kind:r}=n,i=gp(n,["kind"]);return Promise.all(Object.entries(i).map(([o,s])=>Ya(o,s,e)))},Vw=async(t,e)=>{await Ya("user",t,e)},xw=async(t,e)=>{let n=Np(t);return Cw(n)&&await Zw(n,e),Rw(n)&&await kw(n,e),Ew(n)&&await Vw(n,e),n},Nw=t=>({customBaseURI:t.serviceEndpoints.polling!==Pp,customStreamURI:t.serviceEndpoints.streaming!==Fp,customEventsURI:t.serviceEndpoints.events!==Di.DEFAULT_EVENTS,eventsCapacity:t.capacity,eventsFlushIntervalMillis:Va(t.flushInterval),reconnectTimeMillis:Va(t.streamInitialReconnectDelay),diagnosticRecordingIntervalMillis:Va(t.diagnosticRecordingInterval),allAttributesPrivate:t.allAttributesPrivate,usingSecureMode:!1,bootstrapMode:!1}),Ow=(t,e,n)=>{if(e.sendEvents&&!e.diagnosticOptOut)return new de.DiagnosticsManager(t,n,Nw(e))};function ap(t,e){return{value:e!=null?e:null,variationIndex:null,reason:{kind:"ERROR",errorKind:t}}}function lp(t,e,n){return{value:t,variationIndex:e!=null?e:null,reason:n!=null?n:null}}var Gw=(t,e,n,r,i)=>{if(e.sendEvents)return new de.EventProcessor(me(at({},e),{eventsCapacity:e.capacity}),new XS(t,e,n),r,void 0,i,!1,!0)},cp=class extends de.EventFactoryBase{evalEventClient(t,e,n,r,i,o){let{trackEvents:s,debugEventsUntilDate:a,trackReason:c,flagVersion:l,version:u,variation:h}=r;return super.evalEvent({addExperimentData:c,context:i,debugEventsUntilDate:a,defaultVal:n,flagKey:t,reason:o,trackEvents:!!s,value:e,variation:h,version:l!=null?l:u})}},Na=class Kp{constructor(){this.container={index:new Array}}static fromJson(e){let n=new Kp;try{n.container=JSON.parse(e)}catch(r){}return n}toJson(){return JSON.stringify(this.container)}notice(e,n){let r=this.container.index.find(i=>i.id===e);r===void 0?this.container.index.push({id:e,timestamp:n}):r.timestamp=n}prune(e){let n=Math.max(e,0);return this.container.index.length>n?(this.container.index.sort((r,i)=>r.timestamp-i.timestamp),this.container.index.splice(0,this.container.index.length-n)):[]}},Lw=class{constructor(t,e,n,r,i,o,s=()=>Date.now()){this.p=t,this.Rt=e,this.$i=n,this.$=r,this.w=i,this.t=o,this.dt=s,this.ke=gw(this.Rt)}async init(t,e){this.w.init(t,e),await this.xe(t)}async upsert(t,e,n){return this.w.upsert(t,e,n)?(await this.xe(t),!0):!1}async loadCached(t){var e,n,r,i;let o=await op(this.p.crypto,this.Rt,t),s=await((e=this.p.storage)==null?void 0:e.get(o));if(s==null){if(s=await((n=this.p.storage)==null?void 0:n.get(t.canonicalKey)),s==null)return!1;await((r=this.p.storage)==null?void 0:r.set(o,s)),await((i=this.p.storage)==null?void 0:i.clear(t.canonicalKey))}try{let a=JSON.parse(s),c=Object.entries(a).reduce((l,[u,h])=>(l[u]={version:h.version,flag:h},l),{});return this.w.initCached(t,c),this.t.debug("Loaded cached flag evaluations from persistent storage"),!0}catch(a){return this.t.warn(`Could not load cached flag evaluations from persistent storage: ${a.message}`),!1}}async Ni(){var t;if(this.G!==void 0)return this.G;let e=await((t=this.p.storage)==null?void 0:t.get(await this.ke));if(!e)return this.G=new Na,this.G;try{this.G=Na.fromJson(e),this.t.debug("Loaded context index from persistent storage")}catch(n){this.t.warn(`Could not load index from persistent storage: ${n.message}`),this.G=new Na}return this.G}async xe(t){var e,n;let r=await this.Ni(),i=await op(this.p.crypto,this.Rt,t);r.notice(i,this.dt());let o=r.prune(this.$i);await Promise.all(o.map(async l=>{var u;return(u=this.p.storage)==null?void 0:u.clear(l.id)})),await((e=this.p.storage)==null?void 0:e.set(await this.ke,r.toJson()));let s=this.$.getAll(),a=Object.entries(s).reduce((l,[u,h])=>(h.flag!==null&&h.flag!==void 0&&(l[u]=h.flag),l),{}),c=JSON.stringify(a);await((n=this.p.storage)==null?void 0:n.set(i,c))}};function Xw(){let t={};return{init(e){t=Object.entries(e).reduce((n,[r,i])=>(n[r]=i,n),{})},insertOrUpdate(e,n){t[e]=n},get(e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},getAll(){return t}}}function Ww(t,e){let n=[];return Object.entries(t).forEach(([r,i])=>{let o=e[r];(!o||!Ui(i,o))&&n.push(r)}),Object.keys(e).forEach(r=>{t[r]||n.push(r)}),n}function Uw(t,e){let n=t,r=e,i,o=new Array;return{handleFlagChanges(s,a){i?o.forEach(c=>{try{c(i,s,a)}catch(l){}}):r.warn("Received a change event without an active context. Changes will not be propagated.")},init(s,a){i=s;let c=n.getAll();n.init(a);let l=Ww(c,a);l.length>0&&this.handleFlagChanges(l,"init")},initCached(s,a){(i==null?void 0:i.canonicalKey)!==s.canonicalKey&&this.init(s,a)},upsert(s,a,c){if((i==null?void 0:i.canonicalKey)!==s.canonicalKey)return r.warn("Received an update for an inactive context."),!1;let l=n.get(a);return l!==void 0&&l.version>=c.version?!1:(n.insertOrUpdate(a,c),this.handleFlagChanges([a],"patch"),!0)},on(s){o.push(s)},off(s){let a=o.indexOf(s);a>-1&&o.splice(a,1)}}}var Mw=class{constructor(t,e,n,r,i=()=>Date.now()){this.$=Xw(),this.w=Uw(this.$,r),this.Mt=this.Ri(t,e,n,r,i)}async Ri(t,e,n,r,i=()=>Date.now()){let o=await fw(t.crypto,e);return new Lw(t,o,n,this.$,this.w,r,i)}get(t){return this.r&&Object.prototype.hasOwnProperty.call(this.r,t)?this.Ft(this.r[t]):this.$.get(t)}getAll(){return this.r?at(at({},this.$.getAll()),Object.entries(this.r).reduce((t,[e,n])=>(t[e]=this.Ft(n),t),{})):this.$.getAll()}presetFlags(t){this.$.init(t)}setBootstrap(t,e){this.w.init(t,e)}async init(t,e){return(await this.Mt).init(t,e)}async upsert(t,e,n){return(await this.Mt).upsert(t,e,n)}async loadCached(t){return(await this.Mt).loadCached(t)}on(t){this.w.on(t)}off(t){this.w.off(t)}Ft(t){return{flag:{value:t,version:0},version:0}}setOverride(t,e){this.r||(this.r={}),this.r[t]=e,this.w.handleFlagChanges([t],"override")}removeOverride(t){!this.r||!Object.prototype.hasOwnProperty.call(this.r,t)||(delete this.r[t],Object.keys(this.r).length===0&&(this.r=void 0),this.w.handleFlagChanges([t],"override"))}clearAllOverrides(){if(this.r){let t=at({},this.r);this.r=void 0,this.w.handleFlagChanges(Object.keys(t),"override")}}getAllOverrides(){if(!this.r)return{};let t={};return Object.entries(this.r).forEach(([e,n])=>{t[e]=this.Ft(n)}),t}getDebugOverride(){return{setOverride:this.setOverride.bind(this),removeOverride:this.removeOverride.bind(this),clearAllOverrides:this.clearAllOverrides.bind(this),getAllOverrides:this.getAllOverrides.bind(this)}}},up="unknown hook",_p="beforeEvaluation",Hp="afterEvaluation",Pw="afterTrack";function br(t,e,n,r,i){try{return r()}catch(o){return t==null||t.error(`An error was encountered in "${e}" of the "${n}" hook: ${o}`),i}}function vr(t,e){try{return e.getMetadata().name||up}catch(n){return t.error("Exception thrown getting metadata for hook. Unable to get hook name."),up}}function Fw(t,e,n){return e.map(r=>br(t,_p,vr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeEvaluation)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function Aw(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,Hp,vr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterEvaluation)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function Jw(t,e,n){return e.map(r=>br(t,_p,vr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeIdentify)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function Dw(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,Hp,vr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterIdentify)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function Yw(t,e,n){for(let r=e.length-1;r>=0;r-=1){let i=e[r];br(t,Pw,vr(t,i),()=>{var o;return(o=i==null?void 0:i.afterTrack)==null?void 0:o.call(i,n)},void 0)}}var Kw=class{constructor(t,e){this.t=t,this.F=[],this.F.push(...e)}withEvaluation(t,e,n,r){if(this.F.length===0)return r();let i=[...this.F],o={flagKey:t,context:e,defaultValue:n},s=Fw(this.t,i,o),a=r();return Aw(this.t,i,o,s,a),a}identify(t,e){let n=[...this.F],r={context:t,timeout:e},i=Jw(this.t,n,r);return o=>{Dw(this.t,n,r,i,o)}}addHook(t){this.F.push(t)}afterTrack(t){if(this.F.length===0)return;let e=[...this.F];Yw(this.t,e,t)}};function _w(t){return{getMetadata(){return{name:"LaunchDarkly-Inspector-Adapter"}},afterEvaluation:(e,n,r)=>(t.onFlagUsed(e.flagKey,r,e.context),n),afterIdentify(e,n,r){return t.onIdentityChanged(e.context),n}}}function Hw(t,e){return`an inspector: "${e}" of an invalid type (${t}) was configured`}function zw(t,e){return`an inspector: "${e}" of type: "${t}" generated an exception`}function Bw(t,e){let n=!1,r={method:(...i)=>{try{t.method(...i)}catch(o){n||(n=!0,e.warn(zw(r.type,r.name)))}},type:t.type,name:t.name,synchronous:t.synchronous};return r}var zp="flag-used",Bp="flag-details-changed",jp="flag-detail-changed",Qp="client-identity-changed",jw=[zp,Bp,jp,Qp];function Qw(t,e){let n=jw.includes(t.type)&&t.method&&typeof t.method=="function";return n||e.warn(Hw(t.type,t.name)),n}var $w=class{constructor(t,e){this.W=[];let n=t.filter(r=>Qw(r,e));this.W=n.map(r=>Bw(r,e))}hasInspectors(){return this.W.length!==0}onFlagUsed(t,e,n){this.W.forEach(r=>{r.type===zp&&r.method(t,e,n)})}onFlagsChanged(t){this.W.forEach(e=>{e.type===Bp&&e.method(t)})}onFlagChanged(t,e){this.W.forEach(n=>{n.type===jp&&n.method(t,e)})}onIdentityChanged(t){this.W.forEach(e=>{e.type===Qp&&e.method(t)})}},qw=class{constructor(t){this.t=t,this.n=new Map}on(t,e){var n;this.n.has(t)?(n=this.n.get(t))==null||n.push(e):this.n.set(t,[e])}off(t,e){let n=this.n.get(t);if(n){if(e){let r=n.filter(i=>i!==e);r.length===0?this.n.delete(t):this.n.set(t,r);return}this.n.delete(t)}}Mi(t,e,...n){var r;try{t(...n)}catch(i){(r=this.t)==null||r.error(`Encountered error invoking handler for "${e}", detail: "${i}"`)}}emit(t,...e){let n=this.n.get(t);n==null||n.forEach(r=>this.Mi(r,t,...e))}eventNames(){return[...this.n.keys()]}listenerCount(t){var e,n;return(n=(e=this.n.get(t))==null?void 0:e.length)!=null?n:0}};function tI(t,e,n){let r=e.info.sdkData(),i;n.applicationInfo&&(n.applicationInfo.id&&(i=i!=null?i:{},i.id=n.applicationInfo.id),n.applicationInfo.version&&(i=i!=null?i:{},i.version=n.applicationInfo.version),n.applicationInfo.name&&(i=i!=null?i:{},i.name=n.applicationInfo.name),n.applicationInfo.versionName&&(i=i!=null?i:{},i.versionName=n.applicationInfo.versionName));let o={name:r.userAgentBase,version:r.version};r.wrapperName&&(o.wrapperName=r.wrapperName),r.wrapperVersion&&(o.wrapperVersion=r.wrapperVersion);let s={sdk:o,[n.credentialType]:t};return i&&(s.application=i),s}var{ClientMessages:hp,ErrorKinds:pp}=de,eI=5,nI=class{constructor(t,e,n,r,i,o){if(this.sdkKey=t,this.autoEnvAttributes=e,this.platform=n,this.a=Tw(),this.Ut=15,this.N=new cp(!1),this.ft=new cp(!0),this.Vt=!1,this.Fi=cw(),!t)throw new Error("You must configure the client with a client-side SDK key");if(!n.encoding)throw new Error("Platform must implement Encoding because btoa is required.");this.e=new dw(r,o),this.logger=this.e.logger,this.Se=AS(this.sdkKey,this.platform.info,this.e.tags,this.e.serviceEndpoints.includeAuthorizationHeader,this.e.userAgentHeaderName),this.E=new Mw(this.platform,t,this.e.maxCachedContexts,this.e.logger),this.L=Ow(t,this.e,n),this.D=Gw(t,this.e,n,this.Se,this.L),this.emitter=new qw,this.emitter.on("error",(a,c)=>{this.logger.error(`error: ${c}, context: ${JSON.stringify(a)}`)}),this.E.on((a,c,l)=>{this.Ui(c,l);let u=xn.toLDContext(a);this.emitter.emit("change",u,c),c.forEach(h=>{this.emitter.emit(`change:${h}`,u)})}),this.dataManager=i(this.E,this.e,this.Se,this.emitter,this.L);let s=[...this.e.hooks];if(this.environmentMetadata=tI(this.sdkKey,this.platform,this.e),this.e.getImplementationHooks(this.environmentMetadata).forEach(a=>{s.push(a)}),this.U=new Kw(this.logger,s),this.Q=new $w(this.e.inspectors,this.logger),this.Q.hasInspectors()&&this.U.addHook(_w(this.Q)),r.cleanOldPersistentData&&o!=null&&o.getLegacyStorageKeys&&this.platform.storage)try{this.logger.debug("Cleaning old persistent data."),Promise.all(o.getLegacyStorageKeys().map(a=>{var c;return(c=this.platform.storage)==null?void 0:c.clear(a)})).catch(a=>{this.logger.error(`Error cleaning old persistent data: ${a}`)}).finally(()=>{this.logger.debug("Cleaned old persistent data.")})}catch(a){this.logger.error(`Error cleaning old persistent data: ${a}`)}}allFlags(){return Object.entries(this.E.getAll()).reduce((t,[e,n])=>(n.flag!==null&&n.flag!==void 0&&!n.flag.deleted&&(t[e]=n.flag.value),t),{})}async close(){var t;await this.flush(),(t=this.D)==null||t.close(),this.dataManager.close(),this.logger.debug("Closed event processor and data source.")}async flush(){var t;try{await((t=this.D)==null?void 0:t.flush()),this.logger.debug("Successfully flushed event processor.")}catch(e){return this.logger.error(`Error flushing event processor: ${e}.`),{error:e,result:!1}}return{result:!0}}getContext(){return this.a.hasContext()?Np(this.a.getUnwrappedContext()):void 0}getInternalContext(){return this.a.getContext()}presetFlags(t){this.E.presetFlags(t)}async identify(t,e){let n=await this.identifyResult(t,e);if(n.status==="error")throw n.error;if(n.status==="timeout"){let r=new xp(`identify timed out after ${n.timeout} seconds.`);throw this.logger.error(r.message),r}}async identifyResult(t,e){var n,r;let i=(n=e==null?void 0:e.timeout)!=null?n:eI,o=(e==null?void 0:e.timeout)===void 0&&(e==null?void 0:e.noTimeout)===!0;i>this.Ut&&this.logger.warn(`The identify function was called with a timeout greater than ${this.Ut} seconds. We recommend a timeout of less than ${this.Ut} seconds.`);let s=this.Fi.execute({before:async()=>{let c=await xw(t,this.platform);this.autoEnvAttributes===Ji.Enabled&&(c=await Iw(c,this.platform,this.e));let l=xn.fromLDContext(c);if(l.valid){let u=this.U.identify(c,e==null?void 0:e.timeout);return{context:c,checkedContext:l,afterIdentify:u}}return{context:c,checkedContext:l}},execute:async c=>{var l;let{context:u,checkedContext:h}=c;if(!h.valid){let d=new Error("Context was unspecified or had no key");return this.emitter.emit("error",u,d),Promise.reject(d)}this.a.set(u,h),(l=this.D)==null||l.sendEvent(this.N.identifyEvent(h));let{identifyPromise:p,identifyResolve:f,identifyReject:m}=this.a.newIdentificationPromise();return this.logger.debug(`Identifying ${JSON.stringify(h)}`),await this.dataManager.identify(f,m,h,e),p},after:async(c,l)=>{var u,h,p;c.status==="complete"?(u=l==null?void 0:l.afterIdentify)==null||u.call(l,{status:"completed"}):c.status==="shed"?(h=l==null?void 0:l.afterIdentify)==null||h.call(l,{status:"shed"}):c.status==="error"&&((p=l==null?void 0:l.afterIdentify)==null||p.call(l,{status:"error"}))}},(r=e==null?void 0:e.sheddable)!=null?r:!1).then(c=>{if(c.status==="error"){let u={status:"error",error:c.error};return this.maybeSetInitializationResult({status:"failed",error:c.error}),u}if(c.status==="shed")return{status:"shed"};let l={status:"completed"};return this.maybeSetInitializationResult({status:"complete"}),l});if(o)return s;let a=new Promise(c=>{setTimeout(()=>{c({status:"timeout",timeout:i})},i*1e3)});return Promise.race([s,a])}maybeSetInitializationResult(t){this.initializeResult===void 0&&(this.initializeResult=t,this.emitter.emit("ready"),t.status==="complete"&&this.emitter.emit("initialized"),this.initResolve&&(this.initResolve(t),this.initResolve=void 0))}waitForInitialization(t){var e;let n=(e=t==null?void 0:t.timeout)!=null?e:5;return this.initializeResult?Promise.resolve(this.initializeResult):this.initializedPromise?this.promiseWithTimeout(this.initializedPromise,n):(this.initializedPromise||(this.initializedPromise=new Promise(r=>{this.initResolve=r})),this.promiseWithTimeout(this.initializedPromise,n))}promiseWithTimeout(t,e){let n=PS(e,"waitForInitialization");return Promise.race([t.then(r=>(n.cancel(),r)),n.promise.then(()=>({status:"complete"})).catch(()=>({status:"timeout"}))]).catch(r=>{var i;return(i=this.logger)==null||i.error(r.message),{status:"failed",error:r}})}on(t,e){this.emitter.on(t,e)}off(t,e){this.emitter.off(t,e)}track(t,e,n){var r,i;if(!this.a.hasValidContext()){this.logger.warn(hp.MissingContextKeyNoEvent);return}n!==void 0&&!G.Number.is(n)&&((r=this.logger)==null||r.warn(hp.invalidMetricValue(typeof n))),(i=this.D)==null||i.sendEvent(this.e.trackEventModifier(this.N.customEvent(t,this.a.getContext(),e,n))),this.U.afterTrack({key:t,context:this.a.getUnwrappedContext(),data:e,metricValue:n})}pt(t,e,n,r){var i,o,s,a;let c=this.a.hasContext();c||(i=this.logger)==null||i.warn("Flag evaluation called before client is fully initialized, data from this evaulation could be stale.");let l=this.a.getContext(),u=this.E.get(t);if(u===void 0||u.flag.deleted){let b=e!=null?e:null,v=new $h(`Unknown feature flag "${t}"; returning default value ${b}.`);return this.emitter.emit("error",this.a.getUnwrappedContext(),v),c&&((o=this.D)==null||o.sendEvent(this.N.unknownFlagEvent(t,b,l))),ap(pp.FlagNotFound,e)}let{reason:h,value:p,variation:f,prerequisites:m}=u.flag;if(r){let[b,v]=r(p);if(!b){c&&((s=this.D)==null||s.sendEvent(n.evalEventClient(t,e,e,u.flag,l,h)));let I=new $h(`Wrong type "${v}" for feature flag "${t}"; returning default value`);return this.emitter.emit("error",this.a.getUnwrappedContext(),I),ap(pp.WrongType,e)}}let d=lp(p,f,h);return p==null&&(this.logger.debug("Result value is null. Providing default value."),d.value=e),m==null||m.forEach(b=>{this.pt(b,void 0,this.N)}),c&&((a=this.D)==null||a.sendEvent(n.evalEventClient(t,p,e,u.flag,l,h))),d}variation(t,e){let{value:n}=this.U.withEvaluation(t,this.a.getUnwrappedContext(),e,()=>this.pt(t,e,this.N));return n}variationDetail(t,e){return this.U.withEvaluation(t,this.a.getUnwrappedContext(),e,()=>this.pt(t,e,this.ft))}_(t,e,n,r){return this.U.withEvaluation(t,this.a.getUnwrappedContext(),e,()=>this.pt(t,e,n,r))}boolVariation(t,e){return this._(t,e,this.N,n=>[G.Boolean.is(n),G.Boolean.getType()]).value}jsonVariation(t,e){return this.variation(t,e)}numberVariation(t,e){return this._(t,e,this.N,n=>[G.Number.is(n),G.Number.getType()]).value}stringVariation(t,e){return this._(t,e,this.N,n=>[G.String.is(n),G.String.getType()]).value}boolVariationDetail(t,e){return this._(t,e,this.ft,n=>[G.Boolean.is(n),G.Boolean.getType()])}numberVariationDetail(t,e){return this._(t,e,this.ft,n=>[G.Number.is(n),G.Number.getType()])}stringVariationDetail(t,e){return this._(t,e,this.ft,n=>[G.String.is(n),G.String.getType()])}jsonVariationDetail(t,e){return this.variationDetail(t,e)}addHook(t){this.U.addHook(t)}setEventSendingEnabled(t,e){var n,r,i,o;this.Vt!==t&&(this.Vt=t,t?(this.logger.debug("Starting event processor"),(n=this.D)==null||n.start()):e?((r=this.logger)==null||r.debug("Flushing event processor before disabling."),this.flush().then(()=>{var s,a;this.Vt||((s=this.logger)==null||s.debug("Stopping event processor."),(a=this.D)==null||a.close())})):((i=this.logger)==null||i.debug("Stopping event processor."),(o=this.D)==null||o.close()))}sendEvent(t){var e;(e=this.D)==null||e.sendEvent(t)}getDebugOverrides(){var t,e;return(e=(t=this.E).getDebugOverride)==null?void 0:e.call(t)}Ui(t,e){if(!this.Q.hasInspectors())return;let n={};t.forEach(r=>{let i=this.E.get(r);if(i!=null&&i.flag&&!i.flag.deleted){let{reason:o,value:s,variation:a}=i.flag;n[r]=lp(s,a,o)}else n[r]={value:void 0,reason:null,variationIndex:null}}),e==="init"?this.Q.onFlagsChanged(n):e==="patch"&&Object.entries(n).forEach(([r,i])=>{this.Q.onFlagChanged(r,i)})}};function rI(t,e,n){n.forEach(r=>{var i;try{(i=r.registerDebug)==null||i.call(r,e)}catch(o){t.error(`Exception thrown registering plugin ${de.safeGetName(t,r)}.`)}})}var iI=class{constructor(t,e,n){this.E=t,this.jt=e,this.t=n}async handlePut(t,e){this.t.debug(`Got PUT: ${Object.keys(e)}`);let n=Object.entries(e).reduce((r,[i,o])=>(r[i]={version:o.version,flag:o},r),{});await this.E.init(t,n),this.jt.requestStateUpdate(Kt.Valid)}async handlePatch(t,e){this.t.debug(`Got PATCH ${JSON.stringify(e,null,2)}`),this.E.upsert(t,e.key,{version:e.version,flag:e})}async handleDelete(t,e){this.t.debug(`Got DELETE ${JSON.stringify(e,null,2)}`),this.E.upsert(t,e.key,{version:e.version,flag:me(at({},e),{deleted:!0,flagVersion:0,value:void 0,variation:0,trackEvents:!1})})}handleStreamingError(t){this.jt.reportError(t.kind,t.message,t.code,t.recoverable)}handlePollingError(t){this.jt.reportError(t.kind,t.message,t.status,t.recoverable)}},oI=class{constructor(t,e=()=>Date.now()){this.Vi=t,this.gt=Kt.Closed,this.Le=e(),this.dt=e}get status(){return{state:this.gt,stateSince:this.Le,lastError:this.ji}}Ce(t,e=!1){let n=t===Kt.Interrupted&&this.gt===Kt.Initializing?Kt.Initializing:t,r=this.gt!==n;r&&(this.gt=n,this.Le=this.dt()),(r||e)&&this.Vi.emit("dataSourceStatus",this.status)}requestStateUpdate(t){this.Ce(t)}reportError(t,e,n,r=!1){let i={kind:t,message:e,statusCode:n,time:this.dt()};this.ji=i,this.Ce(r?Kt.Interrupted:Kt.Closed,!0)}};function dp(t){t==null||t.debug("Poll completed after the processor was closed. Skipping processing.")}var sI=class{constructor(t,e,n,r,i){this.Hi=t,this.zi=e,this.Bi=n,this.m=r,this.t=i,this.u=!1}async Ie(){var t,e,n,r,i,o,s;if(this.u)return;let a=h=>{var p,f,m;(p=this.t)==null||p.error("Polling received invalid data"),(f=this.t)==null||f.debug(`Invalid JSON follows: ${h}`),(m=this.m)==null||m.call(this,new Ai(_t.InvalidData,"Malformed JSON data in polling response"))};(t=this.t)==null||t.debug("Polling LaunchDarkly for feature flag updates");let c=Date.now();try{let h=await this.Hi.requestPayload();try{if(this.u){dp(this.t);return}let p=JSON.parse(h);try{(e=this.Bi)==null||e.call(this,p)}catch(f){(n=this.t)==null||n.error(`Exception from data handler: ${f}`)}}catch(p){a(h)}}catch(h){if(this.u){dp(this.t);return}let p=h;if(p.status!==void 0&&!_i(p.status)){(r=this.t)==null||r.error(Gn(h,"polling request")),(i=this.m)==null||i.call(this,new Ai(_t.ErrorResponse,p.message,p.status));return}(o=this.t)==null||o.error(Gn(h,"polling request","will retry"))}let l=Date.now()-c,u=Math.max(this.zi*1e3-l,0);(s=this.t)==null||s.debug("Elapsed: %d ms, sleeping for %d ms",l,u),this.Ht=setTimeout(()=>{this.Ie()},u)}start(){this.Ie()}stop(){this.Ht&&(clearTimeout(this.Ht),this.Ht=void 0),this.u=!0}close(){this.stop()}},aI=(t,e,n,r)=>{n==null||n.error(`Stream received invalid data in "${t}" message`),n==null||n.debug(`Invalid JSON follows: ${e}`),r==null||r(new Wa(_t.InvalidData,"Malformed JSON data in event stream"))};function lI(t,e){e==null||e.debug(`Received ${t} event after processor was closed. Skipping processing.`)}function fp(t){t==null||t.debug("Ping completed after processor was closed. Skipping processing.")}var cI=class{constructor(t,e,n,r,i,o,s,a,c){var l;this.Ki=t,this.zt=e,this.n=n,this.T=r,this.Gi=o,this.L=s,this.m=a,this.t=c,this.u=!1;let u;e.useReport&&!r.getEventSourceCapabilities().customMethod?u=e.paths.pathPing(i,t):u=e.useReport?e.paths.pathReport(i,t):e.paths.pathGet(i,t);let h=[...(l=e.queryParameters)!=null?l:[]];this.zt.withReasons&&h.push({key:"withReasons",value:"true"}),this.T=r,this.ht=at({},e.baseHeaders),this.t=c,this.Wi=WS(e.serviceEndpoints,u,h)}Ae(){this.mt=Date.now()}Bt(t){this.mt&&this.L&&this.L.recordStreamInit(this.mt,!t,Date.now()-this.mt),this.mt=void 0}Ar(t){var e,n,r;return Op(t)?((r=this.t)==null||r.warn(Gn(t,"streaming request","will retry")),this.Bt(!1),this.Ae(),!0):(this.Bt(!1),(e=this.m)==null||e.call(this,new Wa(_t.ErrorResponse,t.message,t.status,!1)),(n=this.t)==null||n.error(Gn(t,"streaming request")),!1)}start(){this.Ae();let t;this.zt.useReport?(this.ht["content-type"]="application/json",t={method:"REPORT",body:this.Ki}):t={};let e=this.T.createEventSource(this.Wi,me(at({headers:this.ht},t),{errorFilter:n=>this.Ar(n),initialRetryDelayMillis:this.zt.initialRetryDelayMillis,readTimeoutMillis:300*1e3,retryResetIntervalMillis:60*1e3}));this.Pe=e,e.onclose=()=>{var n;(n=this.t)==null||n.info("Closed LaunchDarkly stream connection")},e.onerror=()=>{},e.onopen=()=>{var n;(n=this.t)==null||n.info("Opened LaunchDarkly stream connection")},e.onretrying=n=>{var r;(r=this.t)==null||r.info(`Will retry stream connection in ${n.delayMillis} milliseconds`)},this.n.forEach(({deserializeData:n,processJson:r},i)=>{e.addEventListener(i,o=>{var s,a;if(this.u){lI(i,this.t);return}if((s=this.t)==null||s.debug(`Received ${i} event`),o!=null&&o.data){this.Bt(!0);let{data:c}=o,l=n(c);if(!l){aI(i,c,this.t,this.m);return}r(l)}else(a=this.m)==null||a.call(this,new Wa(_t.InvalidData,"Unexpected payload from event stream"))})}),e.addEventListener("ping",async()=>{var n,r,i,o,s,a,c;(n=this.t)==null||n.debug("Got PING, going to poll LaunchDarkly for feature flag updates");try{let l=await this.Gi.requestPayload();try{if(this.u){fp(this.t);return}let u=JSON.parse(l);try{(r=this.n.get("put"))==null||r.processJson(u)}catch(h){(i=this.t)==null||i.error(`Exception from data handler: ${h}`)}}catch(u){(o=this.t)==null||o.error("Polling after ping received invalid data"),(s=this.t)==null||s.debug(`Invalid JSON follows: ${l}`),(a=this.m)==null||a.call(this,new Ai(_t.InvalidData,"Malformed JSON data in ping polling response"))}}catch(l){if(this.u){fp(this.t);return}let u=l;(c=this.m)==null||c.call(this,new Ai(_t.ErrorResponse,u.message,u.status))}})}stop(){var t;(t=this.Pe)==null||t.close(),this.Pe=void 0,this.u=!0}close(){this.stop()}},uI=class{constructor(t,e,n,r,i,o,s,a,c){this.platform=t,this.flagManager=e,this.credential=n,this.config=r,this.getPollingPaths=i,this.getStreamingPaths=o,this.baseHeaders=s,this.emitter=a,this.diagnosticsManager=c,this.closed=!1,this.logger=r.logger,this.dataSourceStatusManager=new oI(a),this.J=new iI(e,this.dataSourceStatusManager,this.config.logger)}setConnectionParams(t){this.Ji=t}createPollingProcessor(t,e,n,r,i){let o=new sI(n,this.config.pollInterval,async s=>{await this.J.handlePut(e,s),r==null||r()},s=>{this.emitter.emit("error",t,s),this.J.handlePollingError(s),i==null||i(s)},this.logger);this.updateProcessor=this.Oe(o,this.dataSourceStatusManager)}createStreamingProcessor(t,e,n,r,i){var o;let s=new cI(JSON.stringify(t),{credential:this.credential,serviceEndpoints:this.config.serviceEndpoints,paths:this.getStreamingPaths(),baseHeaders:this.baseHeaders,initialRetryDelayMillis:this.config.streamInitialReconnectDelay*1e3,withReasons:this.config.withReasons,useReport:this.config.useReport,queryParameters:(o=this.Ji)==null?void 0:o.queryParameters},this.createStreamListeners(e,r),this.platform.requests,this.platform.encoding,n,this.diagnosticsManager,a=>{this.emitter.emit("error",t,a),this.J.handleStreamingError(a),i==null||i(a)},this.logger);this.updateProcessor=this.Oe(s,this.dataSourceStatusManager)}createStreamListeners(t,e){let n=new Map;return n.set("put",{deserializeData:JSON.parse,processJson:async r=>{await this.J.handlePut(t,r),e==null||e()}}),n.set("patch",{deserializeData:JSON.parse,processJson:async r=>{this.J.handlePatch(t,r)}}),n.set("delete",{deserializeData:JSON.parse,processJson:async r=>{this.J.handleDelete(t,r)}}),n}Oe(t,e){return{start:()=>{e.requestStateUpdate(Kt.Initializing),t.start()},stop:()=>{t.stop(),e.requestStateUpdate(Kt.Closed)},close:()=>{t.close(),e.requestStateUpdate(Kt.Closed)}}}close(){var t;(t=this.updateProcessor)==null||t.close(),this.closed=!0}};function $p(t,e){let n=Object.keys(e),r="$flagsState",i="$valid",o=e[r];!o&&n.length&&t.warn("LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."),e[i]===!1&&t.warn("LaunchDarkly bootstrap data is not available because the back end could not read the flags.");let s={};return n.forEach(a=>{if(a!==r&&a!==i){let c;o&&o[a]?c=at({value:e[a]},o[a]):c={value:e[a],version:0},s[a]={version:c.version,flag:c}}}),s}function Hi(){return typeof document!==void 0}function Ka(){return typeof window!==void 0}function qp(t,e,n){return Hi()?(document.addEventListener(t,e,n),()=>{document.removeEventListener(t,e,n)}):()=>{}}function td(t,e,n){return Hi()?(window.addEventListener(t,e,n),()=>{window.removeEventListener(t,e,n)}):()=>{}}function yr(){return Ka()?window.location.href:""}function hI(){return Ka()?window.location.search:""}function pI(){return Ka()?window.location.hash:""}function dI(){if(typeof crypto!==void 0)return crypto;throw Error("Access to a web crypto API is required")}function fI(){return Hi()?document.visibilityState:"visibile"}function mI(t){if(Hi())return document.querySelectorAll(t)}var yI="[BrowserDataManager]",gI=class extends uI{constructor(t,e,n,r,i,o,s,a,c,l){super(t,e,n,r,o,s,a,c,l),this.ls=i,this.tt=void 0,this.Kt=!1,this.tt=i.streaming}C(t,...e){this.logger.debug(`${yI} ${t}`,...e)}async identify(t,e,n,r){if(this.closed){this.C("Identify called after data manager was closed.");return}this.context=n;let i=r;i!=null&&i.hash?this.setConnectionParams({queryParameters:[{key:"h",value:i.hash}]}):this.setConnectionParams(),this.Gt=i==null?void 0:i.hash,i!=null&&i.bootstrap?this.qi(n,i.bootstrap,t):(await this.flagManager.loadCached(n)&&this.C("Identify - Flags loaded from cache. Continuing to initialize via a poll."),await this.Yi(n,t,e)),this.Wt()}async Zi(t){let e=JSON.stringify(xn.toLDContext(t)),n=rp(e,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.Gt),r=3,i;for(let o=0;o<=r;o+=1)try{return await n.requestPayload()}catch(s){if(!Op(s))throw s;i=s,o<r&&(this.C(Gn(s,"initial poll request","will retry")),await Gp(1e3))}throw i}async Yi(t,e,n){var r,i;try{this.dataSourceStatusManager.requestStateUpdate(Kt.Initializing);let o=await this.Zi(t);try{let s=this.createStreamListeners(t,e).get("put");s.processJson(s.deserializeData(o))}catch(s){this.dataSourceStatusManager.reportError(_t.InvalidData,(r=s.message)!=null?r:"Could not parse poll response")}}catch(o){this.dataSourceStatusManager.reportError(_t.NetworkError,(i=o.message)!=null?i:"unexpected network error",o.status),n(o)}}qi(t,e,n){this.flagManager.setBootstrap(t,$p(this.logger,e)),this.C("Identify - Initialization completed from bootstrap"),n()}setForcedStreaming(t){this.tt=t,this.Wt()}setAutomaticStreamingState(t){this.Kt=t,this.Wt()}Wt(){let t=this.tt||this.Kt&&this.tt===void 0;this.C(`Updating streaming state. forced(${this.tt}) automatic(${this.Kt})`),t?this.Xi():this.Qi()}Qi(){var t;this.updateProcessor&&this.C("Stopping update processor."),(t=this.updateProcessor)==null||t.close(),this.updateProcessor=void 0}Xi(){if(this.updateProcessor){this.C("Update processor already active. Not changing state.");return}if(!this.context){this.C("Context not set, not starting update processor.");return}this.C("Starting update processor."),this.ts(this.context)}ts(t,e,n){var r;let i=xn.toLDContext(t);(r=this.updateProcessor)==null||r.close();let o=JSON.stringify(xn.toLDContext(t)),s=rp(o,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.Gt);this.createStreamingProcessor(i,t,s,e,n),this.updateProcessor.start()}};function bI(t){let e=qp("visibilitychange",()=>{fI()==="hidden"&&t()}),n=td("pagehide",t);return()=>{e(),n()}}function Oa(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vI(t,e,n,r){let i=((t.kind==="substring"||t.kind==="regex")&&r.includes("/")?e:e.replace(r,"")).replace(n,"");switch(t.kind){case"exact":return new RegExp(`^${Oa(t.url)}/?$`).test(e);case"canonical":return new RegExp(`^${Oa(t.url)}/?$`).test(i);case"substring":return new RegExp(`.*${Oa(t.substring)}.*$`).test(i);case"regex":return new RegExp(t.pattern).test(i);default:return!1}}function SI(t,e){let n=[];return e.forEach(r=>{let i=t.target,{selector:o}=r,s=mI(o);for(;i&&s!=null&&s.length;){for(let a=0;a<s.length;a+=1)if(i===s[a]){n.push(r);break}i=i.parentNode}}),n}var wI=class{constructor(t,e){let n=t.filter(o=>{var s;return(s=o.urls)==null?void 0:s.some(a=>vI(a,yr(),hI(),pI()))}),r=n.filter(o=>o.kind==="pageview"),i=n.filter(o=>o.kind==="click");if(r.forEach(o=>e(o)),i.length){let o=s=>{SI(s,i).forEach(a=>{e(a)})};this.Te=qp("click",o)}}close(){var t;(t=this.Te)==null||t.call(this)}},II=300,TI=class{constructor(t){this.No=yr();let e=()=>{let r=yr();r!==this.No&&(this.No=r,t())};this.Jt=setInterval(e,II);let n=td("popstate",e);this.$e=()=>{n()}}close(){var t;this.Jt&&clearInterval(this.Jt),(t=this.$e)==null||t.call(this)}},EI=class{constructor(t,e,n,r,i,o=s=>new TI(s)){this.T=e,this.ns=r,this.ss=i,this.yt=[],this.Re=!1,this.vt=`${n}/sdk/goals/${t}`,this.Ne=o(()=>{this.Yt()})}async initialize(){await this.es(),this.Yt()}startTracking(){this.Re=!0,this.Yt()}Yt(){var t;this.Re&&((t=this.qt)==null||t.close(),this.yt&&this.yt.length&&(this.qt=new wI(this.yt,e=>{this.ss(yr(),e)})))}async es(){try{let t=await this.T.fetch(this.vt);this.yt=await t.json()}catch(t){this.ns(new Vp(`Encountered error fetching goals: ${t}`))}}close(){var t,e;(t=this.Ne)==null||t.close(),(e=this.qt)==null||e.close()}};function RI(t){return t.kind==="click"}var CI=2,ed={fetchGoals:!0,eventUrlTransformer:t=>t,streaming:void 0,plugins:[]},ZI={fetchGoals:G.Boolean,eventUrlTransformer:G.Function,streaming:G.Boolean,plugins:G.createTypeArray("LDPlugin",{})};function kI(t){var e;let n=at({},t);return(e=n.flushInterval)!=null||(n.flushInterval=CI),n}function VI(t){let e=kI(t);return Object.keys(ed).forEach(n=>{delete e[n]}),e}function xI(t,e){let n=at({},ed);return Object.entries(ZI).forEach(r=>{let[i,o]=r,s=t[i];s!==void 0&&(o.is(s)?n[i]=s:e.warn(Ue.wrongOptionType(i,o.getType(),typeof s)))}),n}var NI=class{constructor(t,e){switch(this.rs=t,this.Me=[],e){case"sha1":this.Zt="SHA-1";break;case"sha256":this.Zt="SHA-256";break;default:throw new Error(`Algorithm is not supported ${e}`)}}async asyncDigest(t){let e=this.Me.join(""),n=new TextEncoder().encode(e),r=await this.rs.subtle.digest(this.Zt,n);switch(t){case"base64":return btoa(String.fromCharCode(...new Uint8Array(r)));case"hex":return[...new Uint8Array(r)].map(i=>i.toString(16).padStart(2,"0")).join("");default:throw new Error(`Encoding is not supported ${t}`)}}update(t){return this.Me.push(t),this}},OI={start:0,end:3},GI={start:4,end:5},Ga={start:6,end:7},La={start:8,end:8},LI={start:9,end:9},XI={start:10,end:15};function WI(){if(crypto&&crypto.getRandomValues){let e=new Uint8Array(16);return crypto.getRandomValues(e),[...e.values()]}let t=[];for(let e=0;e<16;e+=1)t.push(Math.floor(Math.random()*256));return t}function kn(t,e){let n="";for(let r=e.start;r<=e.end;r+=1)n+=t[r].toString(16).padStart(2,"0");return n}function UI(t){return t[La.start]=(t[La.start]|128)&191,t[Ga.start]=t[Ga.start]&15|64,`${kn(t,OI)}-${kn(t,GI)}-${kn(t,Ga)}-${kn(t,La)}${kn(t,LI)}-${kn(t,XI)}`}function MI(){let t=WI();return UI(t)}function PI(){return typeof crypto!==void 0&&typeof crypto.randomUUID=="function"?crypto.randomUUID():MI()}var FI=class{createHash(t){return new NI(dI(),t)}randomUUID(){return PI()}};function AI(t){let e=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(e)}var JI=class{btoa(t){return AI(new TextEncoder().encode(t))}},DI=class{constructor(t){this.e=t}platformData(){return{name:"JS"}}sdkData(){let t={name:"@launchdarkly/js-client-sdk",version:"0.12.0",userAgentBase:"JSClient"};return this.e.wrapperName&&(t.wrapperName=this.e.wrapperName),this.e.wrapperVersion&&(t.wrapperVersion=this.e.wrapperVersion),t}},YI=class{constructor(t,e){this.vt=t,this.n={},this.A=new RS(e.initialRetryDelayMillis,e.retryResetIntervalMillis),this.Fe=e.errorFilter,this.Ue()}Ue(){this.q=new EventSource(this.vt),this.q.onopen=()=>{var t;this.A.success(),(t=this.onopen)==null||t.call(this)},this.q.onerror=t=>{var e;this.as(t),(e=this.onerror)==null||e.call(this,t)},Object.entries(this.n).forEach(([t,e])=>{e.forEach(n=>{var r;(r=this.q)==null||r.addEventListener(t,n)})})}addEventListener(t,e){var n,r,i;(r=(n=this.n)[t])!=null||(n[t]=[]),this.n[t].push(e),(i=this.q)==null||i.addEventListener(t,e)}close(){var t,e;clearTimeout(this.Xt),this.Xt=void 0,(t=this.q)==null||t.close(),(e=this.onclose)==null||e.call(this)}cs(t){var e;(e=this.onretrying)==null||e.call(this,{delayMillis:t}),this.Xt=setTimeout(()=>{this.Ue()},t)}as(t){this.close(),!(t.status&&typeof t.status=="number"&&!this.Fe(t))&&this.cs(this.A.fail())}},KI=class{fetch(t,e){return fetch(t,e)}createEventSource(t,e){return new YI(t,e)}getEventSourceCapabilities(){return{customMethod:!1,readTimeout:!1,headers:!1}}};function nd(){return typeof localStorage!="undefined"}function _I(){if(!nd())return[];let t=[];for(let e=0;e<localStorage.length;e+=1){let n=localStorage.key(e);n&&t.push(n)}return t}var HI=class{constructor(t){this.t=t}async clear(t){var e;try{localStorage.removeItem(t)}catch(n){(e=this.t)==null||e.error(`Error clearing key from localStorage: ${t}, reason: ${n}`)}}async get(t){var e;try{let n=localStorage.getItem(t);return n!=null?n:null}catch(n){return(e=this.t)==null||e.error(`Error getting key from localStorage: ${t}, reason: ${n}`),null}}async set(t,e){var n;try{localStorage.setItem(t,e)}catch(r){(n=this.t)==null||n.error(`Error setting key in localStorage: ${t}, reason: ${r}`)}}},zI=class{constructor(t,e){this.encoding=new JI,this.crypto=new FI,this.requests=new KI,nd()&&(this.storage=new HI(t)),this.info=new DI(e)}},BI=class extends nI{constructor(t,e,n={},r){var i;let{logger:o,debug:s}=n,a=o!=null?o:new Fa({destination:{debug:console.debug,info:console.info,warn:console.warn,error:console.error},level:s?"debug":"info"}),c=(i=n.baseUri)!=null?i:"https://clientsdk.launchdarkly.com",l=r!=null?r:new zI(a,n),u=xI(n,a),h=VI(me(at({},n),{logger:a})),{eventUrlTransformer:p}=u;super(t,e,l,h,(f,m,d,b,v)=>new gI(l,f,t,m,u,()=>({pathGet(I,R){return`/sdk/evalx/${t}/contexts/${qh(R,I)}`},pathReport(I,R){return`/sdk/evalx/${t}/context`},pathPing(I,R){throw new Error("Ping for polling unsupported.")}}),()=>({pathGet(I,R){return`/eval/${t}/${qh(R,I)}`},pathReport(I,R){return`/eval/${t}`},pathPing(I,R){return`/ping/${t}`}}),d,b,v),{getLegacyStorageKeys:()=>_I().filter(f=>f.startsWith(`ld:${t}:`)),analyticsEventPath:`/events/bulk/${t}`,diagnosticEventPath:`/events/diagnostic/${t}`,includeAuthorizationHeader:!1,highTimeoutThreshold:5,userAgentHeaderName:"x-launchdarkly-user-agent",trackEventModifier:f=>new de.InputCustomEvent(f.context,f.key,f.data,f.metricValue,f.samplingRatio,p(yr())),getImplementationHooks:f=>de.safeGetHooks(a,f,u.plugins),credentialType:"clientSideId"}),this.setEventSendingEnabled(!0,!1),this.te=u.plugins,u.fetchGoals&&(this.Qt=new EI(t,l.requests,c,f=>{a.error(f.message)},(f,m)=>{let d=this.getInternalContext();if(!d)return;let b=p(f);RI(m)?this.sendEvent({kind:"click",url:b,samplingRatio:1,key:m.key,creationDate:Date.now(),context:d,selector:m.selector}):this.sendEvent({kind:"pageview",url:b,samplingRatio:1,key:m.key,creationDate:Date.now(),context:d})}),this.Qt.initialize(),u.automaticBackgroundHandling&&bI(()=>this.flush()))}registerPlugins(t){de.safeRegisterPlugins(this.logger,this.environmentMetadata,t,this.te||[]);let e=this.getDebugOverrides();e&&rI(this.logger,e,this.te||[])}setInitialContext(t){this.ee=t}async identify(t,e){return super.identify(t,e)}async identifyResult(t,e){var n;if(!this.et)return this.logger.error("Client must be started before it can identify a context, did you forget to call start()?"),{status:"error",error:new Error("Identify called before start")};let r=at({},e);(e==null?void 0:e.sheddable)===void 0&&(r.sheddable=!0);let i=await super.identifyResult(t,r);return(n=this.Qt)==null||n.startTracking(),i}start(t){var e,n;if(this.initializeResult)return Promise.resolve(this.initializeResult);if(this.et)return this.et;if(!this.ee)return this.logger.error("Initial context not set"),Promise.resolve({status:"failed",error:new Error("Initial context not set")});let r=me(at({},(e=t==null?void 0:t.identifyOptions)!=null?e:{}),{sheddable:!1});if(t!=null&&t.bootstrap&&!r.bootstrap&&(r.bootstrap=t.bootstrap),r!=null&&r.bootstrap)try{let i=$p(this.logger,r.bootstrap);this.presetFlags(i)}catch(i){this.logger.error("Failed to bootstrap data",i)}return this.initializedPromise||(this.initializedPromise=new Promise(i=>{this.initResolve=i})),this.et=this.promiseWithTimeout(this.initializedPromise,(n=t==null?void 0:t.timeout)!=null?n:5),this.identifyResult(this.ee,r),this.et}setStreaming(t){this.dataManager.setForcedStreaming(t)}Ve(){this.dataManager.setAutomaticStreamingState(!!this.emitter.listenerCount("change"))}on(t,e){super.on(t,e),this.Ve()}off(t,e){super.off(t,e),this.Ve()}};function jI(t,e,n,r={},i){let o=new BI(t,n,r,i);o.setInitialContext(e);let s={variation:(a,c)=>o.variation(a,c),variationDetail:(a,c)=>o.variationDetail(a,c),boolVariation:(a,c)=>o.boolVariation(a,c),boolVariationDetail:(a,c)=>o.boolVariationDetail(a,c),numberVariation:(a,c)=>o.numberVariation(a,c),numberVariationDetail:(a,c)=>o.numberVariationDetail(a,c),stringVariation:(a,c)=>o.stringVariation(a,c),stringVariationDetail:(a,c)=>o.stringVariationDetail(a,c),jsonVariation:(a,c)=>o.jsonVariation(a,c),jsonVariationDetail:(a,c)=>o.jsonVariationDetail(a,c),track:(a,c,l)=>o.track(a,c,l),on:(a,c)=>o.on(a,c),off:(a,c)=>o.off(a,c),flush:()=>o.flush(),setStreaming:a=>o.setStreaming(a),identify:(a,c)=>o.identifyResult(a,c),getContext:()=>o.getContext(),close:()=>o.close(),allFlags:()=>o.allFlags(),addHook:a=>o.addHook(a),waitForInitialization:a=>o.waitForInitialization(a),logger:o.logger,start:a=>o.start(a)};return o.registerPlugins(s),s}function QI(t){return new Fa(t)}function rd(t,e,n){return jI(t,e,Ji.Disabled,n)}var $I=Object.defineProperty,qI=(t,e,n)=>e in t?$I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Te=(t,e,n)=>qI(t,typeof e!="symbol"?e+"":e,n),tT=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),ke=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),eT(r,...n)},eT=(t,...e)=>tT(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>sR);n.recordLog(`${t}${e}`,"warn")}catch(n){}}),nT=class{constructor(t,e){Te(this,"debug"),Te(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},So=class{constructor(){Te(this,"_sdk"),Te(this,"_isLoaded",!1),Te(this,"_callBuffer",[]),Te(this,"_capacity",1e5),Te(this,"_droppedEvents",0),Te(this,"_exceededCapacity",!1),Te(this,"_logger",new nT)}h(e,n){if(this.Ln)try{return this.qn[e](...n)}catch(r){ke(`Error executing buffered call to ${e}:`,"error",r)}else{this.Jr({method:e,args:n});return}}Jr(e){this.En.length<this.Ys?(this.En.push(e),this.tr=!1):(this.tr||(this.tr=!0,ke("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Ks+=1)}load(e){this.qn=e,this.Ln=!0;for(let{method:n,args:r}of this.En)try{this.qn[n](...r)}catch(i){ke(`Error executing buffered call to ${n}:`,"error",i)}this.En=[]}},rT=Object.defineProperty,iT=Object.defineProperties,oT=Object.getOwnPropertyDescriptors,wo=Object.getOwnPropertySymbols,Af=Object.prototype.hasOwnProperty,Jf=Object.prototype.propertyIsEnumerable,kl=(t,e,n)=>e in t?rT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))Af.call(e,n)&&kl(t,n,e[n]);if(wo)for(var n of wo(e))Jf.call(e,n)&&kl(t,n,e[n]);return t},An=(t,e)=>iT(t,oT(e)),xr=(t,e)=>{var n={};for(var r in t)Af.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&wo)for(var r of wo(t))e.indexOf(r)<0&&Jf.call(t,r)&&(n[r]=t[r]);return n},Wr=(t,e,n)=>kl(t,typeof e!="symbol"?e+"":e,n),Dn=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});function sT(t,e){for(var n=0;n<e.length;n++){let r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(let i in r)if(i!=="default"&&!(i in t)){let o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function co(t,e){throw new Error(e)}function aT(t){return typeof t=="object"&&t!==null}function lT(t,e){throw new Error("Unexpected invariant triggered.")}var cT=/\r\n|[\n\r]/g;function Vl(t,e){let n=0,r=1;for(let i of t.body.matchAll(cT)){if(typeof i.index=="number"||lT(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function uT(t){return Df(t.source,Vl(t.source,t.start))}function Df(t,e){let n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,a=e.line===1?n:0,c=e.column+a,l=`${t.name}:${s}:${c}
|
|
349
|
-
`,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l+
|
|
350
|
-
`)}function hT(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}var pT=class
|
|
348
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`);let s=MF();n?yield n({session_secure_id:this.sessionData.sessionSecureID,payload_id:(this.sessionData.payloadID++).toString(),events:{events:r},messages:BL({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:s||void 0}):this.Qn.postMessage({message:{type:Ne.AsyncEvents,id:this.sessionData.payloadID++,events:r,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:s}}),In(this.sessionData),this.events=this.events.slice(r.length),PF(s)})}takeFullSnapshot(){if(!this.Tn){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this.wr,lastSnapshotTime:this.xo}),Ge.takeFullSnapshot(),this.wr=0,this.xo=new Date().getTime()}register(e,n){this.Gn.push(new pu(e,n))}getHooks(e){return this.Gn.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}getRecordingState(){var e;return(e=this==null?void 0:this.state)!=null?e:"NotRecording"}getSession(){let e=this.sessionData.sessionSecureID,n=ks(e);if(!n)return null;let r=`${this.getFrontendUrl()}/sessions/${e}`;if(!r||!(n!=null&&n.sessionStartTime))return null;let i=new Date().getTime(),o=new URL(r),s=new URL(r),a=(i-this.$n)/1e3;return s.searchParams.set("ts",a.toString()),{url:o.toString(),urlWithTimestamp:s.toString(),sessionSecureID:e}}getFrontendUrl(){var e,n;let r=this.mn.match(IX);if(r&&(e=r==null?void 0:r.groups)!=null&&e.domain){let i=(n=r.groups.domain)!=null?n:"";return`https://${SX[i]}${wX}`}return vX}},Ci=class extends HX{constructor(e,n){var r=(...f)=>(super(...f),Y(this,"record"),this),i,o,s,a,c,l,u,h,p;try{if(r(n),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(!e){console.warn("@launchdarkly/session-replay is not initializing because projectID was passed undefined.");return}let f=Yt(z({},n),{organizationID:e,firstloadVersion:KF,environment:(n==null?void 0:n.environment)||"production",appVersion:n==null?void 0:n.version,sessionSecureID:this.sessionSecureID,privacySetting:(i=n==null?void 0:n.privacySetting)!=null?i:"strict"});this.record=new oh(f),n!=null&&n.manualStart||this.record.start(),Be.load(this.record),!((s=(o=n==null?void 0:n.integrations)==null?void 0:o.mixpanel)!=null&&s.disabled)&&(c=(a=n==null?void 0:n.integrations)==null?void 0:a.mixpanel)!=null&&c.projectToken&&DF(n.integrations.mixpanel),!((u=(l=n==null?void 0:n.integrations)==null?void 0:l.amplitude)!=null&&u.disabled)&&(p=(h=n==null?void 0:n.integrations)==null?void 0:h.amplitude)!=null&&p.apiKey&&JF(n.integrations.amplitude)}catch(f){zt("Error initializing @launchdarkly/session-replay SDK","error",f)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(e,n){var r;(r=this.record)==null||r.register(e,n)}getHooks(e){return[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(n,r,i)=>{var o,s,a,c,l,u,h;for(let p of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=p.afterIdentify)==null||c.call(p,n,r,i);if(i.status==="completed"){let p=AX(n.context),f=JX(n.context);(h=this.record)==null||h.identify(typeof f=="string"?f:(u=(l=f.user)==null?void 0:l.toString())!=null?u:p,Yt(z({key:p},typeof f=="object"?f:{}),{timeout:n.timeout}),"LaunchDarkly")}return r},afterEvaluation:(n,r,i)=>{var o,s,a,c;for(let l of(a=(s=(o=this.record)==null?void 0:o.getHooks)==null?void 0:s.call(o,e))!=null?a:[])(c=l.afterEvaluation)==null||c.call(l,n,r,i);return r},afterTrack:n=>{var r,i,o,s,a;for(let c of(o=(i=(r=this.record)==null?void 0:r.getHooks)==null?void 0:i.call(r,e))!=null?o:[])(s=c.afterTrack)==null||s.call(c,n);(a=this.record)==null||a.track(n.key,{data:n.data,value:n.metricValue})}}]}}});var HF={};Yh(HF,{LDObserve:()=>De,LDRecord:()=>Be,basicLogger:()=>QI,createClient:()=>_F});module.exports=eS(HF);var nS=Object.defineProperty,rS=Object.defineProperties,iS=Object.getOwnPropertyDescriptors,Pi=Object.getOwnPropertySymbols,fp=Object.prototype.hasOwnProperty,mp=Object.prototype.propertyIsEnumerable,Kh=(t,e,n)=>e in t?nS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,at=(t,e)=>{for(var n in e||(e={}))fp.call(e,n)&&Kh(t,n,e[n]);if(Pi)for(var n of Pi(e))mp.call(e,n)&&Kh(t,n,e[n]);return t},me=(t,e)=>rS(t,iS(e)),yp=(t,e)=>{var n={};for(var r in t)fp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Pi)for(var r of Pi(t))e.indexOf(r)<0&&mp.call(t,r)&&(n[r]=t[r]);return n};function oS(t){return`/${t.replace(/~/g,"~0").replace(/\//g,"~1")}`}function gp(t){return t.indexOf("~")?t.replace(/~1/g,"/").replace(/~0/g,"~"):t}function sS(t){return(t.startsWith("/")?t.substring(1):t).split("/").map(e=>gp(e))}function aS(t){return!t.startsWith("/")}function lS(t){return!t.match(/\/\/|(^\/.*~[^0|^1])|~$/)}var Nn=class{constructor(t,e=!1){if(e){let n=t;this.p=[n],this.isValid=n!=="",this.redactionName=n.startsWith("/")?oS(n):n}else{if(this.redactionName=t,t===""||t==="/"||!lS(t)){this.isValid=!1,this.p=[];return}aS(t)?this.p=[t]:t.indexOf("/",1)<0?this.p=[gp(t.slice(1))]:this.p=sS(t),this.p[0]==="_meta"?this.isValid=!1:this.isValid=!0}}get(t){let{p:e,isValid:n}=this;if(!n)return;let r=t;for(let i=0;i<e.length;i+=1){let o=e[i];if(r!=null&&Object.prototype.hasOwnProperty.call(r,o)&&typeof r=="object"&&!Array.isArray(r))r=r[o];else return}return r}getComponent(t){return this.p[t]}get depth(){return this.p.length}get isKind(){return this.p.length===1&&this.p[0]==="kind"}compare(t){return this.depth===t.depth&&this.p.every((e,n)=>e===t.getComponent(n))}get components(){return[...this.p]}};Nn.InvalidReference=new Nn("");var cS=class{is(t){if(Array.isArray(t))return!1;let e=typeof t;return e==="function"||e==="object"}getType(){return"factory method or object"}},Ln=class{constructor(t,e){this.wt=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?!1:typeof t===this.typeOf}getType(){return this.wt}},bp=class{constructor(t,e){this.wt=t,this.typeOf=typeof e}is(t){return Array.isArray(t)?t.length>0?t.every(e=>typeof e===this.typeOf):!0:!1}getType(){return this.wt}},vp=class extends Ln{constructor(t){super(`number with minimum value of ${t}`,0),this.min=t}is(t){return typeof t===this.typeOf&&t>=this.min}},Sp=class extends Ln{constructor(t){super(`string matching ${t}`,""),this.expression=t}is(t){return typeof t=="string"&&!!t.match(this.expression)}},uS=class{is(t){return typeof t=="function"}getType(){return"function"}},hS=class{is(t){return typeof t=="boolean"||typeof t=="undefined"||t===null}getType(){return"boolean | undefined | null"}},pS=/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d*)?(Z|[-+]\d\d(:\d\d)?)/,dS=class{is(t){return typeof t=="number"||typeof t=="string"&&pS.test(t)}getType(){return"date"}},fS=class extends Sp{constructor(){super(/^(\w|\.|-)+$/)}is(t){return super.is(t)&&t!=="kind"}},G=class{static createTypeArray(t,e){return new bp(t,e)}static numberWithMin(t){return new vp(t)}static stringMatchingRegex(t){return new Sp(t)}};G.String=new Ln("string","");G.Number=new Ln("number",0);G.ObjectOrFactory=new cS;G.Object=new Ln("object",{});G.StringArray=new bp("string[]","");G.Boolean=new Ln("boolean",!0);G.Function=new uS;G.Date=new dS;G.Kind=new fS;G.NullableBoolean=new hS;function wp(t){return"kind"in t?G.String.is(t.kind)&&t.kind!=="multi":!1}function Ip(t){return"kind"in t?G.String.is(t.kind)&&t.kind==="multi":!1}function Tp(t){return!("kind"in t)||t.kind===null||t.kind===void 0}function Fi(t,e=[]){if(t===null||typeof t!="object")return JSON.stringify(t);if(e.includes(t))throw new Error("Cycle detected");return Array.isArray(t)?`[${t.map(n=>Fi(n,[...e,t])).map(n=>n===void 0?"null":n).join(",")}]`:`{${Object.keys(t).sort().map(n=>{let r=Fi(t[n],[...e,t]);if(r!==void 0)return`${JSON.stringify(n)}:${r}`}).filter(n=>n!==void 0).join(",")}}`}var Xa="user";function _h(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function mS(t){return t&&G.Object.is(t)}function Hh(t){return G.Kind.is(t)}function zh(t){return G.String.is(t)&&t!==""}function Ca(t,e=!1){return t?t.map(n=>new Nn(n,e)):[]}function yS(t){return t!=null}function gS(t){let e=me(at({},t.custom||[]),{kind:"user",key:String(t.key)});if(yS(t.anonymous)){let n=!!t.anonymous;delete e.anonymous,e.anonymous=n}return t.name!==null&&t.name!==void 0&&(e.name=t.name),t.ip!==null&&t.ip!==void 0&&(e.ip=t.ip),t.firstName!==null&&t.firstName!==void 0&&(e.firstName=t.firstName),t.lastName!==null&&t.lastName!==void 0&&(e.lastName=t.lastName),t.email!==null&&t.email!==void 0&&(e.email=t.email),t.avatar!==null&&t.avatar!==void 0&&(e.avatar=t.avatar),t.country!==null&&t.country!==void 0&&(e.country=t.country),t.privateAttributeNames!==null&&t.privateAttributeNames!==void 0&&(e._meta={privateAttributes:t.privateAttributeNames}),e}var xn=class wt{constructor(e,n,r){this.I=!1,this.it=!1,this.ie=!1,this.R={},this.kind=n,this.valid=e,this.message=r}static k(e,n){return new wt(!1,e,n)}static je(e,n){if(!(!n||!e.isValid))return e.depth===1&&e.getComponent(0)==="anonymous"?!!(n!=null&&n.anonymous):e.get(n)}se(e){if(this.I)return this.R[e];if(this.kind===e)return this.y}static He(e){let n=Object.keys(e).filter(c=>c!=="kind"),r=n.every(Hh);if(!n.length)return wt.k("multi","A multi-kind context must contain at least one kind");if(!r)return wt.k("multi","Context contains invalid kinds");let i={},o=!0,s=n.reduce((c,l)=>{var u;let h=e[l];return mS(h)?(c[l]=h,i[l]=Ca((u=h._meta)==null?void 0:u.privateAttributes)):o=!1,c},{});if(!o)return wt.k("multi","Context contained contexts that were not objects");if(!Object.values(s).every(c=>zh(c.key)))return wt.k("multi","Context contained invalid keys");if(n.length===1){let c=n[0],l=new wt(!0,c);return l.y=me(at({},s[c]),{kind:c}),l.st=i,l.it=c==="user",l}let a=new wt(!0,e.kind);return a.R=s,a.st=i,a.I=!0,a}static ze(e){var n;let{key:r,kind:i}=e,o=Hh(i),s=zh(r);if(!o)return wt.k(i!=null?i:"unknown","The kind was not valid for the context");if(!s)return wt.k(i,"The key for the context was not valid");let a=Ca((n=e._meta)==null?void 0:n.privateAttributes),c=new wt(!0,i);return c.it=i==="user",c.y=e,c.st={[i]:a},c}static Be(e){if(!(e.key!==void 0&&e.key!==null))return wt.k("user","The key for the context was not valid");let n=new wt(!0,"user");return n.it=!0,n.ie=!0,n.y=gS(e),n.st={user:Ca(e.privateAttributeNames,!0)},n}static fromLDContext(e){return e?wp(e)?wt.ze(e):Ip(e)?wt.He(e):Tp(e)?wt.Be(e):wt.k("unknown","Context was not of a valid kind"):wt.k("unknown","No context specified. Returning default value")}static toLDContext(e){if(!e.valid)return;let n=e.getContexts();if(!e.I)return n[0][1];let r={kind:"multi"};return n.forEach(i=>{let o=i[0],s=i[1];r[o]=s}),r}valueForKind(e,n=Xa){return e.isKind?this.kinds:wt.je(e,this.se(n))}key(e=Xa){var n;return(n=this.se(e))==null?void 0:n.key}get isMultiKind(){return this.I}get canonicalKey(){return this.it?this.y.key:this.I?Object.keys(this.R).sort().map(e=>`${e}:${_h(this.R[e].key)}`).join(":"):`${this.kind}:${_h(this.y.key)}`}get kinds(){return this.I?Object.keys(this.R):[this.kind]}get kindsAndKeys(){return this.I?Object.entries(this.R).reduce((e,[n,r])=>(e[n]=r.key,e),{}):{[this.kind]:this.y.key}}privateAttributes(e){var n;return((n=this.st)==null?void 0:n[e])||[]}getContexts(){return this.I?Object.entries(this.R):[[this.kind,this.y]]}get legacy(){return this.ie}canonicalUnfilteredJson(){if(this.valid){if(this.Et)return this.Et;try{this.Et=Fi(wt.toLDContext(this))}catch(e){}return this.Et}}};xn.UserKind=Xa;var bS=["key","kind","_meta","anonymous"].map(t=>new Nn(t,!0)),vS=["name","ip","firstName","lastName","email","avatar","country"];function SS(t,e){return t.depth===e.length&&e.every((n,r)=>n===t.getComponent(r))}function wS(t,e){let n=[],r={},i=[];for(n.push(...Object.keys(t).map(o=>({key:o,ptr:[o],source:t,parent:r,visited:[t]})));n.length;){let o=n.pop(),s=e.find(a=>SS(a,o.ptr));if(s)i.push(s.redactionName);else{let a=o.source[o.key];a===null?o.parent[o.key]=a:Array.isArray(a)?o.parent[o.key]=[...a]:typeof a=="object"?o.visited.includes(a)||(o.parent[o.key]={},n.push(...Object.keys(a).map(c=>({key:c,ptr:[...o.ptr,c],source:a,parent:o.parent[o.key],visited:[...o.visited,a]})))):o.parent[o.key]=a}}return{cloned:r,excluded:i.sort()}}var IS=class{constructor(t,e){this.Ke=t,this.Ge=e}filter(t,e=!1){let n=t.getContexts();if(n.length===1)return this.ne(t,n[0][1],n[0][0],e);let r={kind:"multi"};return n.forEach(([i,o])=>{r[i]=this.ne(t,o,i,e)}),r}We(t,e,n,r){return(r?Object.keys(e).map(i=>new Nn(i,!0)):[...this.Ge,...t.privateAttributes(n)]).filter(i=>!bS.some(o=>o.compare(i)))}ne(t,e,n,r){let i=this.Ke||r&&e.anonymous===!0,{cloned:o,excluded:s}=wS(e,this.We(t,e,n,i));return t.legacy&&vS.forEach(a=>{a in o&&(o[a]=String(o[a]))}),s.length&&(o._meta||(o._meta={}),o._meta.redactedAttributes=s),o._meta&&(delete o._meta.privateAttributes,Object.keys(o._meta).length===0&&delete o._meta),o}},Bh=30*1e3,TS=.5,ES=class{constructor(t,e,n=Math.random){this.Ds=e,this.Je=n,this.Dt=0,this.re=Math.max(1,t),this.qe=Math.ceil(Math.log2(Bh/this.re))}A(){let t=Math.min(this.Dt,this.qe),e=this.re*2**t;return Math.min(e,Bh)}Ye(t){return t-Math.trunc(this.Je()*TS*t)}success(t=Date.now()){this.bt=t}fail(t=Date.now()){this.bt!==void 0&&t-this.bt>this.Ds&&(this.Dt=0),this.bt=void 0;let e=this.Ye(this.A());return this.Dt+=1,e}},jh;(function(t){t[t.Valid=0]="Valid",t[t.Initializing=1]="Initializing",t[t.Interrupted=2]="Interrupted",t[t.Closed=3]="Closed"})(jh||(jh={}));var Ai=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.status=n,this.name="LaunchDarklyPollingError",this.recoverable=r}},Wa=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.code=n,this.name="LaunchDarklyStreamingError",this.recoverable=r}},BF=120*1e3,jF=300*1e3,_t;(function(t){t.Unknown="UNKNOWN",t.NetworkError="NETWORK_ERROR",t.ErrorResponse="ERROR_RESPONSE",t.InvalidData="INVALID_DATA"})(_t||(_t={}));var Ji;(function(t){t[t.Disabled=0]="Disabled",t[t.Enabled=1]="Enabled"})(Ji||(Ji={}));var On;(function(t){t[t.AnalyticsEvents=0]="AnalyticsEvents",t[t.DiagnosticEvent=1]="DiagnosticEvent"})(On||(On={}));var en;(function(t){t[t.Succeeded=0]="Succeeded",t[t.Failed=1]="Failed",t[t.FailedAndMustShutDown=2]="FailedAndMustShutDown"})(en||(en={}));function Vn(t){if(typeof t=="string")return t;if(t===void 0)return"undefined";if(t===null)return"null";if(Object.prototype.hasOwnProperty.call(t,"toString"))try{return t.toString()}catch(e){}if(typeof t=="bigint")return`${t}n`;try{return JSON.stringify(t)}catch(e){return e instanceof TypeError&&e.message.indexOf("circular")>=0?"[Circular]":"[Not Stringifiable]"}}function RS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(Number(t))}function CS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(parseInt(t,10))}function ZS(t){return typeof t=="symbol"?"NaN":String(parseFloat(t))}var Za={s:t=>Vn(t),d:t=>RS(t),i:t=>CS(t),f:t=>ZS(t),j:t=>Vn(t),o:t=>Vn(t),O:t=>Vn(t),c:()=>""};function Ua(...t){var e;let n=t.shift();if(G.String.is(n)){let r="",i=0;for(;i<n.length;){let o=n.charAt(i);if(o==="%"){if(i+1<n.length){let s=n.charAt(i+1);if(s in Za&&t.length){let a=t.shift();r+=(e=Za[s])==null?void 0:e.call(Za,a)}else s==="%"?r+="%":r+=`%${s}`;i+=2}}else r+=o,i+=1}return t.length&&(r.length&&(r+=" "),r+=t.map(Vn).join(" ")),r}return t.map(Vn).join(" ")}var Vt;(function(t){t[t.debug=0]="debug",t[t.info=1]="info",t[t.warn=2]="warn",t[t.error=3]="error",t[t.none=4]="none"})(Vt||(Vt={}));var kS=["debug","info","warn","error","none"],Fa=class Ep{static get(){return new Ep({})}constructor(e){var n,r,i;if(this.ni=(r=Vt[(n=e.level)!=null?n:"info"])!=null?r:Vt.info,this.ri=(i=e.name)!=null?i:"LaunchDarkly",this.ue=e.formatter,typeof e.destination=="object")this.he={[Vt.debug]:e.destination.debug,[Vt.info]:e.destination.info,[Vt.warn]:e.destination.warn,[Vt.error]:e.destination.error};else if(typeof e.destination=="function"){let{destination:o}=e;this.he={[Vt.debug]:o,[Vt.info]:o,[Vt.warn]:o,[Vt.error]:o}}}ai(...e){var n;try{return this.ue?(n=this.ue)==null?void 0:n.call(this,...e):Ua(...e)}catch(r){return Ua(...e)}}oi(e,n){try{e(n)}catch(r){console.error(n)}}x(e,n){var r;if(e>=this.ni){let i=`${kS[e]}: [${this.ri}]`;try{let o=(r=this.he)==null?void 0:r[e];o?this.oi(o,`${i} ${this.ai(...n)}`):console.error(...n)}catch(o){console.error(...n)}}}error(...e){this.x(Vt.error,e)}warn(...e){this.x(Vt.warn,e)}info(...e){this.x(Vt.info,e)}debug(...e){this.x(Vt.debug,e)}},VS={error:G.Function,warn:G.Function,info:G.Function,debug:G.Function},Rp=class{constructor(t,e){Object.entries(VS).forEach(([n,r])=>{if(!r.is(t[n]))throw new Error(`Provided logger instance must support logger.${n}(...) method`)}),this.t=t,this.ci=e}x(t,e){try{this.t[t](...e)}catch(n){this.ci[t](...e)}}error(...t){this.x("error",t)}warn(...t){this.x("warn",t)}info(...t){this.x("info",t)}debug(...t){this.x("debug",t)}},Cp=t=>{let e=new Fa({level:"info",destination:console.error,formatter:Ua});return t?new Rp(t,e):e},Ue=class{static deprecated(t,e){return`"${t}" is deprecated, please use "${e}"`}static optionBelowMinimum(t,e,n){return`Config option "${t}" had invalid value of ${e}, using minimum of ${n} instead`}static unknownOption(t){return`Ignoring unknown config option "${t}"`}static wrongOptionType(t,e,n){return`Config option "${t}" should be of type ${e}, got ${n}, using default value`}static wrongOptionTypeBoolean(t,e){return`Config option "${t}" should be a boolean, got ${e}, converting to boolean`}static invalidTagValue(t){return`Config option "${t}" must only contain letters, numbers, ., _ or -.`}static tagValueTooLong(t){return`Value of "${t}" was longer than 64 characters and was discarded.`}static partialEndpoint(t){return`You have set custom uris without specifying the ${t} URI; connections may not work properly`}},xS=/^(\w|\.|-)+$/,NS=G.stringMatchingRegex(xS),OS={is:(t,e)=>NS.is(t)?t.length>64?{valid:!1,message:Ue.tagValueTooLong(e)}:{valid:!0}:{valid:!1,message:Ue.invalidTagValue(e)}},GS=class{constructor(t){let e={},n=t==null?void 0:t.application,r=t==null?void 0:t.logger;n&&Object.entries(n).forEach(([o,s])=>{if(s!=null){let{valid:a,message:c}=OS.is(s,`application.${o}`);a?o==="versionName"?e["application-version-name"]=[s]:e[`application-${o}`]=[s]:r==null||r.warn(c)}});let i=Object.keys(e);i.length&&(this.value=i.sort().flatMap(o=>e[o].sort().map(s=>`${o}/${s}`)).join(" "))}},LS=class{constructor(t,e,n){this.platform=n,this.basicConfiguration={tags:e.tags,logger:e.logger,offline:e.offline,serviceEndpoints:e.serviceEndpoints,sdkKey:t}}};function ka(t){return t.replace(/\/+$/,"")}function Aa(t){return t.replace(/^\/+/,"").replace(/\?$/,"")}var Di=class Zp{constructor(e,n,r=Zp.DEFAULT_EVENTS,i="/bulk",o="/diagnostic",s=!0,a){this.streaming=ka(e),this.polling=ka(n),this.events=ka(r),this.analyticsEventPath=i,this.diagnosticEventPath=o,this.includeAuthorizationHeader=s,this.payloadFilterKey=a}};Di.DEFAULT_EVENTS="https://events.launchdarkly.com";function Ja(t,e=[]){if(e.length===0)return t;let n=e.map(({key:r,value:i})=>`${r}=${i}`);return`${t}?${n.join("&")}`}function XS(t,e,n){let r=Aa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Ja(`${t.streaming}/${r}`,i)}function WS(t,e,n=[]){let r=Aa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Ja(`${t.polling}/${r}`,i)}function Qh(t,e,n=[]){let r=Aa(e);return Ja(`${t.events}/${r}`,n)}var kp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyUnexpectedResponseError"}},US=class extends Error{constructor(t){super(t),this.name="LaunchDarklyClientError"}},Vp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyTimeoutError"}};function _i(t){return t>=400&&t<500?t===400||t===408||t===429:!0}function MS(t){return t===413?!0:_i(t)}function PS(t,e){let n,r;return{promise:new Promise((i,o)=>{r=i,n=setTimeout(()=>{let s=`${e} timed out after ${t} seconds.`;o(new Vp(s))},t*1e3)}),cancel:()=>{r(),clearTimeout(n)}}}function xp(t){return t==null?t:JSON.parse(JSON.stringify(t))}function Va(t){return Math.trunc(t*1e3)}var FS=t=>JSON.stringify(t)==="{}",Da=(t,e)=>t&&Object.entries(t).reduce((n,[r,i])=>(i&&!FS(i)&&!(e!=null&&e.includes(r))&&(n[r]=typeof i=="object"?Da(i,e):i),n),{});function Ui(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!Ui(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!Ui(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){var o=i[r];if(!Ui(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function AS(t,e,n,r=!0,i="user-agent"){let{userAgentBase:o,version:s,wrapperName:a,wrapperVersion:c}=e.sdkData(),l={[i]:`${o!=null?o:"NodeJSClient"}/${s}`};return r&&(l.authorization=t),a&&(l["x-launchdarkly-wrapper"]=c?`${a}/${c}`:a),n!=null&&n.value&&(l["x-launchdarkly-tags"]=n.value),l}function Gn(t,e,n){let r;t.status?r=`error ${t.status}${t.status===401?" (invalid SDK key)":""}`:r=`I/O error (${t.message||"unknown error"})`;let i=n!=null?n:"giving up permanently";return`Received ${r} for ${e} - ${i}`}function Np({status:t}){return t?_i(t):!0}var $h=(t,e)=>e.btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),Op=async(t=1e3)=>new Promise(e=>{setTimeout(e,t)}),JS=class{constructor(t,e,n){this.g=e,this.li=n,this.St=[],this.de=Date.now(),this.fe=this.de,this.ge={diagnosticId:e.crypto.randomUUID(),sdkKeySuffix:t.length>6?t.substring(t.length-6):t}}createInitEvent(){var t,e,n;let r=this.g.info.sdkData(),i=this.g.info.platformData();return{kind:"diagnostic-init",id:this.ge,creationDate:this.de,sdk:r,configuration:this.li,platform:at({name:i.name,osArch:(t=i.os)==null?void 0:t.arch,osName:(e=i.os)==null?void 0:e.name,osVersion:(n=i.os)==null?void 0:n.version},i.additional||{})}}recordStreamInit(t,e,n){let r={timestamp:t,failed:e,durationMillis:n};this.St.push(r)}createStatsEventAndReset(t,e,n){let r=Date.now(),i={kind:"diagnostic",id:this.ge,creationDate:r,dataSinceDate:this.fe,droppedEvents:t,deduplicatedUsers:e,eventsInLastBatch:n,streamInits:this.St};return this.St=[],this.fe=r,i}},Ma;(function(t){t.MalformedFlag="MALFORMED_FLAG",t.UserNotSpecified="USER_NOT_SPECIFIED",t.FlagNotFound="FLAG_NOT_FOUND",t.ClientNotReady="CLIENT_NOT_READY",t.WrongType="WRONG_TYPE"})(Ma||(Ma={}));var DS=Ma,Gp=class{static invalidMetricValue(t){return`The track function was called with a non-numeric "metricValue" (${t}), only numeric metric values are supported.`}};Gp.MissingContextKeyNoEvent="Context was unspecified or had no key; event will not be sent";var YS=class{constructor(t,e){let{basicConfiguration:n,platform:r}=t,{serviceEndpoints:{analyticsEventPath:i,diagnosticEventPath:o}}=n,{crypto:s,requests:a}=r;this.ui=at({},e),this.pe=Qh(n.serviceEndpoints,i,[]),this.hi=Qh(n.serviceEndpoints,o,[]),this.T=a,this.di=s}async nt(t,e,n,r){let i={status:en.Succeeded},o=me(at({},this.ui),{"content-type":"application/json"});n&&(o["x-launchdarkly-payload-id"]=n,o["x-launchDarkly-event-schema"]="4");let s;try{let{status:a,headers:c}=await this.T.fetch(e,{headers:o,body:JSON.stringify(t),compressBodyIfPossible:!0,method:"POST",keepalive:!0}),l=Date.parse(c.get("date")||"");if(l&&(i.serverTime=l),a<=204)return i;if(s=new kp(Gn({status:a,message:"some events were dropped"},"event posting")),!_i(a))return MS(a)?i.status=en.Failed:i.status=en.FailedAndMustShutDown,i.error=s,i}catch(a){s=a}return s&&!r?(i.status=en.Failed,i.error=s,i):(await Op(),this.nt(t,this.pe,n,!1))}async sendEventData(t,e){let n=t===On.AnalyticsEvents?this.di.randomUUID():void 0,r=t===On.AnalyticsEvents?this.pe:this.hi;return this.nt(e,r,n,!0)}};function Yi(t){return t.kind==="feature"}function KS(t){return t.kind==="identify"}function _S(t){return t.kind==="migration_op"}var HS=class{constructor(t,e,n,r,i,o){this.count=t,this.key=e,this.value=n,this.version=i,this.variation=o,this.default=r}increment(){this.count+=1}};function zS(t){return`${t.key}:${t.variation!==null&&t.variation!==void 0?t.variation:""}:${t.version!==null&&t.version!==void 0?t.version:""}`}var Lp=class{constructor(t=!1,e){this.fi=t,this.S=e,this.Y=0,this.rt=0,this.at={},this.ot={}}summarizeEvent(t){if(Yi(t)&&!t.excludeFromSummaries){this.y||(this.y=t.context);let e=zS(t),n=this.at[e],r=this.ot[t.key];r||(r=new Set,this.ot[t.key]=r),t.context.kinds.forEach(i=>r.add(i)),n?n.increment():this.at[e]=new HS(1,t.key,t.value,t.default,t.version,t.variation),(this.Y===0||t.creationDate<this.Y)&&(this.Y=t.creationDate),t.creationDate>this.rt&&(this.rt=t.creationDate)}}getSummary(){var t;let e=Object.values(this.at).reduce((r,i)=>{let o=r[i.key];o||(o={default:i.default,counters:[],contextKinds:[...this.ot[i.key]]},r[i.key]=o);let s={value:i.value,count:i.count};return i.variation!==void 0&&i.variation!==null&&(s.variation=i.variation),i.version!==void 0&&i.version!==null?s.version=i.version:s.unknown=!0,o.counters.push(s),r},{}),n={startDate:this.Y,endDate:this.rt,features:e,kind:"summary",context:this.y!==void 0&&this.fi?(t=this.S)==null?void 0:t.filter(this.y):void 0};return this.gi(),n}gi(){this.Y=0,this.rt=0,this.at={},this.ot={}}},BS=class extends Error{constructor(t){super(t),this.name="LaunchDarklyInvalidSDKKeyError"}},jS=class{constructor(t,e){this.S=t,this.t=e,this.Z={}}summarizeEvent(t){var e;if(Yi(t)){let n=t.context.canonicalUnfilteredJson();if(!n){t.context.valid&&((e=this.t)==null||e.error("Unable to serialize context, likely the context contains a cycle."));return}let r=this.Z[n];r||(this.Z[n]=new Lp(!0,this.S),r=this.Z[n]),r.summarizeEvent(t)}}getSummaries(){let t=this.Z;return this.Z={},Object.values(t).map(e=>e.getSummary())}};function Mi(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}function QS(t){return t.getSummaries!==void 0}var $S=class{constructor(t,e,n,r,i,o=!0,s=!1){this.e=t,this.ct=r,this.L=i,this.lt=[],this.me=0,this.Lt=0,this.Ct=0,this.It=!1,this.ye=0,this.At=!1,this.Pt=null,this.pi=t.eventsCapacity,this.t=e.basicConfiguration.logger,this.ve=new YS(e,n),this.S=new IS(t.allAttributesPrivate,t.privateAttributes.map(a=>new Nn(a))),s?this.X=new jS(this.S,this.t):this.X=new Lp,o&&this.start()}start(){var t,e;if(((t=this.ct)==null?void 0:t.flushInterval)!==void 0&&(this.Pt=setInterval(()=>{var n;(n=this.ct)==null||n.flush()},this.ct.flushInterval*1e3)),this.mi=setInterval(async()=>{var n;try{await this.flush()}catch(r){(n=this.t)==null||n.debug(`Flush failed: ${r}`)}},this.e.flushInterval*1e3),this.L){let n=this.L.createInitEvent();this.we(n),this.Ee=setInterval(()=>{let r=this.L.createStatsEventAndReset(this.Lt,this.Ct,this.ye);this.Lt=0,this.Ct=0,this.we(r)},this.e.diagnosticRecordingInterval*1e3)}(e=this.t)==null||e.debug("Started EventProcessor.")}we(t){this.ve.sendEventData(On.DiagnosticEvent,t)}close(){clearInterval(this.mi),this.Pt&&clearInterval(this.Pt),this.Ee&&clearInterval(this.Ee)}async flush(){var t;if(this.At)throw new BS("Events cannot be posted because a permanent error has been encountered. This is most likely an invalid SDK key. The specific error information is logged independently.");let e=this.lt;if(this.lt=[],QS(this.X))this.X.getSummaries().forEach(n=>{Object.keys(n.features).length&&e.push(n)});else{let n=this.X.getSummary();Object.keys(n.features).length&&e.push(n)}e.length&&(this.ye=e.length,(t=this.t)==null||t.debug("Flushing %d events",e.length),await this.nt(e))}sendEvent(t){var e;if(this.At)return;if(_S(t)){if(Mi(t.samplingRatio)){let a=me(at({},t),{context:t.context?this.S.filter(t.context):void 0});a.samplingRatio===1&&delete a.samplingRatio,this.ut(a)}return}this.X.summarizeEvent(t);let n=Yi(t),r=n&&t.trackEvents||!n,i=this.yi(t),o=KS(t),s=(e=this.ct)==null?void 0:e.processContext(t.context);s||o||(this.Ct+=1),s&&!o&&this.ut(this.Ot({kind:"index",creationDate:t.creationDate,context:t.context,samplingRatio:1},!1)),r&&Mi(t.samplingRatio)&&this.ut(this.Ot(t,!1)),i&&Mi(t.samplingRatio)&&this.ut(this.Ot(t,!0))}Ot(t,e){switch(t.kind){case"feature":{let n={kind:e?"debug":"feature",creationDate:t.creationDate,context:this.S.filter(t.context,!e),key:t.key,value:t.value,default:t.default};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.prereqOf&&(n.prereqOf=t.prereqOf),t.variation!==void 0&&(n.variation=t.variation),t.version!==void 0&&(n.version=t.version),t.reason&&(n.reason=t.reason),n}case"index":case"identify":{let n={kind:t.kind,creationDate:t.creationDate,context:this.S.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),n}case"custom":{let n={kind:"custom",creationDate:t.creationDate,key:t.key,context:this.S.filter(t.context)};return t.samplingRatio!==1&&(n.samplingRatio=t.samplingRatio),t.data!==void 0&&(n.data=t.data),t.metricValue!==void 0&&(n.metricValue=t.metricValue),t.url!==void 0&&(n.url=t.url),n}case"click":return{kind:"click",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url,selector:t.selector};case"pageview":return{kind:"pageview",creationDate:t.creationDate,contextKeys:t.context.kindsAndKeys,key:t.key,url:t.url};default:return t}}ut(t){var e;this.lt.length<this.pi?(this.lt.push(t),this.It=!1):(this.It||(this.It=!0,(e=this.t)==null||e.warn("Exceeded event queue capacity. Increase capacity to avoid dropping events.")),this.Lt+=1)}yi(t){return Yi(t)&&t.debugEventsUntilDate&&t.debugEventsUntilDate>this.me&&t.debugEventsUntilDate>Date.now()}async nt(t){let e=await this.ve.sendEventData(On.AnalyticsEvents,t);if(e.status===en.FailedAndMustShutDown&&(this.At=!0),e.serverTime&&(this.me=e.serverTime),e.error)throw e.error}},Xp=class{constructor(t,e,n,r,i=1,o){this.context=t,this.key=e,this.data=n,this.metricValue=r,this.samplingRatio=i,this.url=o,this.kind="custom",this.creationDate=Date.now(),this.context=t}},Pa=class{constructor(t,e,n,r,i,o,s,a,c,l,u,h,p=1){this.withReasons=t,this.context=e,this.key=n,this.samplingRatio=p,this.kind="feature",this.creationDate=Date.now(),this.value=r,this.default=i,o!==void 0&&(this.version=o),s!==void 0&&(this.variation=s),a!==void 0&&(this.trackEvents=a),c!==void 0&&(this.prereqOf=c),l!==void 0&&(this.reason=l),u!==void 0&&(this.debugEventsUntilDate=u),h!==void 0&&(this.excludeFromSummaries=h)}},Wp=class{constructor(t,e=1){this.context=t,this.samplingRatio=e,this.kind="identify",this.creationDate=Date.now()}},qS=class{close(){}async flush(){}sendEvent(){}},tw=class{constructor(t){this.Tt=t}evalEvent(t){var e;return new Pa(this.Tt,t.context,t.flagKey,t.value,t.defaultVal,t.version,(e=t.variation)!=null?e:void 0,t.trackEvents||t.addExperimentData,t.prereqOfFlagKey,this.Tt||t.addExperimentData?t.reason:void 0,t.debugEventsUntilDate,t.excludeFromSummaries,t.samplingRatio)}unknownFlagEvent(t,e,n){return new Pa(this.Tt,n,t,e,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}identifyEvent(t){return new Wp(t,1)}customEvent(t,e,n,r,i=1){return new Xp(e,t,n!=null?n:void 0,r!=null?r:void 0,i)}},qh="FDv1Fallback";function ew(t){return{vi:t,De:"",useSelector(e){return this.De=e,this},processFullTransfer(e){let n=[{event:"server-intent",data:{payloads:[{id:qh,target:1,intentCode:"xfer-full",reason:"payload-missing"}]}}];Object.entries((e==null?void 0:e.flags)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"flag",key:r,version:i.version||1,object:i}})}),Object.entries((e==null?void 0:e.segments)||[]).forEach(([r,i])=>{n.push({event:"put-object",data:{kind:"segment",key:r,version:i.version||1,object:i}})}),n.push({event:"payload-transferred",data:{state:this.De,version:1,id:qh}}),this.vi.processEvents(n)}}}var Up=class{constructor(t,e,n){this.wi=t,this.m=e,this.t=n,this.n=[],this.M=void 0,this.z=!1,this.B=[],this.Ei=r=>{var i;if(this.$t(),!r.payloads.length)return;let o=r.payloads[0];switch(o==null?void 0:o.intentCode){case"xfer-full":this.z=!0;break;case"xfer-changes":this.z=!1;break;case"none":this.z=!1,this.Di(o);break;default:(i=this.t)==null||i.warn(`Unable to process intent code '${o==null?void 0:o.intentCode}'.`);return}this.M=o==null?void 0:o.id},this.bi=r=>{var i;if(!this.M||!r.kind||!r.key||!r.version||!r.object)return;let o=this.ki(r.kind,r.object);if(!o){(i=this.t)==null||i.warn(`Unable to process object for kind: '${r.kind}'`);return}this.B.push({kind:r.kind,key:r.key,version:r.version,object:o})},this.xi=r=>{!this.M||!r.kind||!r.key||!r.version||this.B.push({kind:r.kind,key:r.key,version:r.version,deleted:!0})},this.Di=r=>{if(!r.id||!r.target)return;let i={id:r.id,version:r.target,basis:!1,updates:[]};this.n.forEach(o=>o(i)),this.be()},this.Si=r=>{if(!this.M||r.state===null||r.state===void 0||!r.version){this.$t();return}let i={id:this.M,version:r.version,state:r.state,basis:this.z,updates:this.B};this.n.forEach(o=>o(i)),this.be()},this.Li=r=>{var i;(i=this.t)==null||i.info(`Goodbye was received from the LaunchDarkly connection with reason: ${r.reason}.`),this.$t()},this.Ci=r=>{var i;(i=this.t)==null||i.info(`An issue was encountered receiving updates for payload ${this.M} with reason: ${r.reason}.`),this.Ii()}}addPayloadListener(t){this.n.push(t)}removePayloadListener(t){let e=this.n.indexOf(t,0);e>-1&&this.n.splice(e,1)}processEvents(t){t.forEach(e=>{switch(e.event){case"server-intent":{this.Ei(e.data);break}case"put-object":{this.bi(e.data);break}case"delete-object":{this.xi(e.data);break}case"payload-transferred":{this.Si(e.data);break}case"goodbye":{this.Li(e.data);break}case"error":{this.Ci(e.data);break}}})}ki(t,e){var n,r;return(r=(n=this.wi)[t])==null?void 0:r.call(n,e)}be(){this.z=!1,this.B=[]}Ii(){this.B=[]}$t(){this.M=void 0,this.z=!1,this.B=[]}},nw=class{constructor(t,e,n,r){this.m=n,this.t=r,this.K(t,"server-intent"),this.K(t,"put-object"),this.K(t,"delete-object"),this.K(t,"payload-transferred"),this.K(t,"goodbye"),this.K(t,"error"),this.Nt=new Up(e,n,r)}addPayloadListener(t){this.Nt.addPayloadListener(t)}removePayloadListener(t){this.Nt.removePayloadListener(t)}K(t,e){t.addEventListener(e,async n=>{var r,i,o,s,a;if(n!=null&&n.data){(r=this.t)==null||r.debug(`Received ${e} event. Data is ${n.data}`);try{this.Nt.processEvents([{event:e,data:JSON.parse(n.data)}])}catch(c){(i=this.t)==null||i.error(`Stream received data that was unable to be processed in "${e}" message`),(o=this.t)==null||o.debug(`Data follows: ${n.data}`),(s=this.m)==null||s.call(this,_t.InvalidData,"Malformed data in EventStream.")}}else(a=this.m)==null||a.call(this,_t.Unknown,"Event from EventStream missing data.")})}};function rw(t){if(t){let e=Object.keys(t).find(n=>n.toLowerCase()==="x-ld-envid");if(e)return{environmentId:t[e]}}}var tp="unknown plugin";function Ki(t,e){try{return e.getMetadata().name||tp}catch(n){return t.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),tp}}function iw(t,e,n){let r=[];return n.forEach(i=>{var o;try{let s=(o=i.getHooks)==null?void 0:o.call(i,e);s===void 0?t.error(`Plugin ${Ki(t,i)} returned undefined from getHooks.`):s&&s.length>0&&r.push(...s)}catch(s){t.error(`Exception thrown getting hooks for plugin ${Ki(t,i)}. Unable to get hooks.`)}}),r}function ow(t,e,n,r){r.forEach(i=>{try{i.register(n,e)}catch(o){t.error(`Exception thrown registering plugin ${Ki(t,i)}.`)}})}var de=Object.freeze({__proto__:null,ClientMessages:Gp,DiagnosticsManager:JS,ErrorKinds:DS,EventFactoryBase:tw,EventProcessor:$S,FDv1PayloadAdaptor:ew,InputCustomEvent:Xp,InputEvalEvent:Pa,InputIdentifyEvent:Wp,NullEventProcessor:qS,PayloadProcessor:Up,PayloadStreamReader:nw,canonicalize:Fi,initMetadataFromHeaders:rw,isLegacyUser:Tp,isMultiKind:Ip,isSingleKind:wp,safeGetHooks:iw,safeGetName:Ki,safeRegisterPlugins:ow,shouldSample:Mi}),Kt;(function(t){t.Initializing="INITIALIZING",t.Valid="VALID",t.Interrupted="INTERRUPTED",t.SetOffline="SET_OFFLINE",t.Closed="CLOSED"})(Kt||(Kt={}));function sw(t){return t>=200&&t<=299}var ep=class extends Error{constructor(t,e){super(t),this.status=e,this.name="LaunchDarklyRequestError"}},aw=class{constructor(t,e,n,r,i){this.T=t,this.Ai=e,this.ht=n,this.Pi=r,this.Oi=i}async requestPayload(){let t;try{let e=await this.T.fetch(this.Ai,{method:this.Pi,headers:this.ht,body:this.Oi});if(sw(e.status))return await e.text();t=e.status}catch(e){throw new ep(e==null?void 0:e.message)}throw new ep(`Unexpected status code: ${t}`,t)}};function np(t,e,n,r,i,o,s,a,c,l){let u,h="GET",p=at({},o);c&&(h="REPORT",p["content-type"]="application/json",u=t);let f=c?n.pathReport(i,t):n.pathGet(i,t),m=[...s!=null?s:[]];a&&m.push({key:"withReasons",value:"true"}),l&&m.push({key:"h",value:l});let d=WS(e,f,m);return new aw(r,d,p,h,u)}var rp=new Error("Task has already been executed or shed. This is likely an implementation error. The task will not be executed again.");function lw(t,e,n=!1){let r,i=new Promise(a=>{r=(c,l)=>{var u;try{(u=t.after)==null||u.call(t,c,l)}catch(h){e==null||e.error(`Error in after callback: ${h}`)}a(c)}}),o=t.before?t.before():Promise.resolve(void 0),s=!1;return{execute:()=>{s&&(e==null||e.error(rp)),s=!0,o.then(a=>{t.execute(a).then(c=>r({status:"complete",result:c},a)).catch(c=>r({status:"error",error:c},a))}).catch(a=>{e==null||e.error(a),r({status:"error",error:a},void 0)})},shed:()=>{s&&(e==null||e.error(rp)),s=!0,o.then(a=>{r({status:"shed"},a)})},promise:i,sheddable:n}}function cw(t){let e,n=[];function r(){if(!e&&n.length>0){let i=n.shift();e=i.promise.finally(()=>{e=void 0,r()}),i.execute()}}return{execute(i,o=!1){var s,a;let c=lw(i,t,o);return e?((s=n[n.length-1])!=null&&s.sheddable&&((a=n.pop())==null||a.shed()),n.push(c)):(e=c.promise.finally(()=>{e=void 0,r()}),c.execute()),c.promise},pendingCount(){return n.length}}}var uw={logger:G.Object,maxCachedContexts:G.numberWithMin(0),baseUri:G.String,streamUri:G.String,eventsUri:G.String,capacity:G.numberWithMin(1),diagnosticRecordingInterval:G.numberWithMin(2),flushInterval:G.numberWithMin(2),streamInitialReconnectDelay:G.numberWithMin(0),allAttributesPrivate:G.Boolean,debug:G.Boolean,diagnosticOptOut:G.Boolean,withReasons:G.Boolean,sendEvents:G.Boolean,pollInterval:G.numberWithMin(30),useReport:G.Boolean,privateAttributes:G.StringArray,applicationInfo:G.Object,wrapperName:G.String,wrapperVersion:G.String,payloadFilterKey:G.stringMatchingRegex(/^[a-zA-Z0-9](\w|\.|-)*$/),hooks:G.createTypeArray("Hook[]",{}),inspectors:G.createTypeArray("LDInspection",{}),cleanOldPersistentData:G.Boolean},hw=300,Mp="https://clientsdk.launchdarkly.com",Pp="https://clientstream.launchdarkly.com";function pw(t){return t instanceof Rp?t:Cp(t)}var dw=class{constructor(t={},e={getImplementationHooks:()=>[],credentialType:"mobileKey"}){var n,r,i;this.logger=Cp(),this.baseUri=Mp,this.eventsUri=Di.DEFAULT_EVENTS,this.streamUri=Pp,this.maxCachedContexts=5,this.capacity=100,this.diagnosticRecordingInterval=900,this.flushInterval=30,this.streamInitialReconnectDelay=1,this.allAttributesPrivate=!1,this.debug=!1,this.diagnosticOptOut=!1,this.sendEvents=!0,this.sendLDHeaders=!0,this.useReport=!1,this.withReasons=!1,this.privateAttributes=[],this.pollInterval=hw,this.hooks=[],this.inspectors=[],this.logger=pw(t.logger),this.Ti(t).forEach(o=>this.logger.warn(o)),this.serviceEndpoints=new Di(this.streamUri,this.baseUri,this.eventsUri,e.analyticsEventPath,e.diagnosticEventPath,e.includeAuthorizationHeader,t.payloadFilterKey),this.useReport=(n=t.useReport)!=null?n:!1,this.tags=new GS({application:this.applicationInfo,logger:this.logger}),this.userAgentHeaderName=(r=e.userAgentHeaderName)!=null?r:"user-agent",this.trackEventModifier=(i=e.trackEventModifier)!=null?i:(o=>o),this.credentialType=e.credentialType,this.getImplementationHooks=e.getImplementationHooks}Ti(t){let e=[];return Object.entries(t).forEach(([n,r])=>{let i=uw[n];if(i)if(i.is(r))n==="logger"||(this[n]=r!=null?r:void 0);else{let o=i.getType();if(o==="boolean")e.push(Ue.wrongOptionTypeBoolean(n,typeof r)),this[n]=!!r;else if(o==="boolean | undefined | null")e.push(Ue.wrongOptionTypeBoolean(n,typeof r)),typeof r!="boolean"&&typeof r!="undefined"&&r!==null&&(this[n]=!!r);else if(i instanceof vp&&G.Number.is(r)){let{min:s}=i;e.push(Ue.optionBelowMinimum(n,r,s)),this[n]=s}else e.push(Ue.wrongOptionType(n,i.getType(),typeof r))}else e.push(Ue.unknownOption(n))}),e}};async function Fp(t,e){if(t.digest)return t.digest(e);if(t.asyncDigest)return t.asyncDigest(e);throw new Error("Platform must implement digest or asyncDigest")}var Ap=async(t,{crypto:e,storage:n})=>{let r=await(n==null?void 0:n.get(t));return r||(r=e.randomUUID(),await(n==null?void 0:n.set(t,r))),r};function Jp(t){return async e=>Fp(t.createHash("sha256").update(e),"base64")}var fe=async t=>t;async function gr(t){return(await Promise.all(t.map(e=>e.transform(e.value)))).join("_")}async function fw(t,e){return gr([{value:"LaunchDarkly",transform:fe},{value:e,transform:Jp(t)}])}async function mw(t){return gr([{value:"LaunchDarkly",transform:fe},{value:"AnonymousKeys",transform:fe},{value:t,transform:fe}])}async function yw(t){return gr([{value:"LaunchDarkly",transform:fe},{value:"ContextKeys",transform:fe},{value:t,transform:fe}])}async function gw(t){return gr([{value:t,transform:fe},{value:"ContextIndex",transform:fe}])}async function ip(t,e,n){return gr([{value:e,transform:fe},{value:n.canonicalKey,transform:Jp(t)}])}var{isLegacyUser:bw,isSingleKind:xa,isMultiKind:op}=de,Dp="1.0",vw=t=>{let e=t,{kind:n}=e,r=yp(e,["kind"]);return{kind:"multi",[n]:r}},Sw=async({crypto:t,info:e},{applicationInfo:n})=>{var r;let{ld_application:i}=e.platformData(),o=(r=Da(i))!=null?r:{},s=(n==null?void 0:n.id)||(o==null?void 0:o.id);if(s){let a=(n==null?void 0:n.version)||(o==null?void 0:o.version),c=(n==null?void 0:n.name)||(o==null?void 0:o.name),l=(n==null?void 0:n.versionName)||(o==null?void 0:o.versionName);return o=at(at(at(me(at({},o),{id:s}),a?{version:a}:{}),c?{name:c}:{}),l?{versionName:l}:{}),o.key=await Fp(t.createHash("sha256").update(s),"base64"),o.envAttributesVersion=o.envAttributesVersion||Dp,o}},ww=async t=>{var e,n,r,i;let{ld_device:o,os:s}=t.info.platformData(),a=(e=Da(o))!=null?e:{},c=(s==null?void 0:s.name)||((n=a.os)==null?void 0:n.name),l=(s==null?void 0:s.version)||((r=a.os)==null?void 0:r.version),u=(i=a.os)==null?void 0:i.family;if((c||l||u)&&(a.os=at(at(at({},c?{name:c}:{}),l?{version:l}:{}),u?{family:u}:{})),Object.keys(a).filter(h=>h!=="key"&&h!=="envAttributesVersion").length){let h=await yw("ld_device");return a.key=await Ap(h,t),a.envAttributesVersion=a.envAttributesVersion||Dp,a}},Iw=async(t,e,n)=>{if(bw(t))return t;let r,i;if(xa(t)&&t.kind!=="ld_application"||op(t)&&!t.ld_application?r=await Sw(e,n):n.logger.warn("Not adding ld_application environment attributes because it already exists."),xa(t)&&t.kind!=="ld_device"||op(t)&&!t.ld_device?i=await ww(e):n.logger.warn("Not adding ld_device environment attributes because it already exists."),r||i){let o=xa(t)?vw(t):t;return at(at(at({},o),r?{ld_application:r}:{}),i?{ld_device:i}:{})}return t};function Tw(){let t,e;return{set(n,r){t=n,e=r},getContext(){return e},getUnwrappedContext(){return t},newIdentificationPromise(){let n,r;return{identifyPromise:new Promise((i,o)=>{n=i,r=o}),identifyResolve:n,identifyReject:r}},hasContext(){return e!==void 0},hasValidContext(){return this.hasContext()&&e.valid}}}var{isLegacyUser:Ew,isMultiKind:Rw,isSingleKind:Cw}=de,Ya=async(t,e,n)=>{let{anonymous:r,key:i}=e;if(r&&!i){let o=await mw(t);e.key=await Ap(o,n)}},Zw=async(t,e)=>{await Ya(t.kind,t,e)},kw=async(t,e)=>{let n=t,{kind:r}=n,i=yp(n,["kind"]);return Promise.all(Object.entries(i).map(([o,s])=>Ya(o,s,e)))},Vw=async(t,e)=>{await Ya("user",t,e)},xw=async(t,e)=>{let n=xp(t);return Cw(n)&&await Zw(n,e),Rw(n)&&await kw(n,e),Ew(n)&&await Vw(n,e),n},Nw=t=>({customBaseURI:t.serviceEndpoints.polling!==Mp,customStreamURI:t.serviceEndpoints.streaming!==Pp,customEventsURI:t.serviceEndpoints.events!==Di.DEFAULT_EVENTS,eventsCapacity:t.capacity,eventsFlushIntervalMillis:Va(t.flushInterval),reconnectTimeMillis:Va(t.streamInitialReconnectDelay),diagnosticRecordingIntervalMillis:Va(t.diagnosticRecordingInterval),allAttributesPrivate:t.allAttributesPrivate,usingSecureMode:!1,bootstrapMode:!1}),Ow=(t,e,n)=>{if(e.sendEvents&&!e.diagnosticOptOut)return new de.DiagnosticsManager(t,n,Nw(e))};function sp(t,e){return{value:e!=null?e:null,variationIndex:null,reason:{kind:"ERROR",errorKind:t}}}function ap(t,e,n){return{value:t,variationIndex:e!=null?e:null,reason:n!=null?n:null}}var Gw=(t,e,n,r,i)=>{if(e.sendEvents)return new de.EventProcessor(me(at({},e),{eventsCapacity:e.capacity}),new LS(t,e,n),r,void 0,i,!1,!0)},lp=class extends de.EventFactoryBase{evalEventClient(t,e,n,r,i,o){let{trackEvents:s,debugEventsUntilDate:a,trackReason:c,flagVersion:l,version:u,variation:h}=r;return super.evalEvent({addExperimentData:c,context:i,debugEventsUntilDate:a,defaultVal:n,flagKey:t,reason:o,trackEvents:!!s,value:e,variation:h,version:l!=null?l:u})}},Na=class Yp{constructor(){this.container={index:new Array}}static fromJson(e){let n=new Yp;try{n.container=JSON.parse(e)}catch(r){}return n}toJson(){return JSON.stringify(this.container)}notice(e,n){let r=this.container.index.find(i=>i.id===e);r===void 0?this.container.index.push({id:e,timestamp:n}):r.timestamp=n}prune(e){let n=Math.max(e,0);return this.container.index.length>n?(this.container.index.sort((r,i)=>r.timestamp-i.timestamp),this.container.index.splice(0,this.container.index.length-n)):[]}},Lw=class{constructor(t,e,n,r,i,o,s=()=>Date.now()){this.g=t,this.Rt=e,this.$i=n,this.$=r,this.w=i,this.t=o,this.dt=s,this.ke=gw(this.Rt)}async init(t,e){this.w.init(t,e),await this.xe(t)}async upsert(t,e,n){return this.w.upsert(t,e,n)?(await this.xe(t),!0):!1}async loadCached(t){var e,n,r,i;let o=await ip(this.g.crypto,this.Rt,t),s=await((e=this.g.storage)==null?void 0:e.get(o));if(s==null){if(s=await((n=this.g.storage)==null?void 0:n.get(t.canonicalKey)),s==null)return!1;await((r=this.g.storage)==null?void 0:r.set(o,s)),await((i=this.g.storage)==null?void 0:i.clear(t.canonicalKey))}try{let a=JSON.parse(s),c=Object.entries(a).reduce((l,[u,h])=>(l[u]={version:h.version,flag:h},l),{});return this.w.initCached(t,c),this.t.debug("Loaded cached flag evaluations from persistent storage"),!0}catch(a){return this.t.warn(`Could not load cached flag evaluations from persistent storage: ${a.message}`),!1}}async Ni(){var t;if(this.G!==void 0)return this.G;let e=await((t=this.g.storage)==null?void 0:t.get(await this.ke));if(!e)return this.G=new Na,this.G;try{this.G=Na.fromJson(e),this.t.debug("Loaded context index from persistent storage")}catch(n){this.t.warn(`Could not load index from persistent storage: ${n.message}`),this.G=new Na}return this.G}async xe(t){var e,n;let r=await this.Ni(),i=await ip(this.g.crypto,this.Rt,t);r.notice(i,this.dt());let o=r.prune(this.$i);await Promise.all(o.map(async l=>{var u;return(u=this.g.storage)==null?void 0:u.clear(l.id)})),await((e=this.g.storage)==null?void 0:e.set(await this.ke,r.toJson()));let s=this.$.getAll(),a=Object.entries(s).reduce((l,[u,h])=>(h.flag!==null&&h.flag!==void 0&&(l[u]=h.flag),l),{}),c=JSON.stringify(a);await((n=this.g.storage)==null?void 0:n.set(i,c))}};function Xw(){let t={};return{init(e){t=Object.entries(e).reduce((n,[r,i])=>(n[r]=i,n),{})},insertOrUpdate(e,n){t[e]=n},get(e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},getAll(){return t}}}function Ww(t,e){let n=[];return Object.entries(t).forEach(([r,i])=>{let o=e[r];(!o||!Ui(i,o))&&n.push(r)}),Object.keys(e).forEach(r=>{t[r]||n.push(r)}),n}function Uw(t,e){let n=t,r=e,i,o=new Array;return{handleFlagChanges(s,a){i?o.forEach(c=>{try{c(i,s,a)}catch(l){}}):r.warn("Received a change event without an active context. Changes will not be propagated.")},init(s,a){i=s;let c=n.getAll();n.init(a);let l=Ww(c,a);l.length>0&&this.handleFlagChanges(l,"init")},initCached(s,a){(i==null?void 0:i.canonicalKey)!==s.canonicalKey&&this.init(s,a)},upsert(s,a,c){if((i==null?void 0:i.canonicalKey)!==s.canonicalKey)return r.warn("Received an update for an inactive context."),!1;let l=n.get(a);return l!==void 0&&l.version>=c.version?!1:(n.insertOrUpdate(a,c),this.handleFlagChanges([a],"patch"),!0)},on(s){o.push(s)},off(s){let a=o.indexOf(s);a>-1&&o.splice(a,1)}}}var Mw=class{constructor(t,e,n,r,i=()=>Date.now()){this.$=Xw(),this.w=Uw(this.$,r),this.Mt=this.Ri(t,e,n,r,i)}async Ri(t,e,n,r,i=()=>Date.now()){let o=await fw(t.crypto,e);return new Lw(t,o,n,this.$,this.w,r,i)}get(t){return this.r&&Object.prototype.hasOwnProperty.call(this.r,t)?this.Ft(this.r[t]):this.$.get(t)}getAll(){return this.r?at(at({},this.$.getAll()),Object.entries(this.r).reduce((t,[e,n])=>(t[e]=this.Ft(n),t),{})):this.$.getAll()}presetFlags(t){this.$.init(t)}setBootstrap(t,e){this.w.init(t,e)}async init(t,e){return(await this.Mt).init(t,e)}async upsert(t,e,n){return(await this.Mt).upsert(t,e,n)}async loadCached(t){return(await this.Mt).loadCached(t)}on(t){this.w.on(t)}off(t){this.w.off(t)}Ft(t){return{flag:{value:t,version:0},version:0}}setOverride(t,e){this.r||(this.r={}),this.r[t]=e,this.w.handleFlagChanges([t],"override")}removeOverride(t){!this.r||!Object.prototype.hasOwnProperty.call(this.r,t)||(delete this.r[t],Object.keys(this.r).length===0&&(this.r=void 0),this.w.handleFlagChanges([t],"override"))}clearAllOverrides(){if(this.r){let t=at({},this.r);this.r=void 0,this.w.handleFlagChanges(Object.keys(t),"override")}}getAllOverrides(){if(!this.r)return{};let t={};return Object.entries(this.r).forEach(([e,n])=>{t[e]=this.Ft(n)}),t}getDebugOverride(){return{setOverride:this.setOverride.bind(this),removeOverride:this.removeOverride.bind(this),clearAllOverrides:this.clearAllOverrides.bind(this),getAllOverrides:this.getAllOverrides.bind(this)}}},cp="unknown hook",Kp="beforeEvaluation",_p="afterEvaluation",Pw="afterTrack";function br(t,e,n,r,i){try{return r()}catch(o){return t==null||t.error(`An error was encountered in "${e}" of the "${n}" hook: ${o}`),i}}function vr(t,e){try{return e.getMetadata().name||cp}catch(n){return t.error("Exception thrown getting metadata for hook. Unable to get hook name."),cp}}function Fw(t,e,n){return e.map(r=>br(t,Kp,vr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeEvaluation)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function Aw(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,_p,vr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterEvaluation)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function Jw(t,e,n){return e.map(r=>br(t,Kp,vr(t,r),()=>{var i,o;return(o=(i=r==null?void 0:r.beforeIdentify)==null?void 0:i.call(r,n,{}))!=null?o:{}},{}))}function Dw(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,_p,vr(t,s),()=>{var c,l;return(l=(c=s==null?void 0:s.afterIdentify)==null?void 0:c.call(s,n,a,i))!=null?l:{}},{})}}function Yw(t,e,n){for(let r=e.length-1;r>=0;r-=1){let i=e[r];br(t,Pw,vr(t,i),()=>{var o;return(o=i==null?void 0:i.afterTrack)==null?void 0:o.call(i,n)},void 0)}}var Kw=class{constructor(t,e){this.t=t,this.F=[],this.F.push(...e)}withEvaluation(t,e,n,r){if(this.F.length===0)return r();let i=[...this.F],o={flagKey:t,context:e,defaultValue:n},s=Fw(this.t,i,o),a=r();return Aw(this.t,i,o,s,a),a}identify(t,e){let n=[...this.F],r={context:t,timeout:e},i=Jw(this.t,n,r);return o=>{Dw(this.t,n,r,i,o)}}addHook(t){this.F.push(t)}afterTrack(t){if(this.F.length===0)return;let e=[...this.F];Yw(this.t,e,t)}};function _w(t){return{getMetadata(){return{name:"LaunchDarkly-Inspector-Adapter"}},afterEvaluation:(e,n,r)=>(t.onFlagUsed(e.flagKey,r,e.context),n),afterIdentify(e,n,r){return t.onIdentityChanged(e.context),n}}}function Hw(t,e){return`an inspector: "${e}" of an invalid type (${t}) was configured`}function zw(t,e){return`an inspector: "${e}" of type: "${t}" generated an exception`}function Bw(t,e){let n=!1,r={method:(...i)=>{try{t.method(...i)}catch(o){n||(n=!0,e.warn(zw(r.type,r.name)))}},type:t.type,name:t.name,synchronous:t.synchronous};return r}var Hp="flag-used",zp="flag-details-changed",Bp="flag-detail-changed",jp="client-identity-changed",jw=[Hp,zp,Bp,jp];function Qw(t,e){let n=jw.includes(t.type)&&t.method&&typeof t.method=="function";return n||e.warn(Hw(t.type,t.name)),n}var $w=class{constructor(t,e){this.W=[];let n=t.filter(r=>Qw(r,e));this.W=n.map(r=>Bw(r,e))}hasInspectors(){return this.W.length!==0}onFlagUsed(t,e,n){this.W.forEach(r=>{r.type===Hp&&r.method(t,e,n)})}onFlagsChanged(t){this.W.forEach(e=>{e.type===zp&&e.method(t)})}onFlagChanged(t,e){this.W.forEach(n=>{n.type===Bp&&n.method(t,e)})}onIdentityChanged(t){this.W.forEach(e=>{e.type===jp&&e.method(t)})}},qw=class{constructor(t){this.t=t,this.n=new Map}on(t,e){var n;this.n.has(t)?(n=this.n.get(t))==null||n.push(e):this.n.set(t,[e])}off(t,e){let n=this.n.get(t);if(n){if(e){let r=n.filter(i=>i!==e);r.length===0?this.n.delete(t):this.n.set(t,r);return}this.n.delete(t)}}Mi(t,e,...n){var r;try{t(...n)}catch(i){(r=this.t)==null||r.error(`Encountered error invoking handler for "${e}", detail: "${i}"`)}}emit(t,...e){let n=this.n.get(t);n==null||n.forEach(r=>this.Mi(r,t,...e))}eventNames(){return[...this.n.keys()]}listenerCount(t){var e,n;return(n=(e=this.n.get(t))==null?void 0:e.length)!=null?n:0}};function tI(t,e,n){let r=e.info.sdkData(),i;n.applicationInfo&&(n.applicationInfo.id&&(i=i!=null?i:{},i.id=n.applicationInfo.id),n.applicationInfo.version&&(i=i!=null?i:{},i.version=n.applicationInfo.version),n.applicationInfo.name&&(i=i!=null?i:{},i.name=n.applicationInfo.name),n.applicationInfo.versionName&&(i=i!=null?i:{},i.versionName=n.applicationInfo.versionName));let o={name:r.userAgentBase,version:r.version};r.wrapperName&&(o.wrapperName=r.wrapperName),r.wrapperVersion&&(o.wrapperVersion=r.wrapperVersion);let s={sdk:o,[n.credentialType]:t};return i&&(s.application=i),s}var{ClientMessages:up,ErrorKinds:hp}=de,eI=5,nI=class{constructor(t,e,n,r,i,o){if(this.sdkKey=t,this.autoEnvAttributes=e,this.platform=n,this.a=Tw(),this.Ut=15,this.N=new lp(!1),this.ft=new lp(!0),this.Vt=!1,this.Fi=cw(),!t)throw new Error("You must configure the client with a client-side SDK key");if(!n.encoding)throw new Error("Platform must implement Encoding because btoa is required.");this.e=new dw(r,o),this.logger=this.e.logger,this.Se=AS(this.sdkKey,this.platform.info,this.e.tags,this.e.serviceEndpoints.includeAuthorizationHeader,this.e.userAgentHeaderName),this.E=new Mw(this.platform,t,this.e.maxCachedContexts,this.e.logger),this.L=Ow(t,this.e,n),this.D=Gw(t,this.e,n,this.Se,this.L),this.emitter=new qw,this.emitter.on("error",(a,c)=>{this.logger.error(`error: ${c}, context: ${JSON.stringify(a)}`)}),this.E.on((a,c,l)=>{this.Ui(c,l);let u=xn.toLDContext(a);this.emitter.emit("change",u,c),c.forEach(h=>{this.emitter.emit(`change:${h}`,u)})}),this.dataManager=i(this.E,this.e,this.Se,this.emitter,this.L);let s=[...this.e.hooks];if(this.environmentMetadata=tI(this.sdkKey,this.platform,this.e),this.e.getImplementationHooks(this.environmentMetadata).forEach(a=>{s.push(a)}),this.U=new Kw(this.logger,s),this.Q=new $w(this.e.inspectors,this.logger),this.Q.hasInspectors()&&this.U.addHook(_w(this.Q)),r.cleanOldPersistentData&&o!=null&&o.getLegacyStorageKeys&&this.platform.storage)try{this.logger.debug("Cleaning old persistent data."),Promise.all(o.getLegacyStorageKeys().map(a=>{var c;return(c=this.platform.storage)==null?void 0:c.clear(a)})).catch(a=>{this.logger.error(`Error cleaning old persistent data: ${a}`)}).finally(()=>{this.logger.debug("Cleaned old persistent data.")})}catch(a){this.logger.error(`Error cleaning old persistent data: ${a}`)}}allFlags(){return Object.entries(this.E.getAll()).reduce((t,[e,n])=>(n.flag!==null&&n.flag!==void 0&&!n.flag.deleted&&(t[e]=n.flag.value),t),{})}async close(){var t;await this.flush(),(t=this.D)==null||t.close(),this.dataManager.close(),this.logger.debug("Closed event processor and data source.")}async flush(){var t;try{await((t=this.D)==null?void 0:t.flush()),this.logger.debug("Successfully flushed event processor.")}catch(e){return this.logger.error(`Error flushing event processor: ${e}.`),{error:e,result:!1}}return{result:!0}}getContext(){return this.a.hasContext()?xp(this.a.getUnwrappedContext()):void 0}getInternalContext(){return this.a.getContext()}presetFlags(t){this.E.presetFlags(t)}async identify(t,e){let n=await this.identifyResult(t,e);if(n.status==="error")throw n.error;if(n.status==="timeout"){let r=new Vp(`identify timed out after ${n.timeout} seconds.`);throw this.logger.error(r.message),r}}async identifyResult(t,e){var n,r;let i=(n=e==null?void 0:e.timeout)!=null?n:eI,o=(e==null?void 0:e.timeout)===void 0&&(e==null?void 0:e.noTimeout)===!0;i>this.Ut&&this.logger.warn(`The identify function was called with a timeout greater than ${this.Ut} seconds. We recommend a timeout of less than ${this.Ut} seconds.`);let s=this.Fi.execute({before:async()=>{let c=await xw(t,this.platform);this.autoEnvAttributes===Ji.Enabled&&(c=await Iw(c,this.platform,this.e));let l=xn.fromLDContext(c);if(l.valid){let u=this.U.identify(c,e==null?void 0:e.timeout);return{context:c,checkedContext:l,afterIdentify:u}}return{context:c,checkedContext:l}},execute:async c=>{var l;let{context:u,checkedContext:h}=c;if(!h.valid){let d=new Error("Context was unspecified or had no key");return this.emitter.emit("error",u,d),Promise.reject(d)}this.a.set(u,h),(l=this.D)==null||l.sendEvent(this.N.identifyEvent(h));let{identifyPromise:p,identifyResolve:f,identifyReject:m}=this.a.newIdentificationPromise();return this.logger.debug(`Identifying ${JSON.stringify(h)}`),await this.dataManager.identify(f,m,h,e),p},after:async(c,l)=>{var u,h,p;c.status==="complete"?(u=l==null?void 0:l.afterIdentify)==null||u.call(l,{status:"completed"}):c.status==="shed"?(h=l==null?void 0:l.afterIdentify)==null||h.call(l,{status:"shed"}):c.status==="error"&&((p=l==null?void 0:l.afterIdentify)==null||p.call(l,{status:"error"}))}},(r=e==null?void 0:e.sheddable)!=null?r:!1).then(c=>{if(c.status==="error"){let u={status:"error",error:c.error};return this.maybeSetInitializationResult({status:"failed",error:c.error}),u}if(c.status==="shed")return{status:"shed"};let l={status:"completed"};return this.maybeSetInitializationResult({status:"complete"}),l});if(o)return s;let a=new Promise(c=>{setTimeout(()=>{c({status:"timeout",timeout:i})},i*1e3)});return Promise.race([s,a])}maybeSetInitializationResult(t){this.initializeResult===void 0&&(this.initializeResult=t,this.emitter.emit("ready"),t.status==="complete"&&this.emitter.emit("initialized"),this.initResolve&&(this.initResolve(t),this.initResolve=void 0))}waitForInitialization(t){var e;let n=(e=t==null?void 0:t.timeout)!=null?e:5;return this.initializeResult?Promise.resolve(this.initializeResult):this.initializedPromise?this.promiseWithTimeout(this.initializedPromise,n):(this.initializedPromise||(this.initializedPromise=new Promise(r=>{this.initResolve=r})),this.promiseWithTimeout(this.initializedPromise,n))}promiseWithTimeout(t,e){let n=PS(e,"waitForInitialization");return Promise.race([t.then(r=>(n.cancel(),r)),n.promise.then(()=>({status:"complete"})).catch(()=>({status:"timeout"}))]).catch(r=>{var i;return(i=this.logger)==null||i.error(r.message),{status:"failed",error:r}})}on(t,e){this.emitter.on(t,e)}off(t,e){this.emitter.off(t,e)}track(t,e,n){var r,i;if(!this.a.hasValidContext()){this.logger.warn(up.MissingContextKeyNoEvent);return}n!==void 0&&!G.Number.is(n)&&((r=this.logger)==null||r.warn(up.invalidMetricValue(typeof n))),(i=this.D)==null||i.sendEvent(this.e.trackEventModifier(this.N.customEvent(t,this.a.getContext(),e,n))),this.U.afterTrack({key:t,context:this.a.getUnwrappedContext(),data:e,metricValue:n})}gt(t,e,n,r){var i,o,s,a,c;let l=this.a.hasContext();l||(i=this.logger)==null||i.warn("Flag evaluation called before client is fully initialized, data from this evaulation could be stale.");let u=this.a.getContext(),h=this.E.get(t);if(h===void 0||h.flag.deleted){let v=e!=null?e:null;return(o=this.logger)==null||o.warn(`Unknown feature flag "${t}"; returning default value ${v}.`),l&&((s=this.D)==null||s.sendEvent(this.N.unknownFlagEvent(t,v,u))),sp(hp.FlagNotFound,e)}let{reason:p,value:f,variation:m,prerequisites:d}=h.flag;if(r){let[v,I]=r(f);if(!v){l&&((a=this.D)==null||a.sendEvent(n.evalEventClient(t,e,e,h.flag,u,p)));let R=new US(`Wrong type "${I}" for feature flag "${t}"; returning default value`);return this.emitter.emit("error",this.a.getUnwrappedContext(),R),sp(hp.WrongType,e)}}let b=ap(f,m,p);return f==null&&(this.logger.debug("Result value is null. Providing default value."),b.value=e),d==null||d.forEach(v=>{this.gt(v,void 0,this.N)}),l&&((c=this.D)==null||c.sendEvent(n.evalEventClient(t,f,e,h.flag,u,p))),b}variation(t,e){let{value:n}=this.U.withEvaluation(t,this.a.getUnwrappedContext(),e,()=>this.gt(t,e,this.N));return n}variationDetail(t,e){return this.U.withEvaluation(t,this.a.getUnwrappedContext(),e,()=>this.gt(t,e,this.ft))}_(t,e,n,r){return this.U.withEvaluation(t,this.a.getUnwrappedContext(),e,()=>this.gt(t,e,n,r))}boolVariation(t,e){return this._(t,e,this.N,n=>[G.Boolean.is(n),G.Boolean.getType()]).value}jsonVariation(t,e){return this.variation(t,e)}numberVariation(t,e){return this._(t,e,this.N,n=>[G.Number.is(n),G.Number.getType()]).value}stringVariation(t,e){return this._(t,e,this.N,n=>[G.String.is(n),G.String.getType()]).value}boolVariationDetail(t,e){return this._(t,e,this.ft,n=>[G.Boolean.is(n),G.Boolean.getType()])}numberVariationDetail(t,e){return this._(t,e,this.ft,n=>[G.Number.is(n),G.Number.getType()])}stringVariationDetail(t,e){return this._(t,e,this.ft,n=>[G.String.is(n),G.String.getType()])}jsonVariationDetail(t,e){return this.variationDetail(t,e)}addHook(t){this.U.addHook(t)}setEventSendingEnabled(t,e){var n,r,i,o;this.Vt!==t&&(this.Vt=t,t?(this.logger.debug("Starting event processor"),(n=this.D)==null||n.start()):e?((r=this.logger)==null||r.debug("Flushing event processor before disabling."),this.flush().then(()=>{var s,a;this.Vt||((s=this.logger)==null||s.debug("Stopping event processor."),(a=this.D)==null||a.close())})):((i=this.logger)==null||i.debug("Stopping event processor."),(o=this.D)==null||o.close()))}sendEvent(t){var e;(e=this.D)==null||e.sendEvent(t)}getDebugOverrides(){var t,e;return(e=(t=this.E).getDebugOverride)==null?void 0:e.call(t)}Ui(t,e){if(!this.Q.hasInspectors())return;let n={};t.forEach(r=>{let i=this.E.get(r);if(i!=null&&i.flag&&!i.flag.deleted){let{reason:o,value:s,variation:a}=i.flag;n[r]=ap(s,a,o)}else n[r]={value:void 0,reason:null,variationIndex:null}}),e==="init"?this.Q.onFlagsChanged(n):e==="patch"&&Object.entries(n).forEach(([r,i])=>{this.Q.onFlagChanged(r,i)})}};function rI(t,e,n){n.forEach(r=>{var i;try{(i=r.registerDebug)==null||i.call(r,e)}catch(o){t.error(`Exception thrown registering plugin ${de.safeGetName(t,r)}.`)}})}var iI=class{constructor(t,e,n){this.E=t,this.jt=e,this.t=n}async handlePut(t,e){this.t.debug(`Got PUT: ${Object.keys(e)}`);let n=Object.entries(e).reduce((r,[i,o])=>(r[i]={version:o.version,flag:o},r),{});await this.E.init(t,n),this.jt.requestStateUpdate(Kt.Valid)}async handlePatch(t,e){this.t.debug(`Got PATCH ${JSON.stringify(e,null,2)}`),this.E.upsert(t,e.key,{version:e.version,flag:e})}async handleDelete(t,e){this.t.debug(`Got DELETE ${JSON.stringify(e,null,2)}`),this.E.upsert(t,e.key,{version:e.version,flag:me(at({},e),{deleted:!0,flagVersion:0,value:void 0,variation:0,trackEvents:!1})})}handleStreamingError(t){this.jt.reportError(t.kind,t.message,t.code,t.recoverable)}handlePollingError(t){this.jt.reportError(t.kind,t.message,t.status,t.recoverable)}},oI=class{constructor(t,e=()=>Date.now()){this.Vi=t,this.pt=Kt.Closed,this.Le=e(),this.dt=e}get status(){return{state:this.pt,stateSince:this.Le,lastError:this.ji}}Ce(t,e=!1){let n=t===Kt.Interrupted&&this.pt===Kt.Initializing?Kt.Initializing:t,r=this.pt!==n;r&&(this.pt=n,this.Le=this.dt()),(r||e)&&this.Vi.emit("dataSourceStatus",this.status)}requestStateUpdate(t){this.Ce(t)}reportError(t,e,n,r=!1){let i={kind:t,message:e,statusCode:n,time:this.dt()};this.ji=i,this.Ce(r?Kt.Interrupted:Kt.Closed,!0)}};function pp(t){t==null||t.debug("Poll completed after the processor was closed. Skipping processing.")}var sI=class{constructor(t,e,n,r,i){this.Hi=t,this.zi=e,this.Bi=n,this.m=r,this.t=i,this.u=!1}async Ie(){var t,e,n,r,i,o,s;if(this.u)return;let a=h=>{var p,f,m;(p=this.t)==null||p.error("Polling received invalid data"),(f=this.t)==null||f.debug(`Invalid JSON follows: ${h}`),(m=this.m)==null||m.call(this,new Ai(_t.InvalidData,"Malformed JSON data in polling response"))};(t=this.t)==null||t.debug("Polling LaunchDarkly for feature flag updates");let c=Date.now();try{let h=await this.Hi.requestPayload();try{if(this.u){pp(this.t);return}let p=JSON.parse(h);try{(e=this.Bi)==null||e.call(this,p)}catch(f){(n=this.t)==null||n.error(`Exception from data handler: ${f}`)}}catch(p){a(h)}}catch(h){if(this.u){pp(this.t);return}let p=h;if(p.status!==void 0&&!_i(p.status)){(r=this.t)==null||r.error(Gn(h,"polling request")),(i=this.m)==null||i.call(this,new Ai(_t.ErrorResponse,p.message,p.status));return}(o=this.t)==null||o.error(Gn(h,"polling request","will retry"))}let l=Date.now()-c,u=Math.max(this.zi*1e3-l,0);(s=this.t)==null||s.debug("Elapsed: %d ms, sleeping for %d ms",l,u),this.Ht=setTimeout(()=>{this.Ie()},u)}start(){this.Ie()}stop(){this.Ht&&(clearTimeout(this.Ht),this.Ht=void 0),this.u=!0}close(){this.stop()}},aI=(t,e,n,r)=>{n==null||n.error(`Stream received invalid data in "${t}" message`),n==null||n.debug(`Invalid JSON follows: ${e}`),r==null||r(new Wa(_t.InvalidData,"Malformed JSON data in event stream"))};function lI(t,e){e==null||e.debug(`Received ${t} event after processor was closed. Skipping processing.`)}function dp(t){t==null||t.debug("Ping completed after processor was closed. Skipping processing.")}var cI=class{constructor(t,e,n,r,i,o,s,a,c){var l;this.Ki=t,this.zt=e,this.n=n,this.T=r,this.Gi=o,this.L=s,this.m=a,this.t=c,this.u=!1;let u;e.useReport&&!r.getEventSourceCapabilities().customMethod?u=e.paths.pathPing(i,t):u=e.useReport?e.paths.pathReport(i,t):e.paths.pathGet(i,t);let h=[...(l=e.queryParameters)!=null?l:[]];this.zt.withReasons&&h.push({key:"withReasons",value:"true"}),this.T=r,this.ht=at({},e.baseHeaders),this.t=c,this.Wi=XS(e.serviceEndpoints,u,h)}Ae(){this.mt=Date.now()}Bt(t){this.mt&&this.L&&this.L.recordStreamInit(this.mt,!t,Date.now()-this.mt),this.mt=void 0}Ar(t){var e,n,r;return Np(t)?((r=this.t)==null||r.warn(Gn(t,"streaming request","will retry")),this.Bt(!1),this.Ae(),!0):(this.Bt(!1),(e=this.m)==null||e.call(this,new Wa(_t.ErrorResponse,t.message,t.status,!1)),(n=this.t)==null||n.error(Gn(t,"streaming request")),!1)}start(){this.Ae();let t;this.zt.useReport?(this.ht["content-type"]="application/json",t={method:"REPORT",body:this.Ki}):t={};let e=this.T.createEventSource(this.Wi,me(at({headers:this.ht},t),{errorFilter:n=>this.Ar(n),initialRetryDelayMillis:this.zt.initialRetryDelayMillis,readTimeoutMillis:300*1e3,retryResetIntervalMillis:60*1e3}));this.Pe=e,e.onclose=()=>{var n;(n=this.t)==null||n.info("Closed LaunchDarkly stream connection")},e.onerror=()=>{},e.onopen=()=>{var n;(n=this.t)==null||n.info("Opened LaunchDarkly stream connection")},e.onretrying=n=>{var r;(r=this.t)==null||r.info(`Will retry stream connection in ${n.delayMillis} milliseconds`)},this.n.forEach(({deserializeData:n,processJson:r},i)=>{e.addEventListener(i,o=>{var s,a;if(this.u){lI(i,this.t);return}if((s=this.t)==null||s.debug(`Received ${i} event`),o!=null&&o.data){this.Bt(!0);let{data:c}=o,l=n(c);if(!l){aI(i,c,this.t,this.m);return}r(l)}else(a=this.m)==null||a.call(this,new Wa(_t.InvalidData,"Unexpected payload from event stream"))})}),e.addEventListener("ping",async()=>{var n,r,i,o,s,a,c;(n=this.t)==null||n.debug("Got PING, going to poll LaunchDarkly for feature flag updates");try{let l=await this.Gi.requestPayload();try{if(this.u){dp(this.t);return}let u=JSON.parse(l);try{(r=this.n.get("put"))==null||r.processJson(u)}catch(h){(i=this.t)==null||i.error(`Exception from data handler: ${h}`)}}catch(u){(o=this.t)==null||o.error("Polling after ping received invalid data"),(s=this.t)==null||s.debug(`Invalid JSON follows: ${l}`),(a=this.m)==null||a.call(this,new Ai(_t.InvalidData,"Malformed JSON data in ping polling response"))}}catch(l){if(this.u){dp(this.t);return}let u=l;(c=this.m)==null||c.call(this,new Ai(_t.ErrorResponse,u.message,u.status))}})}stop(){var t;(t=this.Pe)==null||t.close(),this.Pe=void 0,this.u=!0}close(){this.stop()}},uI=class{constructor(t,e,n,r,i,o,s,a,c){this.platform=t,this.flagManager=e,this.credential=n,this.config=r,this.getPollingPaths=i,this.getStreamingPaths=o,this.baseHeaders=s,this.emitter=a,this.diagnosticsManager=c,this.closed=!1,this.logger=r.logger,this.dataSourceStatusManager=new oI(a),this.J=new iI(e,this.dataSourceStatusManager,this.config.logger)}setConnectionParams(t){this.Ji=t}createPollingProcessor(t,e,n,r,i){let o=new sI(n,this.config.pollInterval,async s=>{await this.J.handlePut(e,s),r==null||r()},s=>{this.emitter.emit("error",t,s),this.J.handlePollingError(s),i==null||i(s)},this.logger);this.updateProcessor=this.Oe(o,this.dataSourceStatusManager)}createStreamingProcessor(t,e,n,r,i){var o;let s=new cI(JSON.stringify(t),{credential:this.credential,serviceEndpoints:this.config.serviceEndpoints,paths:this.getStreamingPaths(),baseHeaders:this.baseHeaders,initialRetryDelayMillis:this.config.streamInitialReconnectDelay*1e3,withReasons:this.config.withReasons,useReport:this.config.useReport,queryParameters:(o=this.Ji)==null?void 0:o.queryParameters},this.createStreamListeners(e,r),this.platform.requests,this.platform.encoding,n,this.diagnosticsManager,a=>{this.emitter.emit("error",t,a),this.J.handleStreamingError(a),i==null||i(a)},this.logger);this.updateProcessor=this.Oe(s,this.dataSourceStatusManager)}createStreamListeners(t,e){let n=new Map;return n.set("put",{deserializeData:JSON.parse,processJson:async r=>{await this.J.handlePut(t,r),e==null||e()}}),n.set("patch",{deserializeData:JSON.parse,processJson:async r=>{this.J.handlePatch(t,r)}}),n.set("delete",{deserializeData:JSON.parse,processJson:async r=>{this.J.handleDelete(t,r)}}),n}Oe(t,e){return{start:()=>{e.requestStateUpdate(Kt.Initializing),t.start()},stop:()=>{t.stop(),e.requestStateUpdate(Kt.Closed)},close:()=>{t.close(),e.requestStateUpdate(Kt.Closed)}}}close(){var t;(t=this.updateProcessor)==null||t.close(),this.closed=!0}};function Qp(t,e){let n=Object.keys(e),r="$flagsState",i="$valid",o=e[r];!o&&n.length&&t.warn("LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."),e[i]===!1&&t.warn("LaunchDarkly bootstrap data is not available because the back end could not read the flags.");let s={};return n.forEach(a=>{if(a!==r&&a!==i){let c;o&&o[a]?c=at({value:e[a]},o[a]):c={value:e[a],version:0},s[a]={version:c.version,flag:c}}}),s}function Hi(){return typeof document!==void 0}function Ka(){return typeof window!==void 0}function $p(t,e,n){return Hi()?(document.addEventListener(t,e,n),()=>{document.removeEventListener(t,e,n)}):()=>{}}function qp(t,e,n){return Hi()?(window.addEventListener(t,e,n),()=>{window.removeEventListener(t,e,n)}):()=>{}}function yr(){return Ka()?window.location.href:""}function hI(){return Ka()?window.location.search:""}function pI(){return Ka()?window.location.hash:""}function dI(){if(typeof crypto!==void 0)return crypto;throw Error("Access to a web crypto API is required")}function fI(){return Hi()?document.visibilityState:"visibile"}function mI(t){if(Hi())return document.querySelectorAll(t)}var yI="[BrowserDataManager]",gI=class extends uI{constructor(t,e,n,r,i,o,s,a,c,l){super(t,e,n,r,o,s,a,c,l),this.ls=i,this.tt=void 0,this.Kt=!1,this.tt=i.streaming}C(t,...e){this.logger.debug(`${yI} ${t}`,...e)}async identify(t,e,n,r){if(this.closed){this.C("Identify called after data manager was closed.");return}this.context=n;let i=r;i!=null&&i.hash?this.setConnectionParams({queryParameters:[{key:"h",value:i.hash}]}):this.setConnectionParams(),this.Gt=i==null?void 0:i.hash,i!=null&&i.bootstrap?this.qi(n,i.bootstrap,t):(await this.flagManager.loadCached(n)&&this.C("Identify - Flags loaded from cache. Continuing to initialize via a poll."),await this.Yi(n,t,e)),this.Wt()}async Zi(t){let e=JSON.stringify(xn.toLDContext(t)),n=np(e,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.Gt),r=3,i;for(let o=0;o<=r;o+=1)try{return await n.requestPayload()}catch(s){if(!Np(s))throw s;i=s,o<r&&(this.C(Gn(s,"initial poll request","will retry")),await Op(1e3))}throw i}async Yi(t,e,n){var r,i;try{this.dataSourceStatusManager.requestStateUpdate(Kt.Initializing);let o=await this.Zi(t);try{let s=this.createStreamListeners(t,e).get("put");s.processJson(s.deserializeData(o))}catch(s){this.dataSourceStatusManager.reportError(_t.InvalidData,(r=s.message)!=null?r:"Could not parse poll response")}}catch(o){this.dataSourceStatusManager.reportError(_t.NetworkError,(i=o.message)!=null?i:"unexpected network error",o.status),n(o)}}qi(t,e,n){this.flagManager.setBootstrap(t,Qp(this.logger,e)),this.C("Identify - Initialization completed from bootstrap"),n()}setForcedStreaming(t){this.tt=t,this.Wt()}setAutomaticStreamingState(t){this.Kt=t,this.Wt()}Wt(){let t=this.tt||this.Kt&&this.tt===void 0;this.C(`Updating streaming state. forced(${this.tt}) automatic(${this.Kt})`),t?this.Xi():this.Qi()}Qi(){var t;this.updateProcessor&&this.C("Stopping update processor."),(t=this.updateProcessor)==null||t.close(),this.updateProcessor=void 0}Xi(){if(this.updateProcessor){this.C("Update processor already active. Not changing state.");return}if(!this.context){this.C("Context not set, not starting update processor.");return}this.C("Starting update processor."),this.ts(this.context)}ts(t,e,n){var r;let i=xn.toLDContext(t);(r=this.updateProcessor)==null||r.close();let o=JSON.stringify(xn.toLDContext(t)),s=np(o,this.config.serviceEndpoints,this.getPollingPaths(),this.platform.requests,this.platform.encoding,this.baseHeaders,[],this.config.withReasons,this.config.useReport,this.Gt);this.createStreamingProcessor(i,t,s,e,n),this.updateProcessor.start()}};function bI(t){let e=$p("visibilitychange",()=>{fI()==="hidden"&&t()}),n=qp("pagehide",t);return()=>{e(),n()}}function Oa(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vI(t,e,n,r){let i=((t.kind==="substring"||t.kind==="regex")&&r.includes("/")?e:e.replace(r,"")).replace(n,"");switch(t.kind){case"exact":return new RegExp(`^${Oa(t.url)}/?$`).test(e);case"canonical":return new RegExp(`^${Oa(t.url)}/?$`).test(i);case"substring":return new RegExp(`.*${Oa(t.substring)}.*$`).test(i);case"regex":return new RegExp(t.pattern).test(i);default:return!1}}function SI(t,e){let n=[];return e.forEach(r=>{let i=t.target,{selector:o}=r,s=mI(o);for(;i&&s!=null&&s.length;){for(let a=0;a<s.length;a+=1)if(i===s[a]){n.push(r);break}i=i.parentNode}}),n}var wI=class{constructor(t,e){let n=t.filter(o=>{var s;return(s=o.urls)==null?void 0:s.some(a=>vI(a,yr(),hI(),pI()))}),r=n.filter(o=>o.kind==="pageview"),i=n.filter(o=>o.kind==="click");if(r.forEach(o=>e(o)),i.length){let o=s=>{SI(s,i).forEach(a=>{e(a)})};this.Te=$p("click",o)}}close(){var t;(t=this.Te)==null||t.call(this)}},II=300,TI=class{constructor(t){this.No=yr();let e=()=>{let r=yr();r!==this.No&&(this.No=r,t())};this.Jt=setInterval(e,II);let n=qp("popstate",e);this.$e=()=>{n()}}close(){var t;this.Jt&&clearInterval(this.Jt),(t=this.$e)==null||t.call(this)}},EI=class{constructor(t,e,n,r,i,o=s=>new TI(s)){this.T=e,this.ns=r,this.ss=i,this.yt=[],this.Re=!1,this.vt=`${n}/sdk/goals/${t}`,this.Ne=o(()=>{this.Yt()})}async initialize(){await this.es(),this.Yt()}startTracking(){this.Re=!0,this.Yt()}Yt(){var t;this.Re&&((t=this.qt)==null||t.close(),this.yt&&this.yt.length&&(this.qt=new wI(this.yt,e=>{this.ss(yr(),e)})))}async es(){try{let t=await this.T.fetch(this.vt);this.yt=await t.json()}catch(t){this.ns(new kp(`Encountered error fetching goals: ${t}`))}}close(){var t,e;(t=this.Ne)==null||t.close(),(e=this.qt)==null||e.close()}};function RI(t){return t.kind==="click"}var CI=2,td={fetchGoals:!0,eventUrlTransformer:t=>t,streaming:void 0,plugins:[]},ZI={fetchGoals:G.Boolean,eventUrlTransformer:G.Function,streaming:G.Boolean,plugins:G.createTypeArray("LDPlugin",{})};function kI(t){var e;let n=at({},t);return(e=n.flushInterval)!=null||(n.flushInterval=CI),n}function VI(t){let e=kI(t);return Object.keys(td).forEach(n=>{delete e[n]}),e}function xI(t,e){let n=at({},td);return Object.entries(ZI).forEach(r=>{let[i,o]=r,s=t[i];s!==void 0&&(o.is(s)?n[i]=s:e.warn(Ue.wrongOptionType(i,o.getType(),typeof s)))}),n}var NI=class{constructor(t,e){switch(this.rs=t,this.Me=[],e){case"sha1":this.Zt="SHA-1";break;case"sha256":this.Zt="SHA-256";break;default:throw new Error(`Algorithm is not supported ${e}`)}}async asyncDigest(t){let e=this.Me.join(""),n=new TextEncoder().encode(e),r=await this.rs.subtle.digest(this.Zt,n);switch(t){case"base64":return btoa(String.fromCharCode(...new Uint8Array(r)));case"hex":return[...new Uint8Array(r)].map(i=>i.toString(16).padStart(2,"0")).join("");default:throw new Error(`Encoding is not supported ${t}`)}}update(t){return this.Me.push(t),this}},OI={start:0,end:3},GI={start:4,end:5},Ga={start:6,end:7},La={start:8,end:8},LI={start:9,end:9},XI={start:10,end:15};function WI(){if(crypto&&crypto.getRandomValues){let e=new Uint8Array(16);return crypto.getRandomValues(e),[...e.values()]}let t=[];for(let e=0;e<16;e+=1)t.push(Math.floor(Math.random()*256));return t}function kn(t,e){let n="";for(let r=e.start;r<=e.end;r+=1)n+=t[r].toString(16).padStart(2,"0");return n}function UI(t){return t[La.start]=(t[La.start]|128)&191,t[Ga.start]=t[Ga.start]&15|64,`${kn(t,OI)}-${kn(t,GI)}-${kn(t,Ga)}-${kn(t,La)}${kn(t,LI)}-${kn(t,XI)}`}function MI(){let t=WI();return UI(t)}function PI(){return typeof crypto!==void 0&&typeof crypto.randomUUID=="function"?crypto.randomUUID():MI()}var FI=class{createHash(t){return new NI(dI(),t)}randomUUID(){return PI()}};function AI(t){let e=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(e)}var JI=class{btoa(t){return AI(new TextEncoder().encode(t))}},DI=class{constructor(t){this.e=t}platformData(){return{name:"JS"}}sdkData(){let t={name:"@launchdarkly/js-client-sdk",version:"0.12.1",userAgentBase:"JSClient"};return this.e.wrapperName&&(t.wrapperName=this.e.wrapperName),this.e.wrapperVersion&&(t.wrapperVersion=this.e.wrapperVersion),t}},YI=class{constructor(t,e){this.vt=t,this.n={},this.A=new ES(e.initialRetryDelayMillis,e.retryResetIntervalMillis),this.Fe=e.errorFilter,this.Ue()}Ue(){this.q=new EventSource(this.vt),this.q.onopen=()=>{var t;this.A.success(),(t=this.onopen)==null||t.call(this)},this.q.onerror=t=>{var e;this.as(t),(e=this.onerror)==null||e.call(this,t)},Object.entries(this.n).forEach(([t,e])=>{e.forEach(n=>{var r;(r=this.q)==null||r.addEventListener(t,n)})})}addEventListener(t,e){var n,r,i;(r=(n=this.n)[t])!=null||(n[t]=[]),this.n[t].push(e),(i=this.q)==null||i.addEventListener(t,e)}close(){var t,e;clearTimeout(this.Xt),this.Xt=void 0,(t=this.q)==null||t.close(),(e=this.onclose)==null||e.call(this)}cs(t){var e;(e=this.onretrying)==null||e.call(this,{delayMillis:t}),this.Xt=setTimeout(()=>{this.Ue()},t)}as(t){this.close(),!(t.status&&typeof t.status=="number"&&!this.Fe(t))&&this.cs(this.A.fail())}},KI=class{fetch(t,e){return fetch(t,e)}createEventSource(t,e){return new YI(t,e)}getEventSourceCapabilities(){return{customMethod:!1,readTimeout:!1,headers:!1}}};function ed(){return typeof localStorage!="undefined"}function _I(){if(!ed())return[];let t=[];for(let e=0;e<localStorage.length;e+=1){let n=localStorage.key(e);n&&t.push(n)}return t}var HI=class{constructor(t){this.t=t}async clear(t){var e;try{localStorage.removeItem(t)}catch(n){(e=this.t)==null||e.error(`Error clearing key from localStorage: ${t}, reason: ${n}`)}}async get(t){var e;try{let n=localStorage.getItem(t);return n!=null?n:null}catch(n){return(e=this.t)==null||e.error(`Error getting key from localStorage: ${t}, reason: ${n}`),null}}async set(t,e){var n;try{localStorage.setItem(t,e)}catch(r){(n=this.t)==null||n.error(`Error setting key in localStorage: ${t}, reason: ${r}`)}}},zI=class{constructor(t,e){this.encoding=new JI,this.crypto=new FI,this.requests=new KI,ed()&&(this.storage=new HI(t)),this.info=new DI(e)}},BI=class extends nI{constructor(t,e,n={},r){var i;let{logger:o,debug:s}=n,a=o!=null?o:new Fa({destination:{debug:console.debug,info:console.info,warn:console.warn,error:console.error},level:s?"debug":"info"}),c=(i=n.baseUri)!=null?i:"https://clientsdk.launchdarkly.com",l=r!=null?r:new zI(a,n),u=xI(n,a),h=VI(me(at({},n),{logger:a})),{eventUrlTransformer:p}=u;super(t,e,l,h,(f,m,d,b,v)=>new gI(l,f,t,m,u,()=>({pathGet(I,R){return`/sdk/evalx/${t}/contexts/${$h(R,I)}`},pathReport(I,R){return`/sdk/evalx/${t}/context`},pathPing(I,R){throw new Error("Ping for polling unsupported.")}}),()=>({pathGet(I,R){return`/eval/${t}/${$h(R,I)}`},pathReport(I,R){return`/eval/${t}`},pathPing(I,R){return`/ping/${t}`}}),d,b,v),{getLegacyStorageKeys:()=>_I().filter(f=>f.startsWith(`ld:${t}:`)),analyticsEventPath:`/events/bulk/${t}`,diagnosticEventPath:`/events/diagnostic/${t}`,includeAuthorizationHeader:!1,highTimeoutThreshold:5,userAgentHeaderName:"x-launchdarkly-user-agent",trackEventModifier:f=>new de.InputCustomEvent(f.context,f.key,f.data,f.metricValue,f.samplingRatio,p(yr())),getImplementationHooks:f=>de.safeGetHooks(a,f,u.plugins),credentialType:"clientSideId"}),this.setEventSendingEnabled(!0,!1),this.te=u.plugins,u.fetchGoals&&(this.Qt=new EI(t,l.requests,c,f=>{a.error(f.message)},(f,m)=>{let d=this.getInternalContext();if(!d)return;let b=p(f);RI(m)?this.sendEvent({kind:"click",url:b,samplingRatio:1,key:m.key,creationDate:Date.now(),context:d,selector:m.selector}):this.sendEvent({kind:"pageview",url:b,samplingRatio:1,key:m.key,creationDate:Date.now(),context:d})}),this.Qt.initialize(),u.automaticBackgroundHandling&&bI(()=>this.flush()))}registerPlugins(t){de.safeRegisterPlugins(this.logger,this.environmentMetadata,t,this.te||[]);let e=this.getDebugOverrides();e&&rI(this.logger,e,this.te||[])}setInitialContext(t){this.ee=t}async identify(t,e){return super.identify(t,e)}async identifyResult(t,e){var n;if(!this.et)return this.logger.error("Client must be started before it can identify a context, did you forget to call start()?"),{status:"error",error:new Error("Identify called before start")};let r=at({},e);(e==null?void 0:e.sheddable)===void 0&&(r.sheddable=!0);let i=await super.identifyResult(t,r);return(n=this.Qt)==null||n.startTracking(),i}start(t){var e,n;if(this.initializeResult)return Promise.resolve(this.initializeResult);if(this.et)return this.et;if(!this.ee)return this.logger.error("Initial context not set"),Promise.resolve({status:"failed",error:new Error("Initial context not set")});let r=me(at({},(e=t==null?void 0:t.identifyOptions)!=null?e:{}),{sheddable:!1});if(t!=null&&t.bootstrap&&!r.bootstrap&&(r.bootstrap=t.bootstrap),r!=null&&r.bootstrap)try{let i=Qp(this.logger,r.bootstrap);this.presetFlags(i)}catch(i){this.logger.error("Failed to bootstrap data",i)}return this.initializedPromise||(this.initializedPromise=new Promise(i=>{this.initResolve=i})),this.et=this.promiseWithTimeout(this.initializedPromise,(n=t==null?void 0:t.timeout)!=null?n:5),this.identifyResult(this.ee,r),this.et}setStreaming(t){this.dataManager.setForcedStreaming(t)}Ve(){this.dataManager.setAutomaticStreamingState(!!this.emitter.listenerCount("change"))}on(t,e){super.on(t,e),this.Ve()}off(t,e){super.off(t,e),this.Ve()}};function jI(t,e,n,r={},i){let o=new BI(t,n,r,i);o.setInitialContext(e);let s={variation:(a,c)=>o.variation(a,c),variationDetail:(a,c)=>o.variationDetail(a,c),boolVariation:(a,c)=>o.boolVariation(a,c),boolVariationDetail:(a,c)=>o.boolVariationDetail(a,c),numberVariation:(a,c)=>o.numberVariation(a,c),numberVariationDetail:(a,c)=>o.numberVariationDetail(a,c),stringVariation:(a,c)=>o.stringVariation(a,c),stringVariationDetail:(a,c)=>o.stringVariationDetail(a,c),jsonVariation:(a,c)=>o.jsonVariation(a,c),jsonVariationDetail:(a,c)=>o.jsonVariationDetail(a,c),track:(a,c,l)=>o.track(a,c,l),on:(a,c)=>o.on(a,c),off:(a,c)=>o.off(a,c),flush:()=>o.flush(),setStreaming:a=>o.setStreaming(a),identify:(a,c)=>o.identifyResult(a,c),getContext:()=>o.getContext(),close:()=>o.close(),allFlags:()=>o.allFlags(),addHook:a=>o.addHook(a),waitForInitialization:a=>o.waitForInitialization(a),logger:o.logger,start:a=>o.start(a)};return o.registerPlugins(s),s}function QI(t){return new Fa(t)}function nd(t,e,n){return jI(t,e,Ji.Disabled,n)}var $I=Object.defineProperty,qI=(t,e,n)=>e in t?$I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Te=(t,e,n)=>qI(t,typeof e!="symbol"?e+"":e,n),tT=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),ke=(t,e,...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),eT(r,...n)},eT=(t,...e)=>tT(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>sR);n.recordLog(`${t}${e}`,"warn")}catch(n){}}),nT=class{constructor(t,e){Te(this,"debug"),Te(this,"name"),this.debug=t,this.name=e}log(...t){if(this.debug){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.log.apply(console,[e,...t])}}warn(...t){let e=`[${Date.now()}]`;this.name&&(e+=` - ${this.name}`),console.warn.apply(console,[e,...t])}},So=class{constructor(){Te(this,"_sdk"),Te(this,"_isLoaded",!1),Te(this,"_callBuffer",[]),Te(this,"_capacity",1e5),Te(this,"_droppedEvents",0),Te(this,"_exceededCapacity",!1),Te(this,"_logger",new nT)}h(e,n){if(this.Ln)try{return this.qn[e](...n)}catch(r){ke(`Error executing buffered call to ${e}:`,"error",r)}else{this.Jr({method:e,args:n});return}}Jr(e){this.En.length<this.Ys?(this.En.push(e),this.tr=!1):(this.tr||(this.tr=!0,ke("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this.Ks+=1)}load(e){this.qn=e,this.Ln=!0;for(let{method:n,args:r}of this.En)try{this.qn[n](...r)}catch(i){ke(`Error executing buffered call to ${n}:`,"error",i)}this.En=[]}},rT=Object.defineProperty,iT=Object.defineProperties,oT=Object.getOwnPropertyDescriptors,wo=Object.getOwnPropertySymbols,Ff=Object.prototype.hasOwnProperty,Af=Object.prototype.propertyIsEnumerable,kl=(t,e,n)=>e in t?rT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))Ff.call(e,n)&&kl(t,n,e[n]);if(wo)for(var n of wo(e))Af.call(e,n)&&kl(t,n,e[n]);return t},An=(t,e)=>iT(t,oT(e)),xr=(t,e)=>{var n={};for(var r in t)Ff.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&wo)for(var r of wo(t))e.indexOf(r)<0&&Af.call(t,r)&&(n[r]=t[r]);return n},Wr=(t,e,n)=>kl(t,typeof e!="symbol"?e+"":e,n),Dn=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())});function sT(t,e){for(var n=0;n<e.length;n++){let r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(let i in r)if(i!=="default"&&!(i in t)){let o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function co(t,e){throw new Error(e)}function aT(t){return typeof t=="object"&&t!==null}function lT(t,e){throw new Error("Unexpected invariant triggered.")}var cT=/\r\n|[\n\r]/g;function Vl(t,e){let n=0,r=1;for(let i of t.body.matchAll(cT)){if(typeof i.index=="number"||lT(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function uT(t){return Jf(t.source,Vl(t.source,t.start))}function Jf(t,e){let n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,s=e.line+o,a=e.line===1?n:0,c=e.column+a,l=`${t.name}:${s}:${c}
|
|
349
|
+
`,u=r.split(/\r\n|[\n\r]/g),h=u[i];if(h.length>120){let p=Math.floor(c/80),f=c%80,m=[];for(let d=0;d<h.length;d+=80)m.push(h.slice(d,d+80));return l+rd([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+rd([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function rd(t){let e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
|
|
350
|
+
`)}function hT(t){let e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}var pT=class Df extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=hT(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=id(Array.isArray(s)?s:s?[s]:void 0);let p=id((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=a!=null?a:p==null||(i=p[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:p==null?void 0:p.map(m=>m.start),this.locations=c&&a?c.map(m=>Vl(a,m)):p==null?void 0:p.map(m=>Vl(m.source,m.start));let f=aT(u==null?void 0:u.extensions)?u==null?void 0:u.extensions:void 0;this.extensions=(o=h!=null?h:f)!==null&&o!==void 0?o: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}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Df):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(e+=`
|
|
351
351
|
|
|
352
352
|
`+uT(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
|
|
353
353
|
|
|
354
|
-
`+
|
|
354
|
+
`+Jf(this.source,n);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function id(t){return t===void 0||t.length===0?void 0:t}function Ct(t,e,n){return new pT(`Syntax Error: ${n}`,{source:t,positions:[e]})}var dT=class{constructor(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},Yf=class{constructor(t,e,n,r,i,o){this.kind=t,this.start=e,this.end=n,this.line=r,this.column=i,this.value=o,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}}},Kf={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"]},fT=new Set(Object.keys(Kf));function od(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&fT.has(e)}var Pn;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Pn||(Pn={}));var xl;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(xl||(xl={}));var F;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(F||(F={}));function Nl(t){return t===9||t===32}function Ur(t){return t>=48&&t<=57}function _f(t){return t>=97&&t<=122||t>=65&&t<=90}function Hf(t){return _f(t)||t===95}function mT(t){return _f(t)||Ur(t)||t===95}function yT(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<t.length;++s){var o;let a=t[s],c=gT(a);c!==a.length&&(r=(o=r)!==null&&o!==void 0?o:s,i=s,s!==0&&c<n&&(n=c))}return t.map((s,a)=>a===0?s:s.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function gT(t){let e=0;for(;e<t.length&&Nl(t.charCodeAt(e));)++e;return e}function bT(t,e){let n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(f=>f.length===0||Nl(f.charCodeAt(0))),s=n.endsWith('\\"""'),a=t.endsWith('"')&&!s,c=t.endsWith("\\"),l=a||c,u=!i||t.length>70||l||o||s,h="",p=i&&Nl(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
|
|
355
355
|
`),h+=n,(u||l)&&(h+=`
|
|
356
|
-
`),'"""'+h+'"""'}var S;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(S||(S={}));var vT=class{constructor(t){let e=new
|
|
356
|
+
`),'"""'+h+'"""'}var S;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(S||(S={}));var vT=class{constructor(t){let e=new Yf(S.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,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!==S.EOF)do if(t.next)t=t.next;else{let e=wT(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===S.COMMENT);return t}};function ST(t){return t===S.BANG||t===S.DOLLAR||t===S.AMP||t===S.PAREN_L||t===S.PAREN_R||t===S.SPREAD||t===S.COLON||t===S.EQUALS||t===S.AT||t===S.BRACKET_L||t===S.BRACKET_R||t===S.BRACE_L||t===S.PIPE||t===S.BRACE_R}function Hn(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function Fo(t,e){return zf(t.charCodeAt(e))&&Bf(t.charCodeAt(e+1))}function zf(t){return t>=55296&&t<=56319}function Bf(t){return t>=56320&&t<=57343}function pn(t,e){let n=t.source.body.codePointAt(e);if(n===void 0)return S.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function It(t,e,n,r,i){let o=t.line,s=1+n-t.lineStart;return new Yf(e,n,r,o,s,i)}function wT(t,e){let n=t.source.body,r=n.length,i=e;for(;i<r;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return IT(t,i);case 33:return It(t,S.BANG,i,i+1);case 36:return It(t,S.DOLLAR,i,i+1);case 38:return It(t,S.AMP,i,i+1);case 40:return It(t,S.PAREN_L,i,i+1);case 41:return It(t,S.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return It(t,S.SPREAD,i,i+3);break;case 58:return It(t,S.COLON,i,i+1);case 61:return It(t,S.EQUALS,i,i+1);case 64:return It(t,S.AT,i,i+1);case 91:return It(t,S.BRACKET_L,i,i+1);case 93:return It(t,S.BRACKET_R,i,i+1);case 123:return It(t,S.BRACE_L,i,i+1);case 124:return It(t,S.PIPE,i,i+1);case 125:return It(t,S.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?kT(t,i):ET(t,i)}if(Ur(o)||o===45)return TT(t,i,o);if(Hf(o))return VT(t,i);throw Ct(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Hn(o)||Fo(n,i)?`Unexpected character: ${pn(t,i)}.`:`Invalid character: ${pn(t,i)}.`)}return It(t,S.EOF,r,r)}function IT(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(Hn(o))++i;else if(Fo(n,i))i+=2;else break}return It(t,S.COMMENT,e,i,n.slice(e+1,i))}function TT(t,e,n){let r=t.source.body,i=e,o=n,s=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),Ur(o))throw Ct(t.source,i,`Invalid number, unexpected digit after 0: ${pn(t,i)}.`)}else i=_a(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=_a(t,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(s=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=_a(t,i,o),o=r.charCodeAt(i)),o===46||Hf(o))throw Ct(t.source,i,`Invalid number, expected digit but got: ${pn(t,i)}.`);return It(t,s?S.FLOAT:S.INT,e,i,r.slice(e,i))}function _a(t,e,n){if(!Ur(n))throw Ct(t.source,e,`Invalid number, expected digit but got: ${pn(t,e)}.`);let r=t.source.body,i=e+1;for(;Ur(r.charCodeAt(i));)++i;return i}function ET(t,e){let n=t.source.body,r=n.length,i=e+1,o=i,s="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return s+=n.slice(o,i),It(t,S.STRING,e,i+1,s);if(a===92){s+=n.slice(o,i);let c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?RT(t,i):CT(t,i):ZT(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(Hn(a))++i;else if(Fo(n,i))i+=2;else throw Ct(t.source,i,`Invalid character within String: ${pn(t,i)}.`)}throw Ct(t.source,i,"Unterminated string.")}function RT(t,e){let n=t.source.body,r=0,i=3;for(;i<12;){let o=n.charCodeAt(e+i++);if(o===125){if(i<5||!Hn(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|kr(o),r<0)break}throw Ct(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function CT(t,e){let n=t.source.body,r=sd(n,e+2);if(Hn(r))return{value:String.fromCodePoint(r),size:6};if(zf(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=sd(n,e+8);if(Bf(i))return{value:String.fromCodePoint(r,i),size:12}}throw Ct(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function sd(t,e){return kr(t.charCodeAt(e))<<12|kr(t.charCodeAt(e+1))<<8|kr(t.charCodeAt(e+2))<<4|kr(t.charCodeAt(e+3))}function kr(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function ZT(t,e){let n=t.source.body;switch(n.charCodeAt(e+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:`
|
|
357
357
|
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Ct(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function kT(t,e){let n=t.source.body,r=n.length,i=t.lineStart,o=e+3,s=o,a="",c=[];for(;o<r;){let l=n.charCodeAt(o);if(l===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){a+=n.slice(s,o),c.push(a);let u=It(t,S.BLOCK_STRING,e,o+3,yT(c).join(`
|
|
358
|
-
`));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(Hn(l))++o;else if(Fo(n,o))o+=2;else throw Ct(t.source,o,`Invalid character within String: ${pn(t,o)}.`)}throw Ct(t.source,o,"Unterminated string.")}function VT(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(mT(o))++i;else break}return It(t,S.NAME,e,i,n.slice(e,i))}var xT=10,
|
|
358
|
+
`));return t.line+=c.length-1,t.lineStart=i,u}if(l===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){a+=n.slice(s,o),s=o+1,o+=4;continue}if(l===10||l===13){a+=n.slice(s,o),c.push(a),l===13&&n.charCodeAt(o+1)===10?o+=2:++o,a="",s=o,i=o;continue}if(Hn(l))++o;else if(Fo(n,o))o+=2;else throw Ct(t.source,o,`Invalid character within String: ${pn(t,o)}.`)}throw Ct(t.source,o,"Unterminated string.")}function VT(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(mT(o))++i;else break}return It(t,S.NAME,e,i,n.slice(e,i))}var xT=10,jf=2;function lc(t){return Ao(t,[])}function Ao(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return NT(t,e);default:return String(t)}}function NT(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(OT(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:Ao(r,n)}else if(Array.isArray(t))return LT(t,n);return GT(t,n)}function OT(t){return typeof t.toJSON=="function"}function GT(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>jf?"["+XT(t)+"]":"{ "+n.map(([r,i])=>r+": "+Ao(i,e)).join(", ")+" }"}function LT(t,e){if(t.length===0)return"[]";if(e.length>jf)return"[Array]";let n=Math.min(xT,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(Ao(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function XT(t){let e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){let n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}var WT=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;let r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){let o=lc(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
|
|
359
359
|
|
|
360
360
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
361
361
|
directory. If different versions of "graphql" are the dependencies of other
|
|
@@ -366,7 +366,7 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
|
366
366
|
Duplicate "graphql" modules cannot be used at the same time since different
|
|
367
367
|
versions may have different capabilities and behavior. The data from one
|
|
368
368
|
version used in the function from another could produce confusing and
|
|
369
|
-
spurious results.`)}}return!1},Io=class{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||co(!1,`Body must be a string. Received: ${lc(e)}.`),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||co(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||co(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function UT(t){return WT(t,Io)}function cc(t,e){return new MT(t,e).parseDocument()}var MT=class{constructor(t,e={}){let n=UT(t)?t:new Io(t);this.l=new vT(n),this.Rn=e,this.er=0}parseName(){let t=this.expectToken(S.NAME);return this.node(t,{kind:F.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:F.DOCUMENT,definitions:this.many(S.SOF,this.parseDefinition,S.EOF)})}parseDefinition(){if(this.peek(S.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===S.NAME){switch(e.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 Ct(this.l.source,this.l.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.l.token;if(this.peek(S.BRACE_L))return this.node(t,{kind:F.OPERATION_DEFINITION,operation:Pn.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(S.NAME)&&(n=this.parseName()),this.node(t,{kind:F.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(S.NAME);switch(t.value){case"query":return Pn.QUERY;case"mutation":return Pn.MUTATION;case"subscription":return Pn.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(S.PAREN_L,this.parseVariableDefinition,S.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:F.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(S.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(S.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(S.DOLLAR),this.node(t,{kind:F.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:F.SELECTION_SET,selections:this.many(S.BRACE_L,this.parseSelection,S.BRACE_R)})}parseSelection(){return this.peek(S.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(S.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:F.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(S.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(S.PAREN_L,e,S.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(S.COLON),this.node(e,{kind:F.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.l.token;this.expectToken(S.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(S.NAME)?this.node(t,{kind:F.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:F.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.l.token;return this.expectKeyword("fragment"),this.Rn.allowLegacyFragmentVariables===!0?this.node(t,{kind:F.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:F.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.l.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.l.token;switch(e.kind){case S.BRACKET_L:return this.parseList(t);case S.BRACE_L:return this.parseObject(t);case S.INT:return this.advanceLexer(),this.node(e,{kind:F.INT,value:e.value});case S.FLOAT:return this.advanceLexer(),this.node(e,{kind:F.FLOAT,value:e.value});case S.STRING:case S.BLOCK_STRING:return this.parseStringLiteral();case S.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:F.BOOLEAN,value:!0});case"false":return this.node(e,{kind:F.BOOLEAN,value:!1});case"null":return this.node(e,{kind:F.NULL});default:return this.node(e,{kind:F.ENUM,value:e.value})}case S.DOLLAR:if(t)if(this.expectToken(S.DOLLAR),this.l.token.kind===S.NAME){let n=this.l.token.value;throw Ct(this.l.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.l.token;return this.advanceLexer(),this.node(t,{kind:F.STRING,value:t.value,block:t.kind===S.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:F.LIST,values:this.any(S.BRACKET_L,e,S.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:F.OBJECT,fields:this.any(S.BRACE_L,e,S.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(S.COLON),this.node(e,{kind:F.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(S.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(S.AT),this.node(e,{kind:F.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(S.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(S.BRACKET_R),e=this.node(t,{kind:F.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(S.BANG)?this.node(t,{kind:F.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.l.token,{kind:F.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(S.STRING)||this.peek(S.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);return this.node(t,{kind:F.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.l.token,e=this.parseOperationType();this.expectToken(S.COLON);let n=this.parseNamedType();return this.node(t,{kind:F.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:F.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(S.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseFieldDefinition,S.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(S.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:F.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(S.PAREN_L,this.parseInputValueDef,S.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(S.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(S.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:F.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:F.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(S.EQUALS)?this.delimitedMany(S.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:F.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(S.BRACE_L,this.parseEnumValueDefinition,S.BRACE_R)}parseEnumValueDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:F.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.l.token.value==="true"||this.l.token.value==="false"||this.l.token.value==="null")throw Ct(this.l.source,this.l.token.start,`${zi(this.l.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseInputValueDef,S.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===S.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(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(S.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:F.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(S.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(xl,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Rn.noLocation!==!0&&(e.loc=new dT(t,this.l.lastToken,this.l.source)),e}peek(t){return this.l.token.kind===t}expectToken(t){let e=this.l.token;if(e.kind===t)return this.advanceLexer(),e;throw Ct(this.l.source,e.start,`Expected ${$f(t)}, found ${zi(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===S.NAME&&e.value===t)this.advanceLexer();else throw Ct(this.l.source,e.start,`Expected "${t}", found ${zi(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===S.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Ct(this.l.source,e.start,`Unexpected ${zi(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.Rn,e=this.l.advance();if(t!==void 0&&e.kind!==S.EOF&&(++this.er,this.er>t))throw Ct(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function zi(t){let e=t.value;return $f(t.kind)+(e!=null?` "${e}"`:"")}function $f(t){return ST(t)?`"${t}"`:t}function PT(t){return`"${t.replace(FT,AT)}"`}var FT=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function AT(t){return JT[t.charCodeAt(0)]}var JT=["\\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"],DT=Object.freeze({});function YT(t,e,n=_f){let r=new Map;for(let v of Object.values(F))r.set(v,KT(e,v));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let v=a===s.length,I=v&&c.length!==0;if(v){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),I)if(o){l=l.slice();let E=0;for(let[T,V]of c){let N=T-E;V===null?(l.splice(N,1),E++):l[N]=V}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[E,T]of c)l[E]=T}a=i.index,s=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(h){if(u=o?a:s[a],l=h[u],l==null)continue;p.push(u)}let R;if(!Array.isArray(l)){var m,d;sd(l)||co(!1,`Invalid AST Node: ${lc(l)}.`);let E=v?(m=r.get(l.kind))===null||m===void 0?void 0:m.leave:(d=r.get(l.kind))===null||d===void 0?void 0:d.enter;if(R=E==null?void 0:E.call(e,l,u,h,p,f),R===DT)break;if(R===!1){if(!v){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!v))if(sd(R))l=R;else{p.pop();continue}}if(R===void 0&&I&&c.push([u,l]),v)p.pop();else{var b;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(b=n[l.kind])!==null&&b!==void 0?b:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function KT(t,e){let n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function _T(t){return YT(t,zT)}var HT=80,zT={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>L(t.definitions,`
|
|
369
|
+
spurious results.`)}}return!1},Io=class{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||co(!1,`Body must be a string. Received: ${lc(e)}.`),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||co(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||co(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function UT(t){return WT(t,Io)}function cc(t,e){return new MT(t,e).parseDocument()}var MT=class{constructor(t,e={}){let n=UT(t)?t:new Io(t);this.l=new vT(n),this.Rn=e,this.er=0}parseName(){let t=this.expectToken(S.NAME);return this.node(t,{kind:F.NAME,value:t.value})}parseDocument(){return this.node(this.l.token,{kind:F.DOCUMENT,definitions:this.many(S.SOF,this.parseDefinition,S.EOF)})}parseDefinition(){if(this.peek(S.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),e=t?this.l.lookahead():this.l.token;if(e.kind===S.NAME){switch(e.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 Ct(this.l.source,this.l.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){let t=this.l.token;if(this.peek(S.BRACE_L))return this.node(t,{kind:F.OPERATION_DEFINITION,operation:Pn.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let e=this.parseOperationType(),n;return this.peek(S.NAME)&&(n=this.parseName()),this.node(t,{kind:F.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(S.NAME);switch(t.value){case"query":return Pn.QUERY;case"mutation":return Pn.MUTATION;case"subscription":return Pn.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(S.PAREN_L,this.parseVariableDefinition,S.PAREN_R)}parseVariableDefinition(){return this.node(this.l.token,{kind:F.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(S.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(S.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this.l.token;return this.expectToken(S.DOLLAR),this.node(t,{kind:F.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this.l.token,{kind:F.SELECTION_SET,selections:this.many(S.BRACE_L,this.parseSelection,S.BRACE_R)})}parseSelection(){return this.peek(S.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this.l.token,e=this.parseName(),n,r;return this.expectOptionalToken(S.COLON)?(n=e,r=this.parseName()):r=e,this.node(t,{kind:F.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(S.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let e=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(S.PAREN_L,e,S.PAREN_R)}parseArgument(t=!1){let e=this.l.token,n=this.parseName();return this.expectToken(S.COLON),this.node(e,{kind:F.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this.l.token;this.expectToken(S.SPREAD);let e=this.expectOptionalKeyword("on");return!e&&this.peek(S.NAME)?this.node(t,{kind:F.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:F.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this.l.token;return this.expectKeyword("fragment"),this.Rn.allowLegacyFragmentVariables===!0?this.node(t,{kind:F.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:F.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this.l.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let e=this.l.token;switch(e.kind){case S.BRACKET_L:return this.parseList(t);case S.BRACE_L:return this.parseObject(t);case S.INT:return this.advanceLexer(),this.node(e,{kind:F.INT,value:e.value});case S.FLOAT:return this.advanceLexer(),this.node(e,{kind:F.FLOAT,value:e.value});case S.STRING:case S.BLOCK_STRING:return this.parseStringLiteral();case S.NAME:switch(this.advanceLexer(),e.value){case"true":return this.node(e,{kind:F.BOOLEAN,value:!0});case"false":return this.node(e,{kind:F.BOOLEAN,value:!1});case"null":return this.node(e,{kind:F.NULL});default:return this.node(e,{kind:F.ENUM,value:e.value})}case S.DOLLAR:if(t)if(this.expectToken(S.DOLLAR),this.l.token.kind===S.NAME){let n=this.l.token.value;throw Ct(this.l.source,e.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(e);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this.l.token;return this.advanceLexer(),this.node(t,{kind:F.STRING,value:t.value,block:t.kind===S.BLOCK_STRING})}parseList(t){let e=()=>this.parseValueLiteral(t);return this.node(this.l.token,{kind:F.LIST,values:this.any(S.BRACKET_L,e,S.BRACKET_R)})}parseObject(t){let e=()=>this.parseObjectField(t);return this.node(this.l.token,{kind:F.OBJECT,fields:this.any(S.BRACE_L,e,S.BRACE_R)})}parseObjectField(t){let e=this.l.token,n=this.parseName();return this.expectToken(S.COLON),this.node(e,{kind:F.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){let e=[];for(;this.peek(S.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let e=this.l.token;return this.expectToken(S.AT),this.node(e,{kind:F.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this.l.token,e;if(this.expectOptionalToken(S.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(S.BRACKET_R),e=this.node(t,{kind:F.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(S.BANG)?this.node(t,{kind:F.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this.l.token,{kind:F.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(S.STRING)||this.peek(S.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);return this.node(t,{kind:F.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let t=this.l.token,e=this.parseOperationType();this.expectToken(S.COLON);let n=this.parseNamedType();return this.node(t,{kind:F.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:F.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:r})}parseObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(S.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseFieldDefinition,S.BRACE_R)}parseFieldDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(S.COLON);let i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:F.FIELD_DEFINITION,description:e,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(S.PAREN_L,this.parseInputValueDef,S.PAREN_R)}parseInputValueDef(){let t=this.l.token,e=this.parseDescription(),n=this.parseName();this.expectToken(S.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(S.EQUALS)&&(i=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:F.INPUT_VALUE_DEFINITION,description:e,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:F.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:F.UNION_TYPE_DEFINITION,description:e,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(S.EQUALS)?this.delimitedMany(S.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:F.ENUM_TYPE_DEFINITION,description:e,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(S.BRACE_L,this.parseEnumValueDefinition,S.BRACE_R)}parseEnumValueDefinition(){let t=this.l.token,e=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:F.ENUM_VALUE_DEFINITION,description:e,name:n,directives:r})}parseEnumValueName(){if(this.l.token.value==="true"||this.l.token.value==="false"||this.l.token.value==="null")throw Ct(this.l.source,this.l.token.start,`${zi(this.l.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseInputValueDef,S.BRACE_R)}parseTypeSystemExtension(){let t=this.l.lookahead();if(t.kind===S.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(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("schema");let e=this.parseConstDirectives(),n=this.optionalMany(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);if(e.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let e=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:F.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("type");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("interface");let e=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:F.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("union");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.UNION_TYPE_EXTENSION,name:e,directives:n,types:r})}parseEnumTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("enum");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.ENUM_TYPE_EXTENSION,name:e,directives:n,values:r})}parseInputObjectTypeExtension(){let t=this.l.token;this.expectKeyword("extend"),this.expectKeyword("input");let e=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:F.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:r})}parseDirectiveDefinition(){let t=this.l.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(S.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:F.DIRECTIVE_DEFINITION,description:e,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(S.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this.l.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(xl,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Rn.noLocation!==!0&&(e.loc=new dT(t,this.l.lastToken,this.l.source)),e}peek(t){return this.l.token.kind===t}expectToken(t){let e=this.l.token;if(e.kind===t)return this.advanceLexer(),e;throw Ct(this.l.source,e.start,`Expected ${Qf(t)}, found ${zi(e)}.`)}expectOptionalToken(t){return this.l.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let e=this.l.token;if(e.kind===S.NAME&&e.value===t)this.advanceLexer();else throw Ct(this.l.source,e.start,`Expected "${t}", found ${zi(e)}.`)}expectOptionalKeyword(t){let e=this.l.token;return e.kind===S.NAME&&e.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let e=t!=null?t:this.l.token;return Ct(this.l.source,e.start,`Unexpected ${zi(e)}.`)}any(t,e,n){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(n);)r.push(e.call(this));return r}optionalMany(t,e,n){if(this.expectOptionalToken(t)){let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,e,n){this.expectToken(t);let r=[];do r.push(e.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,e){this.expectOptionalToken(t);let n=[];do n.push(e.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){let{maxTokens:t}=this.Rn,e=this.l.advance();if(t!==void 0&&e.kind!==S.EOF&&(++this.er,this.er>t))throw Ct(this.l.source,e.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function zi(t){let e=t.value;return Qf(t.kind)+(e!=null?` "${e}"`:"")}function Qf(t){return ST(t)?`"${t}"`:t}function PT(t){return`"${t.replace(FT,AT)}"`}var FT=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function AT(t){return JT[t.charCodeAt(0)]}var JT=["\\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"],DT=Object.freeze({});function YT(t,e,n=Kf){let r=new Map;for(let v of Object.values(F))r.set(v,KT(e,v));let i,o=Array.isArray(t),s=[t],a=-1,c=[],l=t,u,h,p=[],f=[];do{a++;let v=a===s.length,I=v&&c.length!==0;if(v){if(u=f.length===0?void 0:p[p.length-1],l=h,h=f.pop(),I)if(o){l=l.slice();let E=0;for(let[T,V]of c){let N=T-E;V===null?(l.splice(N,1),E++):l[N]=V}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(let[E,T]of c)l[E]=T}a=i.index,s=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(h){if(u=o?a:s[a],l=h[u],l==null)continue;p.push(u)}let R;if(!Array.isArray(l)){var m,d;od(l)||co(!1,`Invalid AST Node: ${lc(l)}.`);let E=v?(m=r.get(l.kind))===null||m===void 0?void 0:m.leave:(d=r.get(l.kind))===null||d===void 0?void 0:d.enter;if(R=E==null?void 0:E.call(e,l,u,h,p,f),R===DT)break;if(R===!1){if(!v){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!v))if(od(R))l=R;else{p.pop();continue}}if(R===void 0&&I&&c.push([u,l]),v)p.pop();else{var b;i={inArray:o,index:a,keys:s,edits:c,prev:i},o=Array.isArray(l),s=o?l:(b=n[l.kind])!==null&&b!==void 0?b:[],a=-1,c=[],h&&f.push(h),h=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function KT(t,e){let n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function _T(t){return YT(t,zT)}var HT=80,zT={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>L(t.definitions,`
|
|
370
370
|
|
|
371
371
|
`)},OperationDefinition:{leave(t){let e=B("(",L(t.variableDefinitions,", "),")"),n=L([t.operation,L([t.name,e]),L(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+B(" = ",n)+B(" ",L(r," "))},SelectionSet:{leave:({selections:t})=>se(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){let o=B("",t,": ")+e,s=o+B("(",L(n,", "),")");return s.length>HT&&(s=o+B(`(
|
|
372
372
|
`,uo(L(n,`
|
|
@@ -375,7 +375,7 @@ spurious results.`)}}return!1},Io=class{constructor(e,n="GraphQL request",r={lin
|
|
|
375
375
|
`)+L(["schema",L(e," "),se(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>B("",t,`
|
|
376
376
|
`)+L(["scalar",e,L(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>B("",t,`
|
|
377
377
|
`)+L(["type",e,B("implements ",L(n," & ")),L(r," "),se(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>B("",t,`
|
|
378
|
-
`)+e+(
|
|
378
|
+
`)+e+(ad(n)?B(`(
|
|
379
379
|
`,uo(L(n,`
|
|
380
380
|
`)),`
|
|
381
381
|
)`):B("(",L(n,", "),")"))+": "+r+B(" ",L(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>B("",t,`
|
|
@@ -385,17 +385,17 @@ spurious results.`)}}return!1},Io=class{constructor(e,n="GraphQL request",r={lin
|
|
|
385
385
|
`)+L(["enum",e,L(n," "),se(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>B("",t,`
|
|
386
386
|
`)+L([e,L(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>B("",t,`
|
|
387
387
|
`)+L(["input",e,L(n," "),se(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>B("",t,`
|
|
388
|
-
`)+"directive @"+e+(
|
|
388
|
+
`)+"directive @"+e+(ad(n)?B(`(
|
|
389
389
|
`,uo(L(n,`
|
|
390
390
|
`)),`
|
|
391
391
|
)`):B("(",L(n,", "),")"))+(r?" repeatable":"")+" on "+L(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>L(["extend schema",L(t," "),se(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>L(["extend scalar",t,L(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>L(["extend type",t,B("implements ",L(e," & ")),L(n," "),se(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>L(["extend interface",t,B("implements ",L(e," & ")),L(n," "),se(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>L(["extend union",t,L(e," "),B("= ",L(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>L(["extend enum",t,L(e," "),se(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>L(["extend input",t,L(e," "),se(n)]," ")}};function L(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function se(t){return B(`{
|
|
392
392
|
`,uo(L(t,`
|
|
393
393
|
`)),`
|
|
394
394
|
}`)}function B(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function uo(t){return B(" ",t.replace(/\n/g,`
|
|
395
|
-
`))}function
|
|
396
|
-
`)))!==null&&e!==void 0?e:!1}var uc=JSON,BT=t=>t.toUpperCase(),jT=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},QT=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},$T=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},qT=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},cd=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},Ha=t=>{if(typeof t=="string"){let n;try{let r=cc(t);n=cd(r)}catch(r){}return{query:t,operationName:n}}let e=cd(t);return{query:_T(t),operationName:e}},qf=class ho extends Error{constructor(e,n){let r=`${ho.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,ho.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ho)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},hc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ol={exports:{}};(function(t,e){var n=typeof self<"u"?self:hc,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var g={next:function(){var Z=y.shift();return{done:Z===void 0,value:Z}}};return a.iterable&&(g[Symbol.iterator]=function(){return g}),g}function m(y){this.map={},y instanceof m?y.forEach(function(g,Z){this.append(Z,g)},this):Array.isArray(y)?y.forEach(function(g){this.append(g[0],g[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(g){this.append(g,y[g])},this)}m.prototype.append=function(y,g){y=h(y),g=p(g);var Z=this.map[y];this.map[y]=Z?Z+", "+g:g},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,g){this.map[h(y)]=p(g)},m.prototype.forEach=function(y,g){for(var Z in this.map)this.map.hasOwnProperty(Z)&&y.call(g,this.map[Z],Z,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(g,Z){y.push(Z)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(g){y.push(g)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(g,Z){y.push([Z,g])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function b(y){return new Promise(function(g,Z){y.onload=function(){g(y.result)},y.onerror=function(){Z(y.error)}})}function v(y){var g=new FileReader,Z=b(g);return g.readAsArrayBuffer(y),Z}function I(y){var g=new FileReader,Z=b(g);return g.readAsText(y),Z}function R(y){for(var g=new Uint8Array(y),Z=new Array(g.length),D=0;D<g.length;D++)Z[D]=String.fromCharCode(g[D]);return Z.join("")}function E(y){if(y.slice)return y.slice(0);var g=new Uint8Array(y.byteLength);return g.set(new Uint8Array(y)),g.buffer}function T(){return this.bodyUsed=!1,this.nr=function(y){this._t=y,y?typeof y=="string"?this.tn=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.oe=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.rr=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.tn=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.H=E(y.buffer),this._t=new Blob([this.H])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.H=E(y):this.tn=y=Object.prototype.toString.call(y):this.tn="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.oe&&this.oe.type?this.headers.set("content-type",this.oe.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.oe)return Promise.resolve(this.oe);if(this.H)return Promise.resolve(new Blob([this.H]));if(this.rr)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.tn]))},this.arrayBuffer=function(){return this.H?d(this)||Promise.resolve(this.H):this.blob().then(v)}),this.text=function(){var y=d(this);if(y)return y;if(this.oe)return I(this.oe);if(this.H)return Promise.resolve(R(this.H));if(this.rr)throw new Error("could not read FormData body as text");return Promise.resolve(this.tn)},a.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var V=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function N(y){var g=y.toUpperCase();return V.indexOf(g)>-1?g:y}function U(y,g){g=g||{};var Z=g.body;if(y instanceof U){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,g.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!Z&&y._t!=null&&(Z=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new m(g.headers)),this.method=N(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");this.nr(Z)}U.prototype.clone=function(){return new U(this,{body:this._t})};function C(y){var g=new FormData;return y.trim().split("&").forEach(function(Z){if(Z){var D=Z.split("="),P=D.shift().replace(/\+/g," "),O=D.join("=").replace(/\+/g," ");g.append(decodeURIComponent(P),decodeURIComponent(O))}}),g}function x(y){var g=new m,Z=y.replace(/\r?\n[\t ]+/g," ");return Z.split(/\r?\n/).forEach(function(D){var P=D.split(":"),O=P.shift().trim();if(O){var it=P.join(":").trim();g.append(O,it)}}),g}T.call(U.prototype);function M(y,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new m(g.headers),this.url=g.url||"",this.nr(y)}T.call(M.prototype),M.prototype.clone=function(){return new M(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},M.error=function(){var y=new M(null,{status:0,statusText:""});return y.type="error",y};var ot=[301,302,303,307,308];M.redirect=function(y,g){if(ot.indexOf(g)===-1)throw new RangeError("Invalid status code");return new M(null,{status:g,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(g,Z){this.message=g,this.name=Z;var D=Error(g);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function lt(y,g){return new Promise(function(Z,D){var P=new U(y,g);if(P.signal&&P.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function it(){O.abort()}O.onload=function(){var ct={status:O.status,statusText:O.statusText,headers:x(O.getAllResponseHeaders()||"")};ct.url="responseURL"in O?O.responseURL:ct.headers.get("X-Request-URL");var Ot="response"in O?O.response:O.responseText;Z(new M(Ot,ct))},O.onerror=function(){D(new TypeError("Network request failed"))},O.ontimeout=function(){D(new TypeError("Network request failed"))},O.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},O.open(P.method,P.url,!0),P.credentials==="include"?O.withCredentials=!0:P.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&a.blob&&(O.responseType="blob"),P.headers.forEach(function(ct,Ot){O.setRequestHeader(Ot,ct)}),P.signal&&(P.signal.addEventListener("abort",it),O.onreadystatechange=function(){O.readyState===4&&P.signal.removeEventListener("abort",it)}),O.send(typeof P._t>"u"?null:P._t)})}return lt.polyfill=!0,o.fetch||(o.fetch=lt,o.Headers=m,o.Request=U,o.Response=M),s.Headers=m,s.Request=U,s.Response=M,s.fetch=lt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(Ol,Ol.exports);var To=Ol.exports,po=pc(To),tE=sT({__proto__:null,default:po},[To]),Xn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||tE&&To.Headers&&t instanceof To.Headers?e=jT(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},ud=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),eE=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(ud(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:ud(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},nE=t=>e=>Dn(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=j({},e.headers),h="",p;t==="POST"?(p=iE(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=eE({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:uc});let f=j({method:t,headers:u,body:p},c),m=r,d=f;if(l){let b=yield Promise.resolve(l(An(j({},f),{url:r,operationName:s,variables:o}))),{url:v}=b,I=xr(b,["url"]);m=v,d=I}return h&&(m=`${m}?${h}`),yield a(m,d)}),rE=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>Dn(this,null,function*(){let[r,i,o]=n,s=$T(r,i,o),a=this.requestConfig,{headers:c,fetch:l=po,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=xr(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=Ha(s.query);return za({url:m,query:s.query,variables:s.variables,headers:j(j({},Xn(Ba(c))),Xn(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(b=>(p&&p(b),b)).catch(b=>{throw p&&p(b),b})})}request(t,...e){return Dn(this,null,function*(){let[n,r]=e,i=QT(t,n,r),o=this.requestConfig,{headers:s,fetch:a=po,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=xr(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=Ha(i.document);return za({url:p,query:f,variables:i.variables,headers:j(j({},Xn(Ba(s))),Xn(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=qT(t,e),i=this.requestConfig,{headers:o}=i,s=xr(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>Ha(l).query),c=r.documents.map(({variables:l})=>l);return za({url:this.url,query:a,variables:c,headers:j(j({},Xn(Ba(o))),Xn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:po,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},za=t=>Dn(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=nE(BT((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield oE(c,(n=o.jsonSerializer)!=null?n:uc),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=xr(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return An(j({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new qf(An(j({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),iE=(t,e,n,r)=>{let i=r!=null?r:uc;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},oE=(t,e)=>Dn(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),Ba=t=>typeof t=="function"?t():t,Gl={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(Gl,Gl.exports);var sE=Gl.exports,sn=pc(sE),Eo=function(){return Eo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Eo.apply(this,arguments)},fo=new Map,Ll=new Map,tm=!0,Ro=!1;function em(t){return t.replace(/[\s,]+/g," ").trim()}function aE(t){return em(t.source.body.substring(t.start,t.end))}function lE(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=aE(r.loc),s=Ll.get(i);s&&!s.has(o)?tm&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
395
|
+
`))}function ad(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
|
|
396
|
+
`)))!==null&&e!==void 0?e:!1}var uc=JSON,BT=t=>t.toUpperCase(),jT=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},QT=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},$T=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},qT=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},ld=t=>{var e,n;let r,i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},Ha=t=>{if(typeof t=="string"){let n;try{let r=cc(t);n=ld(r)}catch(r){}return{query:t,operationName:n}}let e=ld(t);return{query:_T(t),operationName:e}},$f=class ho extends Error{constructor(e,n){let r=`${ho.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,ho.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ho)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}},hc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ol={exports:{}};(function(t,e){var n=typeof self<"u"?self:hc,r=(function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o})();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch(y){return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(y){return y&&l.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function p(y){return typeof y!="string"&&(y=String(y)),y}function f(y){var g={next:function(){var Z=y.shift();return{done:Z===void 0,value:Z}}};return a.iterable&&(g[Symbol.iterator]=function(){return g}),g}function m(y){this.map={},y instanceof m?y.forEach(function(g,Z){this.append(Z,g)},this):Array.isArray(y)?y.forEach(function(g){this.append(g[0],g[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(g){this.append(g,y[g])},this)}m.prototype.append=function(y,g){y=h(y),g=p(g);var Z=this.map[y];this.map[y]=Z?Z+", "+g:g},m.prototype.delete=function(y){delete this.map[h(y)]},m.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},m.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},m.prototype.set=function(y,g){this.map[h(y)]=p(g)},m.prototype.forEach=function(y,g){for(var Z in this.map)this.map.hasOwnProperty(Z)&&y.call(g,this.map[Z],Z,this)},m.prototype.keys=function(){var y=[];return this.forEach(function(g,Z){y.push(Z)}),f(y)},m.prototype.values=function(){var y=[];return this.forEach(function(g){y.push(g)}),f(y)},m.prototype.entries=function(){var y=[];return this.forEach(function(g,Z){y.push([Z,g])}),f(y)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function d(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function b(y){return new Promise(function(g,Z){y.onload=function(){g(y.result)},y.onerror=function(){Z(y.error)}})}function v(y){var g=new FileReader,Z=b(g);return g.readAsArrayBuffer(y),Z}function I(y){var g=new FileReader,Z=b(g);return g.readAsText(y),Z}function R(y){for(var g=new Uint8Array(y),Z=new Array(g.length),D=0;D<g.length;D++)Z[D]=String.fromCharCode(g[D]);return Z.join("")}function E(y){if(y.slice)return y.slice(0);var g=new Uint8Array(y.byteLength);return g.set(new Uint8Array(y)),g.buffer}function T(){return this.bodyUsed=!1,this.nr=function(y){this._t=y,y?typeof y=="string"?this.tn=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this.oe=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this.rr=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this.tn=y.toString():a.arrayBuffer&&a.blob&&c(y)?(this.H=E(y.buffer),this._t=new Blob([this.H])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||u(y))?this.H=E(y):this.tn=y=Object.prototype.toString.call(y):this.tn="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this.oe&&this.oe.type?this.headers.set("content-type",this.oe.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=d(this);if(y)return y;if(this.oe)return Promise.resolve(this.oe);if(this.H)return Promise.resolve(new Blob([this.H]));if(this.rr)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this.tn]))},this.arrayBuffer=function(){return this.H?d(this)||Promise.resolve(this.H):this.blob().then(v)}),this.text=function(){var y=d(this);if(y)return y;if(this.oe)return I(this.oe);if(this.H)return Promise.resolve(R(this.H));if(this.rr)throw new Error("could not read FormData body as text");return Promise.resolve(this.tn)},a.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var V=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function N(y){var g=y.toUpperCase();return V.indexOf(g)>-1?g:y}function U(y,g){g=g||{};var Z=g.body;if(y instanceof U){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,g.headers||(this.headers=new m(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!Z&&y._t!=null&&(Z=y._t,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new m(g.headers)),this.method=N(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");this.nr(Z)}U.prototype.clone=function(){return new U(this,{body:this._t})};function C(y){var g=new FormData;return y.trim().split("&").forEach(function(Z){if(Z){var D=Z.split("="),P=D.shift().replace(/\+/g," "),O=D.join("=").replace(/\+/g," ");g.append(decodeURIComponent(P),decodeURIComponent(O))}}),g}function x(y){var g=new m,Z=y.replace(/\r?\n[\t ]+/g," ");return Z.split(/\r?\n/).forEach(function(D){var P=D.split(":"),O=P.shift().trim();if(O){var it=P.join(":").trim();g.append(O,it)}}),g}T.call(U.prototype);function M(y,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new m(g.headers),this.url=g.url||"",this.nr(y)}T.call(M.prototype),M.prototype.clone=function(){return new M(this._t,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},M.error=function(){var y=new M(null,{status:0,statusText:""});return y.type="error",y};var ot=[301,302,303,307,308];M.redirect=function(y,g){if(ot.indexOf(g)===-1)throw new RangeError("Invalid status code");return new M(null,{status:g,headers:{location:y}})},s.DOMException=o.DOMException;try{new s.DOMException}catch(y){s.DOMException=function(g,Z){this.message=g,this.name=Z;var D=Error(g);this.stack=D.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function lt(y,g){return new Promise(function(Z,D){var P=new U(y,g);if(P.signal&&P.signal.aborted)return D(new s.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function it(){O.abort()}O.onload=function(){var ct={status:O.status,statusText:O.statusText,headers:x(O.getAllResponseHeaders()||"")};ct.url="responseURL"in O?O.responseURL:ct.headers.get("X-Request-URL");var Ot="response"in O?O.response:O.responseText;Z(new M(Ot,ct))},O.onerror=function(){D(new TypeError("Network request failed"))},O.ontimeout=function(){D(new TypeError("Network request failed"))},O.onabort=function(){D(new s.DOMException("Aborted","AbortError"))},O.open(P.method,P.url,!0),P.credentials==="include"?O.withCredentials=!0:P.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&a.blob&&(O.responseType="blob"),P.headers.forEach(function(ct,Ot){O.setRequestHeader(Ot,ct)}),P.signal&&(P.signal.addEventListener("abort",it),O.onreadystatechange=function(){O.readyState===4&&P.signal.removeEventListener("abort",it)}),O.send(typeof P._t>"u"?null:P._t)})}return lt.polyfill=!0,o.fetch||(o.fetch=lt,o.Headers=m,o.Request=U,o.Response=M),s.Headers=m,s.Request=U,s.Response=M,s.fetch=lt,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(Ol,Ol.exports);var To=Ol.exports,po=pc(To),tE=sT({__proto__:null,default:po},[To]),Xn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||tE&&To.Headers&&t instanceof To.Headers?e=jT(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},cd=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),eE=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(cd(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");let e=t,n=t.query.reduce((r,i,o)=>(r.push({query:cd(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},nE=t=>e=>Dn(void 0,null,function*(){var n;let{url:r,query:i,variables:o,operationName:s,fetch:a,fetchOptions:c,middleware:l}=e,u=j({},e.headers),h="",p;t==="POST"?(p=iE(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=eE({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:uc});let f=j({method:t,headers:u,body:p},c),m=r,d=f;if(l){let b=yield Promise.resolve(l(An(j({},f),{url:r,operationName:s,variables:o}))),{url:v}=b,I=xr(b,["url"]);m=v,d=I}return h&&(m=`${m}?${h}`),yield a(m,d)}),rE=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>Dn(this,null,function*(){let[r,i,o]=n,s=$T(r,i,o),a=this.requestConfig,{headers:c,fetch:l=po,method:u="POST",requestMiddleware:h,responseMiddleware:p}=a,f=xr(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;s.signal!==void 0&&(f.signal=s.signal);let{operationName:d}=Ha(s.query);return za({url:m,query:s.query,variables:s.variables,headers:j(j({},Xn(Ba(c))),Xn(s.requestHeaders)),operationName:d,fetch:l,method:u,fetchOptions:f,middleware:h}).then(b=>(p&&p(b),b)).catch(b=>{throw p&&p(b),b})})}request(t,...e){return Dn(this,null,function*(){let[n,r]=e,i=QT(t,n,r),o=this.requestConfig,{headers:s,fetch:a=po,method:c="POST",requestMiddleware:l,responseMiddleware:u}=o,h=xr(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;i.signal!==void 0&&(h.signal=i.signal);let{query:f,operationName:m}=Ha(i.document);return za({url:p,query:f,variables:i.variables,headers:j(j({},Xn(Ba(s))),Xn(i.requestHeaders)),operationName:m,fetch:a,method:c,fetchOptions:h,middleware:l}).then(d=>(u&&u(d),d.data)).catch(d=>{throw u&&u(d),d})})}batchRequests(t,e){var n;let r=qT(t,e),i=this.requestConfig,{headers:o}=i,s=xr(i,["headers"]);r.signal!==void 0&&(s.signal=r.signal);let a=r.documents.map(({document:l})=>Ha(l).query),c=r.documents.map(({variables:l})=>l);return za({url:this.url,query:a,variables:c,headers:j(j({},Xn(Ba(o))),Xn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:po,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,e){let{headers:n}=this.requestConfig;return n?n[t]=e:this.requestConfig.headers={[t]:e},this}setEndpoint(t){return this.url=t,this}},za=t=>Dn(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=nE(BT((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield oE(c,(n=o.jsonSerializer)!=null?n:uc),u=Array.isArray(l)?!l.some(({data:p})=>!p):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&h&&u){let p=l,f=xr(p,["errors"]),m=o.errorPolicy==="ignore"?f:l;return An(j({},a?{data:m}:m),{headers:c.headers,status:c.status})}else{let p=typeof l=="string"?{error:l}:l;throw new $f(An(j({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),iE=(t,e,n,r)=>{let i=r!=null?r:uc;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");let o=t.reduce((s,a,c)=>(s.push({query:a,variables:e?e[c]:void 0}),s),[]);return i.stringify(o)},oE=(t,e)=>Dn(void 0,null,function*(){let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(yield t.text()):t.text()}),Ba=t=>typeof t=="function"?t():t,Gl={exports:{}};(function(t,e){e=t.exports=n,e.getSerialize=r;function n(i,o,s,a){return JSON.stringify(i,r(o,a),s)}function r(i,o){var s=[],a=[];return o==null&&(o=function(c,l){return s[0]===l?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(l)).join(".")+"]"}),function(c,l){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,c):a.push(c),~s.indexOf(l)&&(l=o.call(this,c,l))}else s.push(l);return i==null?l:i.call(this,c,l)}}})(Gl,Gl.exports);var sE=Gl.exports,sn=pc(sE),Eo=function(){return Eo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Eo.apply(this,arguments)},fo=new Map,Ll=new Map,qf=!0,Ro=!1;function tm(t){return t.replace(/[\s,]+/g," ").trim()}function aE(t){return tm(t.source.body.substring(t.start,t.end))}function lE(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=aE(r.loc),s=Ll.get(i);s&&!s.has(o)?qf&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
397
397
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
398
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Ll.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),Eo(Eo({},t),{definitions:n})}function cE(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function uE(t){var e=
|
|
398
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Ll.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),Eo(Eo({},t),{definitions:n})}function cE(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function uE(t){var e=tm(t);if(!fo.has(e)){var n=cc(t,{experimentalFragmentVariables:Ro,allowLegacyFragmentVariables:Ro});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");fo.set(e,cE(lE(n)))}return fo.get(e)}function Wt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),uE(r)}function hE(){fo.clear(),Ll.clear()}function pE(){qf=!1}function dE(){Ro=!0}function fE(){Ro=!1}var Sr={gql:Wt,resetCaches:hE,disableFragmentWarnings:pE,enableExperimentalFragmentVariables:dE,disableExperimentalFragmentVariables:fE};(function(t){t.gql=Sr.gql,t.resetCaches=Sr.resetCaches,t.disableFragmentWarnings=Sr.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Sr.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Sr.disableExperimentalFragmentVariables})(Wt||(Wt={}));Wt.default=Wt;var em=Wt`
|
|
399
399
|
fragment MatchParts on MatchConfig {
|
|
400
400
|
regexValue
|
|
401
401
|
matchValue
|
|
@@ -565,7 +565,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
|
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
${
|
|
568
|
+
${em}
|
|
569
569
|
`,IE=Wt`
|
|
570
570
|
query Ignore($id: ID!) {
|
|
571
571
|
ignore(id: $id)
|
|
@@ -619,8 +619,8 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
|
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
${
|
|
623
|
-
`,EE=(t,e,n,r)=>t();function RE(t,e=EE){return{PushPayload(n,r){return e(i=>t.request(mE,n,j(j({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(yE,n,j(j({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(gE,n,j(j({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(bE,n,j(j({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(vE,n,j(j({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(SE,n,j(j({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(wE,n,j(j({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(IE,n,j(j({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(TE,n,j(j({},r),i)),"GetSamplingConfig","query",n)}}}var nn=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(nn||{}),jt=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(jt||{});function CE(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function ZE(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let n=t.localName;if(!n)break;n=n.toLowerCase();let r=t.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let s=r.children[o];s.localName&&s.localName.toLowerCase&&s.localName.toLowerCase()===n&&i.push(s)}i.length>1&&(n+=":eq("+i.indexOf(t)+")"),e=n+(e?">"+e:""),t=r}return e}function Xl(t){return Object.prototype.toString.call(t)==="[object Object]"}function rm(t,e){if(e===0)return!0;let n=Object.keys(t);for(let r of n)if(Xl(t[r])&&rm(t[r],e-1))return!0;return!1}function Wl(t,e){let n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,e);let r=[],i=[];return JSON.stringify(t,function(a,c){if(r.length>0){let l=r.indexOf(this);~l?r.splice(l+1):r.push(this),~l?i.splice(l,1/0,a):i.push(a),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return s(c);if(c instanceof Event){let l={};for(let u in c){let h=c[u];Array.isArray(h)?l[u]=ZE(h.length?h[0]:null):l[u]=h}return l}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(a){return Xl(a)&&Object.keys(a).length>n.numOfKeysLimit||typeof a=="function"?!0:a instanceof Event&&a.isTrusted===!1?Object.keys(a).length===1:!!(Xl(a)&&rm(a,n.depthOfLimit))}function s(a){let c=a.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}var im=900*1e3;function Bi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var kE={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ul(t,e){function n(i,o,s){if(typeof document<"u"){s=Bi({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Bi({},o,{expires:-1}))},withAttributes:function(i){return Ul(this.converter,Bi({},this.attributes,i))},withConverter:function(i){return Ul(Bi({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var ja=Ul(kE,{path:"/"}),om="localStorage",Ml=!0,VE=class{constructor(){Wr(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},xE=class{getItem(t){var e;return(e=ja.get(t))!=null?e:""}setItem(t,e){if(!Ml)return;let n=new Date;n.setTime(n.getTime()+im),ja.set(t,e,{expires:n})}removeItem(t){Ml&&ja.remove(t)}},Jo=new VE,Co=new xE,dc=()=>{try{switch(om){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return Jo}},NE=t=>{om=t},hd=t=>{Ml=t},sm=t=>{try{return dc().getItem(t)}catch(e){return ke("storage","debug",`failed to get item ${t}; using global storage`,e),Jo.getItem(t)}},am=(t,e)=>{Co.setItem(t,e);try{return dc().setItem(t,e)}catch(n){return ke("storage","debug",`failed to set item ${t}; using global storage`,n),Jo.setItem(t,e)}},OE=t=>{Co.removeItem(t);try{return dc().removeItem(t)}catch(e){return ke("storage","debug",`failed to remove item ${t}; using global storage`,e),Jo.removeItem(t)}},Yr=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(Yr||{}),Do=t=>`${Yr.SESSION_DATA}_${t}`,Fe=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:lm()},GE=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},lm=()=>{var t;return(t=sm(Yr.SESSION_ID))!=null?t:""},cm=t=>{am(Yr.SESSION_ID,t)},LE=t=>{let e=Do(t);return JSON.parse(sm(e)||"{}")},XE=t=>{t||(t=lm());let e=LE(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<im)return e;OE(Do(t))},um=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;GE(e),am(Do(e),JSON.stringify(t))},WE=function(){let t=Co.getItem(Yr.SESSION_ID);cm(t);let e=Do(t),n=Co.getItem(e);try{um(JSON.parse(n))}catch(r){}},hm=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(hm||{}),fc=10,mc=1e3,yc=500,UE=[hm.BillingQuotaExceeded.toString()],ME=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>UE.includes(n.message)))===void 0},PE=()=>{let t=(e,n,r,i,o=0)=>Dn(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof qf&&!ME(s))throw s;if(o<fc)return yield new Promise(a=>setTimeout(a,mc+yc*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},Lt="feature_flag",pm="launchdarkly",FE="evaluation",AE=`${Lt}.set.id`,JE=`${Lt}.key`,DE=`${Lt}.contextKeys`,YE=`${Lt}.context.id`,KE=`${Lt}.result.value`,_E=`${Lt}.provider.name`,pd={kind:`${Lt}.result.reason.kind`,errorKind:`${Lt}.result.reason.errorKind`,ruleIndex:`${Lt}.result.reason.ruleIndex`,ruleId:`${Lt}.result.reason.ruleId`,prerequisiteKey:`${Lt}.result.reason.prerequisiteKey`,inExperiment:`${Lt}.result.reason.inExperiment`,bigSegmentsStatus:`${Lt}.result.reason.bigSegmentsStatus`},HE=`${Lt}.result.variationIndex`,zE=`${pm}.application.id`,BE=`${pm}.application.version`,jE="$ld:telemetry:session:init",QE="$ld:telemetry:error",dd="$ld:telemetry:track",$E="$ld:telemetry:metric",dm="document_load",qE="result.status";function fm(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function mm(t){return t.kind==="multi"}function fd(t){return mm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${fm(t[e].key)}`).join(":"):t.key}function md(t){return mm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:fm(t[e].key)})).reduce((e,n)=>j(j({},e),n),{}):t.key}var tR=class{constructor(t,e){Wr(this,"client"),Wr(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(jE,{sessionID:t})}recordGauge(t,e){var n;e.category!==jt.WebVital&&e.name!==dm||e.name!=="Jank"&&this.client.track(`${$E}:${e.name.toLowerCase()}`,An(j({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>j(j({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(QE,An(j({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${dd}:${n}`:dd,An(j({},e),{sessionID:t}))}},eR=class extends So{constructor(t,e){super(),Wr(this,"client"),this.client=new tR(t,e)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(e,n,r)=>(this.load(this.client),n)}]}init(t){return this.h("init",[t])}recordGauge(t,e){return this.h("recordGauge",[t,e])}identify(t,e,n={},r){return this.h("identify",[t,e,n,r])}error(t,e){return this.h("error",[t,e])}track(t,e){return this.h("track",[t,e])}};function nR(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}var rR=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},iR=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},oR=class{constructor(t){Wr(this,"sessionSecureID");try{t!=null&&t.storageMode&&NE(t==null?void 0:t.storageMode),hd(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?WE():hd(!1);let e=Fe(),n=XE(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=iR(),cm(this.sessionSecureID),um({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){ke("Error initializing @launchdarkly observability plugin","error",e)}}},Zo=class extends So{recordGauge(e){return this.h("recordGauge",[e])}recordCount(e){return this.h("recordCount",[e])}recordIncr(e){return this.h("recordIncr",[e])}recordHistogram(e){return this.h("recordHistogram",[e])}recordUpDownCounter(e){return this.h("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this.h("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this.h("startManualSpan",[e,n,r,i])}register(e,n){return this.h("register",[e,n])}recordLog(e,n,r){return this.h("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this.h("recordError",[e,n,r,i,o])}},De;typeof globalThis<"u"?globalThis.LDObserve?De=globalThis.LDObserve:(De=new Zo,globalThis.LDObserve=De):De=new Zo;var sR=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return De}},Symbol.toStringTag,{value:"Module"})),aR=Object.defineProperty,lR=Object.defineProperties,cR=Object.getOwnPropertyDescriptors,yd=Object.getOwnPropertySymbols,uR=Object.prototype.hasOwnProperty,hR=Object.prototype.propertyIsEnumerable,Pl=(t,e,n)=>e in t?aR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mt=(t,e)=>{for(var n in e||(e={}))uR.call(e,n)&&Pl(t,n,e[n]);if(yd)for(var n of yd(e))hR.call(e,n)&&Pl(t,n,e[n]);return t},At=(t,e)=>lR(t,cR(e)),yt=(t,e,n)=>Pl(t,typeof e!="symbol"?e+"":e,n),Yo=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),ym={exports:{}},gd={exports:{}},bd;function pR(){return bd||(bd=1,(function(t,e){(function(n,r){t.exports=r()})(hc,function(){function n(d){return!isNaN(parseFloat(d))&&isFinite(d)}function r(d){return d.charAt(0).toUpperCase()+d.substring(1)}function i(d){return function(){return this[d]}}var o=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],c=["args"],l=["evalOrigin"],u=o.concat(s,a,c,l);function h(d){if(d)for(var b=0;b<u.length;b++)d[u[b]]!==void 0&&this["set"+r(u[b])](d[u[b]])}h.prototype={getArgs:function(){return this.args},setArgs:function(d){if(Object.prototype.toString.call(d)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=d},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(d){if(d instanceof h)this.evalOrigin=d;else if(d instanceof Object)this.evalOrigin=new h(d);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var d=this.getFileName()||"",b=this.getLineNumber()||"",v=this.getColumnNumber()||"",I=this.getFunctionName()||"";return this.getIsEval()?d?"[eval] ("+d+":"+b+":"+v+")":"[eval]:"+b+":"+v:I?I+" ("+d+":"+b+":"+v+")":d+":"+b+":"+v}},h.fromString=function(d){var b=d.indexOf("("),v=d.lastIndexOf(")"),I=d.substring(0,b),R=d.substring(b+1,v).split(","),E=d.substring(v+1);if(E.indexOf("@")===0)var T=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(E,""),V=T[1],N=T[2],U=T[3];return new h({functionName:I,args:R||void 0,fileName:V,lineNumber:N||void 0,columnNumber:U||void 0})};for(var p=0;p<o.length;p++)h.prototype["get"+r(o[p])]=i(o[p]),h.prototype["set"+r(o[p])]=(function(d){return function(b){this[d]=!!b}})(o[p]);for(var f=0;f<s.length;f++)h.prototype["get"+r(s[f])]=i(s[f]),h.prototype["set"+r(s[f])]=(function(d){return function(b){if(!n(b))throw new TypeError(d+" must be a Number");this[d]=Number(b)}})(s[f]);for(var m=0;m<a.length;m++)h.prototype["get"+r(a[m])]=i(a[m]),h.prototype["set"+r(a[m])]=(function(d){return function(b){this[d]=String(b)}})(a[m]);return h})})(gd)),gd.exports}(function(t,e){(function(n,r){t.exports=r(pR())})(hc,function(n){var r=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(s){if(typeof s.stacktrace<"u"||typeof s["opera#sourceloc"]<"u")return this.parseOpera(s);if(s.stack&&s.stack.match(i))return this.parseV8OrIE(s);if(s.stack)return this.parseFFOrSafari(s);throw new Error("Cannot parse given Error object")},extractLocation:function(s){if(s.indexOf(":")===-1)return[s];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=a.exec(s.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(s){var a=s.stack.split(`
|
|
622
|
+
${em}
|
|
623
|
+
`,EE=(t,e,n,r)=>t();function RE(t,e=EE){return{PushPayload(n,r){return e(i=>t.request(mE,n,j(j({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(yE,n,j(j({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(gE,n,j(j({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(bE,n,j(j({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(vE,n,j(j({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(SE,n,j(j({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(wE,n,j(j({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(IE,n,j(j({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(TE,n,j(j({},r),i)),"GetSamplingConfig","query",n)}}}var nn=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(nn||{}),jt=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(jt||{});function CE(t,e,n){try{if(!(e in t))return()=>{};let r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(r){return()=>{}}}function ZE(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let n=t.localName;if(!n)break;n=n.toLowerCase();let r=t.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let s=r.children[o];s.localName&&s.localName.toLowerCase&&s.localName.toLowerCase()===n&&i.push(s)}i.length>1&&(n+=":eq("+i.indexOf(t)+")"),e=n+(e?">"+e:""),t=r}return e}function Xl(t){return Object.prototype.toString.call(t)==="[object Object]"}function nm(t,e){if(e===0)return!0;let n=Object.keys(t);for(let r of n)if(Xl(t[r])&&nm(t[r],e-1))return!0;return!1}function Wl(t,e){let n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,e);let r=[],i=[];return JSON.stringify(t,function(a,c){if(r.length>0){let l=r.indexOf(this);~l?r.splice(l+1):r.push(this),~l?i.splice(l,1/0,a):i.push(a),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return s(c);if(c instanceof Event){let l={};for(let u in c){let h=c[u];Array.isArray(h)?l[u]=ZE(h.length?h[0]:null):l[u]=h}return l}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(a){return Xl(a)&&Object.keys(a).length>n.numOfKeysLimit||typeof a=="function"?!0:a instanceof Event&&a.isTrusted===!1?Object.keys(a).length===1:!!(Xl(a)&&nm(a,n.depthOfLimit))}function s(a){let c=a.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}var rm=900*1e3;function Bi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var kE={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ul(t,e){function n(i,o,s){if(typeof document<"u"){s=Bi({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=t.read(l,u),i===u)break}catch(h){}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Bi({},o,{expires:-1}))},withAttributes:function(i){return Ul(this.converter,Bi({},this.attributes,i))},withConverter:function(i){return Ul(Bi({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var ja=Ul(kE,{path:"/"}),im="localStorage",Ml=!0,VE=class{constructor(){Wr(this,"storage",{})}getItem(t){var e;return(e=this.storage[t])!=null?e:""}setItem(t,e){this.storage[t]=e}removeItem(t){delete this.storage[t]}},xE=class{getItem(t){var e;return(e=ja.get(t))!=null?e:""}setItem(t,e){if(!Ml)return;let n=new Date;n.setTime(n.getTime()+rm),ja.set(t,e,{expires:n})}removeItem(t){Ml&&ja.remove(t)}},Jo=new VE,Co=new xE,dc=()=>{try{switch(im){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return Jo}},NE=t=>{im=t},ud=t=>{Ml=t},om=t=>{try{return dc().getItem(t)}catch(e){return ke("storage","debug",`failed to get item ${t}; using global storage`,e),Jo.getItem(t)}},sm=(t,e)=>{Co.setItem(t,e);try{return dc().setItem(t,e)}catch(n){return ke("storage","debug",`failed to set item ${t}; using global storage`,n),Jo.setItem(t,e)}},OE=t=>{Co.removeItem(t);try{return dc().removeItem(t)}catch(e){return ke("storage","debug",`failed to remove item ${t}; using global storage`,e),Jo.removeItem(t)}},Yr=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(Yr||{}),Do=t=>`${Yr.SESSION_DATA}_${t}`,Fe=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:am()},GE=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},am=()=>{var t;return(t=om(Yr.SESSION_ID))!=null?t:""},lm=t=>{sm(Yr.SESSION_ID,t)},LE=t=>{let e=Do(t);return JSON.parse(om(e)||"{}")},XE=t=>{t||(t=am());let e=LE(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<rm)return e;OE(Do(t))},cm=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;GE(e),sm(Do(e),JSON.stringify(t))},WE=function(){let t=Co.getItem(Yr.SESSION_ID);lm(t);let e=Do(t),n=Co.getItem(e);try{cm(JSON.parse(n))}catch(r){}},um=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(um||{}),fc=10,mc=1e3,yc=500,UE=[um.BillingQuotaExceeded.toString()],ME=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>UE.includes(n.message)))===void 0},PE=()=>{let t=(e,n,r,i,o=0)=>Dn(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof $f&&!ME(s))throw s;if(o<fc)return yield new Promise(a=>setTimeout(a,mc+yc*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),s}});return t},Lt="feature_flag",hm="launchdarkly",FE="evaluation",AE=`${Lt}.set.id`,JE=`${Lt}.key`,DE=`${Lt}.contextKeys`,YE=`${Lt}.context.id`,KE=`${Lt}.result.value`,_E=`${Lt}.provider.name`,hd={kind:`${Lt}.result.reason.kind`,errorKind:`${Lt}.result.reason.errorKind`,ruleIndex:`${Lt}.result.reason.ruleIndex`,ruleId:`${Lt}.result.reason.ruleId`,prerequisiteKey:`${Lt}.result.reason.prerequisiteKey`,inExperiment:`${Lt}.result.reason.inExperiment`,bigSegmentsStatus:`${Lt}.result.reason.bigSegmentsStatus`},HE=`${Lt}.result.variationIndex`,zE=`${hm}.application.id`,BE=`${hm}.application.version`,jE="$ld:telemetry:session:init",QE="$ld:telemetry:error",pd="$ld:telemetry:track",$E="$ld:telemetry:metric",pm="document_load",qE="result.status";function dm(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function fm(t){return t.kind==="multi"}function dd(t){return fm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${dm(t[e].key)}`).join(":"):t.key}function fd(t){return fm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:dm(t[e].key)})).reduce((e,n)=>j(j({},e),n),{}):t.key}var tR=class{constructor(t,e){Wr(this,"client"),Wr(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(jE,{sessionID:t})}recordGauge(t,e){var n;e.category!==jt.WebVital&&e.name!==pm||e.name!=="Jank"&&this.client.track(`${$E}:${e.name.toLowerCase()}`,An(j({},(n=e.tags)==null?void 0:n.map(r=>({[r.name]:r.value})).reduce((r,i)=>j(j({},r),i),{})),{category:e.category,group:e.group,sessionID:t}),e.value)}identify(t,e,n={},r){}error(t,e){this.client.track(QE,An(j({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${pd}:${n}`:pd,An(j({},e),{sessionID:t}))}},eR=class extends So{constructor(t,e){super(),Wr(this,"client"),this.client=new tR(t,e)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(e,n,r)=>(this.load(this.client),n)}]}init(t){return this.h("init",[t])}recordGauge(t,e){return this.h("recordGauge",[t,e])}identify(t,e,n={},r){return this.h("identify",[t,e,n,r])}error(t,e){return this.h("error",[t,e])}track(t,e){return this.h("track",[t,e])}};function nR(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(let n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}var rR=t=>{let e,n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},iR=()=>{var t;let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var n="";let r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(28);r&&window.crypto.getRandomValues(i);for(let o=0;o<28;o++)r?n+=e.charAt(i[o]%e.length):n+=e.charAt(Math.floor(Math.random()*e.length));return n},oR=class{constructor(t){Wr(this,"sessionSecureID");try{t!=null&&t.storageMode&&NE(t==null?void 0:t.storageMode),ud(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?WE():ud(!1);let e=Fe(),n=XE(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=iR(),lm(this.sessionSecureID),cm({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){ke("Error initializing @launchdarkly observability plugin","error",e)}}},Zo=class extends So{recordGauge(e){return this.h("recordGauge",[e])}recordCount(e){return this.h("recordCount",[e])}recordIncr(e){return this.h("recordIncr",[e])}recordHistogram(e){return this.h("recordHistogram",[e])}recordUpDownCounter(e){return this.h("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this.h("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this.h("startManualSpan",[e,n,r,i])}register(e,n){return this.h("register",[e,n])}recordLog(e,n,r){return this.h("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this.h("recordError",[e,n,r,i,o])}},De;typeof globalThis<"u"?globalThis.LDObserve?De=globalThis.LDObserve:(De=new Zo,globalThis.LDObserve=De):De=new Zo;var sR=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return De}},Symbol.toStringTag,{value:"Module"})),aR=Object.defineProperty,lR=Object.defineProperties,cR=Object.getOwnPropertyDescriptors,md=Object.getOwnPropertySymbols,uR=Object.prototype.hasOwnProperty,hR=Object.prototype.propertyIsEnumerable,Pl=(t,e,n)=>e in t?aR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mt=(t,e)=>{for(var n in e||(e={}))uR.call(e,n)&&Pl(t,n,e[n]);if(md)for(var n of md(e))hR.call(e,n)&&Pl(t,n,e[n]);return t},At=(t,e)=>lR(t,cR(e)),yt=(t,e,n)=>Pl(t,typeof e!="symbol"?e+"":e,n),Yo=(t,e,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(t,e)).next())}),mm={exports:{}},yd={exports:{}},gd;function pR(){return gd||(gd=1,(function(t,e){(function(n,r){t.exports=r()})(hc,function(){function n(d){return!isNaN(parseFloat(d))&&isFinite(d)}function r(d){return d.charAt(0).toUpperCase()+d.substring(1)}function i(d){return function(){return this[d]}}var o=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],c=["args"],l=["evalOrigin"],u=o.concat(s,a,c,l);function h(d){if(d)for(var b=0;b<u.length;b++)d[u[b]]!==void 0&&this["set"+r(u[b])](d[u[b]])}h.prototype={getArgs:function(){return this.args},setArgs:function(d){if(Object.prototype.toString.call(d)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=d},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(d){if(d instanceof h)this.evalOrigin=d;else if(d instanceof Object)this.evalOrigin=new h(d);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var d=this.getFileName()||"",b=this.getLineNumber()||"",v=this.getColumnNumber()||"",I=this.getFunctionName()||"";return this.getIsEval()?d?"[eval] ("+d+":"+b+":"+v+")":"[eval]:"+b+":"+v:I?I+" ("+d+":"+b+":"+v+")":d+":"+b+":"+v}},h.fromString=function(d){var b=d.indexOf("("),v=d.lastIndexOf(")"),I=d.substring(0,b),R=d.substring(b+1,v).split(","),E=d.substring(v+1);if(E.indexOf("@")===0)var T=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(E,""),V=T[1],N=T[2],U=T[3];return new h({functionName:I,args:R||void 0,fileName:V,lineNumber:N||void 0,columnNumber:U||void 0})};for(var p=0;p<o.length;p++)h.prototype["get"+r(o[p])]=i(o[p]),h.prototype["set"+r(o[p])]=(function(d){return function(b){this[d]=!!b}})(o[p]);for(var f=0;f<s.length;f++)h.prototype["get"+r(s[f])]=i(s[f]),h.prototype["set"+r(s[f])]=(function(d){return function(b){if(!n(b))throw new TypeError(d+" must be a Number");this[d]=Number(b)}})(s[f]);for(var m=0;m<a.length;m++)h.prototype["get"+r(a[m])]=i(a[m]),h.prototype["set"+r(a[m])]=(function(d){return function(b){this[d]=String(b)}})(a[m]);return h})})(yd)),yd.exports}(function(t,e){(function(n,r){t.exports=r(pR())})(hc,function(n){var r=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(s){if(typeof s.stacktrace<"u"||typeof s["opera#sourceloc"]<"u")return this.parseOpera(s);if(s.stack&&s.stack.match(i))return this.parseV8OrIE(s);if(s.stack)return this.parseFFOrSafari(s);throw new Error("Cannot parse given Error object")},extractLocation:function(s){if(s.indexOf(":")===-1)return[s];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=a.exec(s.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(s){var a=s.stack.split(`
|
|
624
624
|
`).filter(function(c){return!!c.match(i)},this);return a.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var l=c.replace(/^\s+/,"").replace(/\(eval code/g,"("),u=l.match(/ (\((.+):(\d+):(\d+)\)$)/);l=u?l.replace(u[0],""):l;var h=l.split(/\s+/).slice(1),p=this.extractLocation(u?u[1]:h.pop()),f=h.join(" ")||void 0,m=["eval","<anonymous>"].indexOf(p[0])>-1?void 0:p[0];return new n({functionName:f,fileName:m,lineNumber:p[1],columnNumber:p[2],source:c})},this)},parseFFOrSafari:function(s){var a=s.stack.split(`
|
|
625
625
|
`).filter(function(c){return!c.match(o)},this);return a.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new n({functionName:c});var l=/((.*".+"[^@]*)?[^@]*)(?:@)/,u=c.match(l),h=u&&u[1]?u[1]:void 0,p=this.extractLocation(c.replace(l,""));return new n({functionName:h,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:c})},this)},parseOpera:function(s){return!s.stacktrace||s.message.indexOf(`
|
|
626
626
|
`)>-1&&s.message.split(`
|
|
@@ -628,19 +628,19 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s
|
|
|
628
628
|
`).length?this.parseOpera9(s):s.stack?this.parseOpera11(s):this.parseOpera10(s)},parseOpera9:function(s){for(var a=/Line (\d+).*script (?:in )?(\S+)/i,c=s.message.split(`
|
|
629
629
|
`),l=[],u=2,h=c.length;u<h;u+=2){var p=a.exec(c[u]);p&&l.push(new n({fileName:p[2],lineNumber:p[1],source:c[u]}))}return l},parseOpera10:function(s){for(var a=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=s.stacktrace.split(`
|
|
630
630
|
`),l=[],u=0,h=c.length;u<h;u+=2){var p=a.exec(c[u]);p&&l.push(new n({functionName:p[3]||void 0,fileName:p[2],lineNumber:p[1],source:c[u]}))}return l},parseOpera11:function(s){var a=s.stack.split(`
|
|
631
|
-
`).filter(function(c){return!!c.match(r)&&!c.match(/^Error created at/)},this);return a.map(function(c){var l=c.split("@"),u=this.extractLocation(l.pop()),h=l.shift()||"",p=h.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,f;h.match(/\(([^)]*)\)/)&&(f=h.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var m=f===void 0||f==="[arguments not available]"?void 0:f.split(",");return new n({functionName:p,args:m,fileName:u[0],lineNumber:u[1],columnNumber:u[2],source:c})},this)}}})})(ym);var dR=ym.exports,vd=pc(dR);function Ko(t){try{return vd.parse(t)}catch(e){try{return vd.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:n}),[]}}}function fR(t,e){let n=e.logger,r;r=window[n];let i=[];if(e.level.includes("error")&&window){let s=a=>{let{message:c,error:l}=a,u=[];l&&(u=Ko(l));let h=[Wl(c,e.stringifyOptions)];t({type:"Error",trace:u,time:Date.now(),value:h})};window.addEventListener("error",s),i.push(()=>{window&&window.removeEventListener("error",s)})}for(let s of e.level)i.push(o(r,s));return()=>{i.forEach(s=>s())};function o(s,a){return s[a]?CE(s,a,c=>(...l)=>{c.apply(this,l);try{t(mR(a,e,...l))}catch(u){c("highlight logger error:",u,...l)}}):()=>{}}}function mR(t,e,...n){let r=Ko(new Error),i=e.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Wl(o,e.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:r.slice(1),value:i,attributes:Wl(n.filter(o=>typeof o=="object").reduce((o,s)=>mt(mt({},o),s),{}),e.stringifyOptions),time:Date.now()}}function Qa(t,e,n,r){var i,o,s,a;let c=r!=null?r:e,l=Ko(c),u={};e instanceof Error&&(e=e.message,e.cause&&(u={"exception.cause":e.cause}));let h=gR(l);t({error:c,event:sn(e),type:"window.onerror",url:window.location.href,source:n!=null?n:"",lineNumber:(i=h[0])!=null&&i.lineNumber?(o=h[0])==null?void 0:o.lineNumber:0,columnNumber:(s=h[0])!=null&&s.columnNumber?(a=h[0])==null?void 0:a.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString(),payload:u?sn(u):void 0})}var yR=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};let n=window.onerror=(s,a,c,l,u)=>{Qa(t,s,a,u)},r=window.onunhandledrejection=s=>{if(s.reason){let a=s.promise;a.getStack?Qa(t,s.reason,s.type,a.getStack()):Qa(t,s.reason,s.type)}},i=window.Promise,o=class extends i{constructor(s){super(s),yt(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){let s=typeof window.Zone>"u";return e&&s}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},gR=t=>{var e,n;if(t.length===0)return t;let r=t[0];return(e=r.fileName)!=null&&e.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?t.slice(1):t},Sd=['["\\"Script error.\\""]','"Script error."','["\\"Load failed.\\""]','"Load failed."','["\\"Network request failed.\\""]','"Network request failed."','["\\"Document is not focused.\\""]','"Document is not focused."','["\\"Failed to fetch\\""]','"Failed to fetch"','[{"isTrusted":true}]','{"isTrusted":true}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],wd=["websocket error",'\\"ResizeObserver loop'],bR=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},un="1.9.0",Id=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function vR(t){var e=new Set([t]),n=new Set,r=t.match(Id);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(a){return a===t};function o(a){return n.add(a),!1}function s(a){return e.add(a),!0}return function(a){if(e.has(a))return!0;if(n.has(a))return!1;var c=a.match(Id);if(!c)return o(a);var l={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return l.prerelease!=null||i.major!==l.major?o(a):i.major===0?i.minor===l.minor&&i.patch<=l.patch?s(a):o(a):i.minor<=l.minor?s(a):o(a)}}var SR=vR(un),wR=un.split(".")[0],Mr=Symbol.for("opentelemetry.js.api."+wR),Pr=bR;function Kr(t,e,n,r){var i;r===void 0&&(r=!1);var o=Pr[Mr]=(i=Pr[Mr])!==null&&i!==void 0?i:{version:un};if(!r&&o[t]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(s.stack||s.message),!1}if(o.version!==un){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+un);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+un+"."),!0}function dn(t){var e,n,r=(e=Pr[Mr])===null||e===void 0?void 0:e.version;if(!(!r||!SR(r)))return(n=Pr[Mr])===null||n===void 0?void 0:n[t]}function _r(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+un+".");var n=Pr[Mr];n&&delete n[t]}var IR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},TR=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ER=(function(){function t(e){this.ir=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return wr("debug",this.ir,e)},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return wr("error",this.ir,e)},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return wr("info",this.ir,e)},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return wr("warn",this.ir,e)},t.prototype.verbose=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return wr("verbose",this.ir,e)},t})();function wr(t,e,n){var r=dn("diag");if(r)return n.unshift(e),r[t].apply(r,TR([],IR(n),!1))}var St;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(St||(St={}));function RR(t,e){t<St.NONE?t=St.NONE:t>St.ALL&&(t=St.ALL),e=e||{};function n(r,i){var o=e[r];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:n("error",St.ERROR),warn:n("warn",St.WARN),info:n("info",St.INFO),debug:n("debug",St.DEBUG),verbose:n("verbose",St.VERBOSE)}}var CR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ZR=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},kR="diag",ve=(function(){function t(){function e(i){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=dn("diag");if(a)return a[i].apply(a,ZR([],CR(o),!1))}}var n=this,r=function(i,o){var s,a,c;if(o===void 0&&(o={logLevel:St.INFO}),i===n){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=l.stack)!==null&&s!==void 0?s:l.message),!1}typeof o=="number"&&(o={logLevel:o});var u=dn("diag"),h=RR((a=o.logLevel)!==null&&a!==void 0?a:St.INFO,i);if(u&&!o.suppressOverrideMessage){var p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+p),h.warn("Current logger will overwrite one already registered from "+p)}return Kr("diag",h,n,!0)};n.setLogger=r,n.disable=function(){_r(kR,n)},n.createComponentLogger=function(i){return new ER(i)},n.verbose=e("verbose"),n.debug=e("debug"),n.info=e("info"),n.warn=e("warn"),n.error=e("error")}return t.instance=function(){return this.V||(this.V=new t),this.V},t})(),VR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},xR=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},NR=(function(){function t(e){this.yn=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var n=this.yn.get(e);if(n)return Object.assign({},n)},t.prototype.getAllEntries=function(){return Array.from(this.yn.entries()).map(function(e){var n=VR(e,2),r=n[0],i=n[1];return[r,i]})},t.prototype.setEntry=function(e,n){var r=new t(this.yn);return r.yn.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this.yn);return n.yn.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new t(this.yn);try{for(var s=xR(r),a=s.next();!a.done;a=s.next()){var c=a.value;o.yn.delete(c)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t})(),OR=Symbol("BaggageEntryMetadata"),GR=ve.instance();function LR(t){return t===void 0&&(t={}),new NR(new Map(Object.entries(t)))}function XR(t){return typeof t!="string"&&(GR.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:OR,toString:function(){return t}}}function gc(t){return Symbol.for(t)}var WR=(function(){function t(e){var n=this;n.Xe=e?new Map(e):new Map,n.getValue=function(r){return n.Xe.get(r)},n.setValue=function(r,i){var o=new t(n.Xe);return o.Xe.set(r,i),o},n.deleteValue=function(r){var i=new t(n.Xe);return i.Xe.delete(r),i}}return t})(),an=new WR,gn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),UR=(function(){function t(){}return t.prototype.createGauge=function(e,n){return _R},t.prototype.createHistogram=function(e,n){return HR},t.prototype.createCounter=function(e,n){return KR},t.prototype.createUpDownCounter=function(e,n){return zR},t.prototype.createObservableGauge=function(e,n){return jR},t.prototype.createObservableCounter=function(e,n){return BR},t.prototype.createObservableUpDownCounter=function(e,n){return QR},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t})(),_o=(function(){function t(){}return t})(),MR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(_o),PR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(_o),FR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(_o),AR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(_o),bc=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),JR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(bc),DR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(bc),YR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(bc),gm=new UR,KR=new MR,_R=new FR,HR=new AR,zR=new PR,BR=new JR,jR=new DR,QR=new YR;function $R(){return gm}var Ye;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(Ye||(Ye={}));var qR={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},tC={set:function(t,e,n){t!=null&&(t[e]=n)}},eC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},nC=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},rC=(function(){function t(){}return t.prototype.active=function(){return an},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,nC([r],eC(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})(),iC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},oC=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},$a="context",sC=new rC,Ho=(function(){function t(){}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalContextManager=function(e){return Kr($a,e,ve.instance())},t.prototype.active=function(){return this.Ir().active()},t.prototype.with=function(e,n,r){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this.Ir()).with.apply(i,oC([e,n,r],iC(o),!1))},t.prototype.bind=function(e,n){return this.Ir().bind(e,n)},t.prototype.Ir=function(){return dn($a)||sC},t.prototype.disable=function(){this.Ir().disable(),_r($a,ve.instance())},t})(),Ve;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(Ve||(Ve={}));var bm="0000000000000000",vm="00000000000000000000000000000000",Sm={traceId:vm,spanId:bm,traceFlags:Ve.NONE},Nr=(function(){function t(e){e===void 0&&(e=Sm),this.Cn=e}return t.prototype.spanContext=function(){return this.Cn},t.prototype.setAttribute=function(e,n){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,n){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,n){},t})(),vc=gc("OpenTelemetry Context Key SPAN");function Sc(t){return t.getValue(vc)||void 0}function aC(){return Sc(Ho.getInstance().active())}function wc(t,e){return t.setValue(vc,e)}function lC(t){return t.deleteValue(vc)}function cC(t,e){return wc(t,new Nr(e))}function wm(t){var e;return(e=Sc(t))===null||e===void 0?void 0:e.spanContext()}var uC=/^([0-9a-f]{32})$/i,hC=/^[0-9a-f]{16}$/i;function Im(t){return uC.test(t)&&t!==vm}function pC(t){return hC.test(t)&&t!==bm}function zo(t){return Im(t.traceId)&&pC(t.spanId)}function dC(t){return new Nr(t)}var qa=Ho.getInstance(),Tm=(function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=qa.active());var i=!!(n!=null&&n.root);if(i)return new Nr;var o=r&&wm(r);return fC(o)&&zo(o)?new Nr(o):new Nr},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:qa.active(),l=this.startSpan(e,o,c),u=wc(c,l);return qa.with(u,a,void 0,l)}},t})();function fC(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var mC=new Tm,yC=(function(){function t(e,n,r,i){this.Zn=e,this.name=n,this.version=r,this.options=i}return t.prototype.startSpan=function(e,n,r){return this.Oo().startSpan(e,n,r)},t.prototype.startActiveSpan=function(e,n,r,i){var o=this.Oo();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype.Oo=function(){if(this.b)return this.b;var e=this.Zn.getDelegateTracer(this.name,this.version,this.options);return e?(this.b=e,this.b):mC},t})(),gC=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new Tm},t})(),bC=new gC,Td=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){var i;return(i=this.getDelegateTracer(e,n,r))!==null&&i!==void 0?i:new yC(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:bC},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateTracer=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getTracer(e,n,r)},t})(),ko;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ko||(ko={}));var Fr;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(Fr||(Fr={}));var Vo;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Vo||(Vo={}));var tt=Ho.getInstance(),X=ve.instance(),vC=(function(){function t(){}return t.prototype.getMeter=function(e,n,r){return gm},t})(),SC=new vC,tl="metrics",wC=(function(){function t(){}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalMeterProvider=function(e){return Kr(tl,e,ve.instance())},t.prototype.getMeterProvider=function(){return dn(tl)||SC},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){_r(tl,ve.instance())},t})(),Ce=wC.getInstance(),IC=(function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t})(),Ic=gc("OpenTelemetry Baggage Key");function Em(t){return t.getValue(Ic)||void 0}function TC(){return Em(Ho.getInstance().active())}function EC(t,e){return t.setValue(Ic,e)}function RC(t){return t.deleteValue(Ic)}var el="propagation",CC=new IC,ZC=(function(){function t(){this.createBaggage=LR,this.getBaggage=Em,this.getActiveBaggage=TC,this.setBaggage=EC,this.deleteBaggage=RC}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalPropagator=function(e){return Kr(el,e,ve.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=tC),this.Dr().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=qR),this.Dr().extract(e,n,r)},t.prototype.fields=function(){return this.Dr().fields()},t.prototype.disable=function(){_r(el,ve.instance())},t.prototype.Dr=function(){return dn(el)||CC},t})(),Qt=ZC.getInstance(),nl="trace",kC=(function(){function t(){this.Tr=new Td,this.wrapSpanContext=dC,this.isSpanContextValid=zo,this.deleteSpan=lC,this.getSpan=Sc,this.getActiveSpan=aC,this.getSpanContext=wm,this.setSpan=wc,this.setSpanContext=cC}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalTracerProvider=function(e){var n=Kr(nl,this.Tr,ve.instance());return n&&this.Tr.setDelegate(e),n},t.prototype.getTracerProvider=function(){return dn(nl)||this.Tr},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){_r(nl,ve.instance()),this.Tr=new Td},t})(),ut=kC.getInstance(),Rm=gc("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Cm(t){return t.setValue(Rm,!0)}function Tc(t){return t.getValue(Rm)===!0}var VC="=",Fl=";",Al=",",rl="baggage",xC=180,NC=4096,OC=8192,GC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function LC(t){return t.reduce(function(e,n){var r=""+e+(e!==""?Al:"")+n;return r.length>OC?e:r},"")}function XC(t){return t.getAllEntries().map(function(e){var n=GC(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Fl+i.metadata.toString()),o})}function WC(t){var e=t.split(Fl);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(VC);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),s;return e.length>0&&(s=XR(e.join(Fl))),{key:i,value:o,metadata:s}}}}}var Zm=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=Qt.getBaggage(e);if(!(!i||Tc(e))){var o=XC(i).filter(function(a){return a.length<=NC}).slice(0,xC),s=LC(o);s.length>0&&r.set(n,rl,s)}},t.prototype.extract=function(e,n,r){var i=r.get(n,rl),o=Array.isArray(i)?i.join(Al):i;if(!o)return e;var s={};if(o.length===0)return e;var a=o.split(Al);return a.forEach(function(c){var l=WC(c);if(l){var u={value:l.value};l.metadata&&(u.metadata=l.metadata),s[l.key]=u}}),Object.entries(s).length===0?e:Qt.setBaggage(e,Qt.createBaggage(s))},t.prototype.fields=function(){return[rl]},t})(),km=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},UC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function mo(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=km(Object.entries(t)),o=i.next();!o.done;o=i.next()){var s=UC(o.value,2),a=s[0],c=s[1];if(!MC(a)){X.warn("Invalid attribute key: "+a);continue}if(!Vm(c)){X.warn("Invalid attribute value set for key: "+a);continue}Array.isArray(c)?r[a]=c.slice():r[a]=c}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function MC(t){return typeof t=="string"&&t.length>0}function Vm(t){return t==null?!0:Array.isArray(t)?PC(t):xm(t)}function PC(t){var e,n,r;try{for(var i=km(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!=null){if(!r){if(xm(s)){r=typeof s;continue}return!1}if(typeof s!==r)return!1}}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return!0}function xm(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function FC(){return function(t){X.error(AC(t))}}function AC(t){return typeof t=="string"?t:JSON.stringify(JC(t))}function JC(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var i=n[r];i&&(e[r]=String(i))}}),n=Object.getPrototypeOf(n);return e}var DC=FC();function Ke(t){try{DC(t)}catch(e){}}var ye;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(ye||(ye={}));var YC=",",KC=["OTEL_SDK_DISABLED"];function _C(t){return KC.indexOf(t)>-1}var HC=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function zC(t){return HC.indexOf(t)>-1}var BC=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function jC(t){return BC.indexOf(t)>-1}var yo=1/0,go=128,QC=128,$C=128,Nm={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:St.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:yo,OTEL_ATTRIBUTE_COUNT_LIMIT:go,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:yo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:go,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:yo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:go,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:QC,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:$C,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ye.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function qC(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function tZ(t,e,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[t]<"u"){var o=Number(n[t]);isNaN(o)||(o<r?e[t]=r:o>i?e[t]=i:e[t]=o)}}function eZ(t,e,n,r){r===void 0&&(r=YC);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var nZ={ALL:St.ALL,VERBOSE:St.VERBOSE,DEBUG:St.DEBUG,INFO:St.INFO,WARN:St.WARN,ERROR:St.ERROR,NONE:St.NONE};function rZ(t,e,n){var r=n[t];if(typeof r=="string"){var i=nZ[r.toUpperCase()];i!=null&&(e[t]=i)}}function Om(t){var e={};for(var n in Nm){var r=n;switch(r){case"OTEL_LOG_LEVEL":rZ(r,e,t);break;default:if(_C(r))qC(r,e,t);else if(zC(r))tZ(r,e,t);else if(jC(r))eZ(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}var Or=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Yn(){var t=Om(Or);return Object.assign({},Nm,t)}function iZ(){return Om(Or)}function Ed(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Ec(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var i=Ed(t.charCodeAt(r)),o=Ed(t.charCodeAt(r+1));e[n++]=i<<4|o}return e}var te=performance,oZ="1.30.1",sZ="process.runtime.name",aZ="telemetry.sdk.name",lZ="telemetry.sdk.language",cZ="telemetry.sdk.version",uZ=sZ,hZ=aZ,pZ=lZ,dZ=cZ,fZ="webjs",mZ=fZ,Wn,il=(Wn={},Wn[hZ]="opentelemetry",Wn[uZ]="browser",Wn[pZ]=mZ,Wn[dZ]=oZ,Wn),yZ=9,gZ=6,bZ=Math.pow(10,gZ),xo=Math.pow(10,yZ);function $t(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*bZ);return[n,r]}function Rc(){var t=te.timeOrigin;if(typeof t!="number"){var e=te;t=e.timing&&e.timing.fetchStart}return t}function fn(t){var e=$t(Rc()),n=$t(typeof t=="number"?t:te.now());return Gm(e,n)}function Gr(t){if(Cc(t))return t;if(typeof t=="number")return t<Rc()?fn(t):$t(t);if(t instanceof Date)return $t(t.getTime());throw TypeError("Invalid input type")}function vZ(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=xo),[n,r]}function Ze(t){return t[0]*xo+t[1]}function ji(t){return t[0]*1e6+t[1]/1e3}function Cc(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Rd(t){return Cc(t)||typeof t=="number"||t instanceof Date}function Gm(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=xo&&(n[1]-=xo,n[0]+=1),n}var kt;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(kt||(kt={}));var SZ=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Lm=(function(){function t(e){e===void 0&&(e={});var n;this.Yr=(n=e.propagators)!==null&&n!==void 0?n:[],this._s=Array.from(new Set(this.Yr.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return t.prototype.inject=function(e,n,r){var i,o;try{for(var s=SZ(this.Yr),a=s.next();!a.done;a=s.next()){var c=a.value;try{c.inject(e,n,r)}catch(l){X.warn("Failed to inject with "+c.constructor.name+". Err: "+l.message)}}}catch(l){i={error:l}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,n,r){return this.Yr.reduce(function(i,o){try{return o.extract(i,n,r)}catch(s){X.warn("Failed to extract with "+o.constructor.name+". Err: "+s.message)}return i},e)},t.prototype.fields=function(){return this._s.slice()},t})(),Jl="[_0-9a-z-*/]",wZ="[a-z]"+Jl+"{0,255}",IZ="[a-z0-9]"+Jl+"{0,240}@[a-z]"+Jl+"{0,13}",TZ=new RegExp("^(?:"+wZ+"|"+IZ+")$"),EZ=/^[ -~]{0,255}[!-~]$/,RZ=/,|=/;function CZ(t){return TZ.test(t)}function ZZ(t){return EZ.test(t)&&!RZ.test(t)}var Cd=32,kZ=512,Zd=",",kd="=",VZ=(function(){function t(e){this._e=new Map,e&&this.Hs(e)}return t.prototype.set=function(e,n){var r=this.Go();return r._e.has(e)&&r._e.delete(e),r._e.set(e,n),r},t.prototype.unset=function(e){var n=this.Go();return n._e.delete(e),n},t.prototype.get=function(e){return this._e.get(e)},t.prototype.serialize=function(){var e=this;return this.zs().reduce(function(n,r){return n.push(r+kd+e.get(r)),n},[]).join(Zd)},t.prototype.Hs=function(e){e.length>kZ||(this._e=e.split(Zd).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(kd);if(o!==-1){var s=i.slice(0,o),a=i.slice(o+1,r.length);CZ(s)&&ZZ(a)&&n.set(s,a)}return n},new Map),this._e.size>Cd&&(this._e=new Map(Array.from(this._e.entries()).reverse().slice(0,Cd))))},t.prototype.zs=function(){return Array.from(this._e.keys()).reverse()},t.prototype.Go=function(){var e=new t;return e._e=new Map(this._e),e},t})(),bo="traceparent",ol="tracestate",xZ="00",NZ="(?!ff)[\\da-f]{2}",OZ="(?![0]{32})[\\da-f]{32}",GZ="(?![0]{16})[\\da-f]{16}",LZ="[\\da-f]{2}",XZ=new RegExp("^\\s?("+NZ+")-("+OZ+")-("+GZ+")-("+LZ+")(-.*)?\\s?$");function WZ(t){var e=XZ.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Xm=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=ut.getSpanContext(e);if(!(!i||Tc(e)||!zo(i))){var o=xZ+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||Ve.NONE).toString(16);r.set(n,bo,o),i.traceState&&r.set(n,ol,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,bo);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var s=WZ(o);if(!s)return e;s.isRemote=!0;var a=r.get(n,ol);if(a){var c=Array.isArray(a)?a.join(","):a;s.traceState=new VZ(typeof c=="string"?c:void 0)}return ut.setSpanContext(e,s)},t.prototype.fields=function(){return[bo,ol]},t})(),UZ="[object Object]",MZ="[object Null]",PZ="[object Undefined]",FZ=Function.prototype,Wm=FZ.toString,AZ=Wm.call(Object),JZ=DZ(Object.getPrototypeOf,Object),Um=Object.prototype,Mm=Um.hasOwnProperty,ln=Symbol?Symbol.toStringTag:void 0,Pm=Um.toString;function DZ(t,e){return function(n){return t(e(n))}}function Vd(t){if(!YZ(t)||KZ(t)!==UZ)return!1;var e=JZ(t);if(e===null)return!0;var n=Mm.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Wm.call(n)===AZ}function YZ(t){return t!=null&&typeof t=="object"}function KZ(t){return t==null?t===void 0?PZ:MZ:ln&&ln in Object(t)?_Z(t):HZ(t)}function _Z(t){var e=Mm.call(t,ln),n=t[ln],r=!1;try{t[ln]=void 0,r=!0}catch(o){}var i=Pm.call(t);return r&&(e?t[ln]=n:delete t[ln]),i}function HZ(t){return Pm.call(t)}var zZ=20;function Fm(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=Am(n,t.shift(),0,r);return n}function sl(t){return No(t)?t.slice():t}function Am(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>zZ)){if(n++,vo(t)||vo(e)||Jm(e))i=sl(e);else if(No(t)){if(i=t.slice(),No(e))for(var o=0,s=e.length;o<s;o++)i.push(sl(e[o]));else if(Ir(e))for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o];i[c]=sl(e[c])}}else if(Ir(t))if(Ir(e)){if(!BZ(t,e))return e;i=Object.assign({},t);for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o],l=e[c];if(vo(l))typeof l>"u"?delete i[c]:i[c]=l;else{var u=i[c],h=l;if(xd(t,c,r)||xd(e,c,r))delete i[c];else{if(Ir(u)&&Ir(h)){var p=r.get(u)||[],f=r.get(h)||[];p.push({obj:t,key:c}),f.push({obj:e,key:c}),r.set(u,p),r.set(h,f)}i[c]=Am(i[c],l,n,r)}}}}else i=e;return i}}function xd(t,e,n){for(var r=n.get(t[e])||[],i=0,o=r.length;i<o;i++){var s=r[i];if(s.key===e&&s.obj===t)return!0}return!1}function No(t){return Array.isArray(t)}function Jm(t){return typeof t=="function"}function Ir(t){return!vo(t)&&!No(t)&&!Jm(t)&&typeof t=="object"}function vo(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function BZ(t,e){return!(!Vd(t)||!Vd(e))}var jZ=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Dm(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Ym(t,e){var n,r;if(!e)return!1;try{for(var i=jZ(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(Dm(t,s))return!0}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var QZ=(function(){function t(){var e=this;this.Bs=new Promise(function(n,r){e.Kr=n,e.js=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this.Bs},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this.Kr(e)},t.prototype.reject=function(e){this.js(e)},t})(),$Z=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},qZ=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},tk=(function(){function t(e,n){this.Qs=e,this.$s=n,this._r=!1,this.or=new QZ}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this.or.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this._r){this._r=!0;try{Promise.resolve((e=this.Qs).call.apply(e,qZ([this.$s],$Z(r),!1))).then(function(o){return n.or.resolve(o)},function(o){return n.or.reject(o)})}catch(o){this.or.reject(o)}}return this.or.promise},t})();function ek(t,e){return new Promise(function(n){tt.with(Cm(tt.active()),function(){t.export(e,function(r){n(r)})})})}var nk={qs:ek},Km=(function(){function t(){}return t.prototype.emit=function(e){},t})(),rk=new Km,ik=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new Km},t})(),_m=new ik,ok=(function(){function t(e,n,r,i){this.Zn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.sr().emit(e)},t.prototype.sr=function(){if(this.b)return this.b;var e=this.Zn.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):rk},t})(),Nd=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new ok(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:_m},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),sk=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Qi=Symbol.for("io.opentelemetry.js.api.logs"),Tr=sk;function ak(t,e,n){return function(r){return r===t?e:n}}var Od=1,lk=(function(){function t(){this.en=new Nd}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Tr[Qi]?this.getLoggerProvider():(Tr[Qi]=ak(Od,e,_m),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Tr[Qi])===null||e===void 0?void 0:e.call(Tr,Od))!==null&&n!==void 0?n:this.en},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Tr[Qi],this.en=new Nd},t})(),Hm=lk.getInstance();function ck(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var s=t[i];e&&s.setTracerProvider(e),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}function uk(t){t.forEach(function(e){return e.disable()})}function hk(t){var e,n,r=t.tracerProvider||ut.getTracerProvider(),i=t.meterProvider||Ce.getMeterProvider(),o=t.loggerProvider||Hm.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return ck(s,r,i,o),function(){uk(s)}}function Dl(t){return typeof t=="function"}var Xt=console.error.bind(console);function Er(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Hr(t){t&&t.logger&&(Dl(t.logger)?Xt=t.logger:Xt("new logger isn't a function, not replacing"))}function zm(t,e,n){if(!t||!t[e]){Xt("no original function "+e+" to wrap");return}if(!n){Xt("no wrapper function"),Xt(new Error().stack);return}if(!Dl(t[e])||!Dl(n)){Xt("original object and wrapper must be functions");return}var r=t[e],i=n(r,e);return Er(i,"__original",r),Er(i,"__unwrap",function(){t[e]===i&&Er(t,e,r)}),Er(i,"__wrapped",!0),Er(t,e,i),i}function pk(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{Xt("must provide one or more modules to patch"),Xt(new Error().stack);return}if(!(e&&Array.isArray(e))){Xt("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(i){zm(r,i,n)})})}function Bm(t,e){if(!t||!t[e]){Xt("no function to unwrap."),Xt(new Error().stack);return}if(!t[e].__unwrap)Xt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function dk(t,e){if(t)Array.isArray(t)||(t=[t]);else{Xt("must provide one or more modules to patch"),Xt(new Error().stack);return}if(!(e&&Array.isArray(e))){Xt("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){Bm(n,r)})})}Hr.wrap=zm;Hr.massWrap=pk;Hr.unwrap=Bm;Hr.massUnwrap=dk;var qt=Hr,Yl=function(){return Yl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Yl.apply(this,arguments)},fk=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ce={},this.ae=qt.wrap,this.P=qt.unwrap,this.Lo=qt.massWrap,this.Xo=qt.massUnwrap,this.setConfig(r),this.v=X.createComponentLogger({namespace:e}),this.gn=ut.getTracer(e,n),this.bn=Ce.getMeter(e,n),this.vn=Hm.getLogger(e,n),this.Sn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.bn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.bn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.Sn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.vn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.vn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.Sn=function(){},t.prototype.getConfig=function(){return this.ce},t.prototype.setConfig=function(e){this.ce=Yl({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.gn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.gn},enumerable:!1,configurable:!0}),t.prototype.Wo=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.v.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),mk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),jm=(function(t){mk(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ce.enabled&&o.enable(),o}return e})(fk);function Gd(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Gt(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var yk="exception.type",gk="exception.message",bk="exception.stacktrace",al=yk,ll=gk,vk=bk,Sk="exception",Kl=function(){return Kl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Kl.apply(this,arguments)},wk=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ld=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ik=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Tk=(function(){function t(e,n,r,i,o,s,a,c,l,u){a===void 0&&(a=[]),this.attributes={},this.links=[],this.events=[],this.Uo=0,this.Xn=0,this.ta=0,this.status={code:Vo.UNSET},this.endTime=[0,0],this.ar=!1,this.Er=[-1,-1],this.name=r,this.Cn=i,this.parentSpanId=s,this.kind=o,this.links=a;var h=Date.now();this.Mo=te.now(),this.ea=h-(this.Mo+Rc()),this.na=c!=null,this.startTime=this.Hr(c!=null?c:h),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this.Wn=e.getSpanLimits(),this.ra=this.Wn.attributeValueLengthLimit||0,u!=null&&this.setAttributes(u),this.Po=e.getActiveSpanProcessor(),this.Po.onStart(this,n)}return t.prototype.spanContext=function(){return this.Cn},t.prototype.setAttribute=function(e,n){return n==null||this.lr()?this:e.length===0?(X.warn("Invalid attribute key: "+e),this):Vm(n)?Object.keys(this.attributes).length>=this.Wn.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.Uo++,this):(this.attributes[e]=this.ia(n),this):(X.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,r;try{for(var i=wk(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=Ld(o.value,2),a=s[0],c=s[1];this.setAttribute(a,c)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,r){if(this.lr())return this;if(this.Wn.eventCountLimit===0)return X.warn("No events allowed."),this.Xn++,this;this.events.length>=this.Wn.eventCountLimit&&(this.Xn===0&&X.debug("Dropping extra events."),this.events.shift(),this.Xn++),Rd(n)&&(Rd(r)||(r=n),n=void 0);var i=mo(n);return this.events.push({name:e,attributes:i,time:this.Hr(r),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,Ik([],Ld(e),!1)),this},t.prototype.setStatus=function(e){return this.lr()?this:(this.status=Kl({},e),this.status.message!=null&&typeof e.message!="string"&&(X.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this.lr()?this:(this.name=e,this)},t.prototype.end=function(e){if(this.lr()){X.error(this.name+" "+this.Cn.traceId+"-"+this.Cn.spanId+" - You can only call end() on a span once.");return}this.ar=!0,this.endTime=this.Hr(e),this.Er=vZ(this.startTime,this.endTime),this.Er[0]<0&&(X.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this.Er=[0,0]),this.Xn>0&&X.warn("Dropped "+this.Xn+" events because eventCountLimit reached"),this.Po.onEnd(this)},t.prototype.Hr=function(e){if(typeof e=="number"&&e<=te.now())return fn(e+this.ea);if(typeof e=="number")return $t(e);if(e instanceof Date)return $t(e.getTime());if(Cc(e))return e;if(this.na)return $t(Date.now());var n=te.now()-this.Mo;return Gm(this.startTime,$t(n))},t.prototype.isRecording=function(){return this.ar===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[ll]=e:e&&(e.code?r[al]=e.code.toString():e.name&&(r[al]=e.name),e.message&&(r[ll]=e.message),e.stack&&(r[vk]=e.stack)),r[al]||r[ll]?this.addEvent(Sk,r,n):X.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this.Er},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this.ar},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this.Uo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this.Xn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this.ta},enumerable:!1,configurable:!0}),t.prototype.lr=function(){return this.ar&&X.warn("Can not execute the operation on ended Span {traceId: "+this.Cn.traceId+", spanId: "+this.Cn.spanId+"}"),this.ar},t.prototype.Fo=function(e,n){return e.length<=n?e:e.substring(0,n)},t.prototype.ia=function(e){var n=this,r=this.ra;return r<=0?(X.warn("Attribute value limit must be positive, got "+r),e):typeof e=="string"?this.Fo(e,r):Array.isArray(e)?e.map(function(i){return typeof i=="string"?n.Fo(i,r):i}):e},t})(),Kn;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Kn||(Kn={}));var Oo=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Kn.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t})(),Jn=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Kn.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t})(),cl=(function(){function t(e){var n,r,i,o;this.sn=e.root,this.sn||(Ke(new Error("ParentBasedSampler must have a root sampler configured")),this.sn=new Jn),this.Ao=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Jn,this.Jo=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new Oo,this.Do=(i=e.localParentSampled)!==null&&i!==void 0?i:new Jn,this.Yo=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new Oo}return t.prototype.shouldSample=function(e,n,r,i,o,s){var a=ut.getSpanContext(e);return!a||!zo(a)?this.sn.shouldSample(e,n,r,i,o,s):a.isRemote?a.traceFlags&Ve.SAMPLED?this.Ao.shouldSample(e,n,r,i,o,s):this.Jo.shouldSample(e,n,r,i,o,s):a.traceFlags&Ve.SAMPLED?this.Do.shouldSample(e,n,r,i,o,s):this.Yo.shouldSample(e,n,r,i,o,s)},t.prototype.toString=function(){return"ParentBased{root="+this.sn.toString()+", remoteParentSampled="+this.Ao.toString()+", remoteParentNotSampled="+this.Jo.toString()+", localParentSampled="+this.Do.toString()+", localParentNotSampled="+this.Yo.toString()+"}"},t})(),Xd=(function(){function t(e){e===void 0&&(e=0),this.zr=e,this.zr=this.oa(e),this.sa=Math.floor(this.zr*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Im(n)&&this.aa(n)<this.sa?Kn.RECORD_AND_SAMPLED:Kn.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this.zr+"}"},t.prototype.oa=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype.aa=function(e){for(var n=0,r=0;r<e.length/8;r++){var i=r*8,o=parseInt(e.slice(i,i+8),16);n=(n^o)>>>0}return n},t})(),Ek=ye.AlwaysOn,Un=1;function Qm(){var t=Yn();return{sampler:$m(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function $m(t){switch(t===void 0&&(t=Yn()),t.OTEL_TRACES_SAMPLER){case ye.AlwaysOn:return new Jn;case ye.AlwaysOff:return new Oo;case ye.ParentBasedAlwaysOn:return new cl({root:new Jn});case ye.ParentBasedAlwaysOff:return new cl({root:new Oo});case ye.TraceIdRatio:return new Xd(Wd(t));case ye.ParentBasedTraceIdRatio:return new cl({root:new Xd(Wd(t))});default:return X.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Ek+'".'),new Jn}}function Wd(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return X.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Un+"."),Un;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(X.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Un+"."),Un):e<0||e>1?(X.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Un+"."),Un):e}function Rk(t){var e={sampler:$m()},n=Qm(),r=Object.assign({},n,e,t);return r.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),r}function Ck(t){var e,n,r,i,o,s,a,c,l,u,h,p,f=Object.assign({},t.spanLimits),m=iZ();return f.attributeCountLimit=(s=(o=(i=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(r=t.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:m.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:m.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:go,f.attributeValueLengthLimit=(p=(h=(u=(c=(a=t.spanLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&c!==void 0?c:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&u!==void 0?u:m.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:m.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:yo,Object.assign({},t,{spanLimits:f})}var Zk=(function(){function t(e,n){this.Un=e,this.Rr=!1,this.an=[],this.cr=0;var r=Yn();this.Mn=typeof(n==null?void 0:n.maxExportBatchSize)=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this.Br=typeof(n==null?void 0:n.maxQueueSize)=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this.la=typeof(n==null?void 0:n.scheduledDelayMillis)=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this.ca=typeof(n==null?void 0:n.exportTimeoutMillis)=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this.Cr=new tk(this.nn,this),this.Mn>this.Br&&(X.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this.Mn=this.Br)}return t.prototype.forceFlush=function(){return this.Cr.isCalled?this.Cr.promise:this.Ko()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this.Cr.isCalled||e.spanContext().traceFlags&Ve.SAMPLED&&this.ua(e)},t.prototype.shutdown=function(){return this.Cr.call()},t.prototype.nn=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e.Ko()}).then(function(){return e.Un.shutdown()})},t.prototype.ua=function(e){if(this.an.length>=this.Br){this.cr===0&&X.debug("maxQueueSize reached, dropping spans"),this.cr++;return}this.cr>0&&(X.warn("Dropped "+this.cr+" spans because maxQueueSize reached"),this.cr=0),this.an.push(e),this._o()},t.prototype.Ko=function(){var e=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(e.an.length/e.Mn),s=0,a=o;s<a;s++)i.push(e.Ho());Promise.all(i).then(function(){n()}).catch(r)})},t.prototype.Ho=function(){var e=this;return this.zo(),this.an.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},e.ca);tt.with(Cm(tt.active()),function(){var o;e.an.length<=e.Mn?(o=e.an,e.an=[]):o=e.an.splice(0,e.Mn);for(var s=function(){return e.Un.export(o,function(h){var p;clearTimeout(i),h.code===kt.SUCCESS?n():r((p=h.error)!==null&&p!==void 0?p:new Error("BatchSpanProcessor: span export failed"))})},a=null,c=0,l=o.length;c<l;c++){var u=o[c];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(a!=null||(a=[]),a.push(u.resource.waitForAsyncAttributes()))}a===null?s():Promise.all(a).then(s,function(h){Ke(h),r(h)})})})},t.prototype._o=function(){var e=this;if(!this.Rr){var n=function(){e.Rr=!0,e.Ho().finally(function(){e.Rr=!1,e.an.length>0&&(e.zo(),e._o())}).catch(function(r){e.Rr=!1,Ke(r)})};if(this.an.length>=this.Mn)return n();this.Zr===void 0&&(this.Zr=setTimeout(function(){return n()},this.la))}},t.prototype.zo=function(){this.Zr!==void 0&&(clearTimeout(this.Zr),this.Zr=void 0)},t})(),kk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),qm=(function(t){kk(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.onInit(r),i}return e.prototype.onInit=function(n){var r=this;(n==null?void 0:n.disableAutoFlushOnDocumentHide)!==!0&&typeof document<"u"&&(this.jr=function(){document.visibilityState==="hidden"&&r.forceFlush().catch(function(i){Ke(i)})},this.Qr=function(){r.forceFlush().catch(function(i){Ke(i)})},document.addEventListener("visibilitychange",this.jr),document.addEventListener("pagehide",this.Qr))},e.prototype.onShutdown=function(){typeof document<"u"&&(this.jr&&document.removeEventListener("visibilitychange",this.jr),this.Qr&&document.removeEventListener("pagehide",this.Qr))},e})(Zk),Vk=8,xk=16,Nk=(function(){function t(){this.generateTraceId=Ud(xk),this.generateSpanId=Ud(Vk)}return t})(),$i=Array(32);function Ud(t){return function(){for(var e=0;e<t*2;e++)$i[e]=Math.floor(Math.random()*16)+48,$i[e]>=58&&($i[e]+=39);return String.fromCharCode.apply(null,$i.slice(0,t*2))}}var Ok=(function(){function t(e,n,r){this.ha=r;var i=Rk(n);this.pa=i.sampler,this.da=i.generalLimits,this.Wn=i.spanLimits,this.Bo=n.idGenerator||new Nk,this.resource=r.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,r){var i,o,s;n===void 0&&(n={}),r===void 0&&(r=tt.active()),n.root&&(r=ut.deleteSpan(r));var a=ut.getSpan(r);if(Tc(r)){X.debug("Instrumentation suppressed, returning Noop Span");var c=ut.wrapSpanContext(Sm);return c}var l=a==null?void 0:a.spanContext(),u=this.Bo.generateSpanId(),h,p,f;!l||!ut.isSpanContextValid(l)?h=this.Bo.generateTraceId():(h=l.traceId,p=l.traceState,f=l.spanId);var m=(i=n.kind)!==null&&i!==void 0?i:Fr.INTERNAL,d=((o=n.links)!==null&&o!==void 0?o:[]).map(function(V){return{context:V.context,attributes:mo(V.attributes)}}),b=mo(n.attributes),v=this.pa.shouldSample(r,h,e,m,b,d);p=(s=v.traceState)!==null&&s!==void 0?s:p;var I=v.decision===ko.RECORD_AND_SAMPLED?Ve.SAMPLED:Ve.NONE,R={traceId:h,spanId:u,traceFlags:I,traceState:p};if(v.decision===ko.NOT_RECORD){X.debug("Recording is off, propagating context in a non-recording span");var c=ut.wrapSpanContext(R);return c}var E=mo(Object.assign(b,v.attributes)),T=new Tk(this,r,e,R,m,f,d,n.startTime,void 0,E);return T},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:tt.active(),l=this.startSpan(e,o,c),u=ut.setSpan(c,l);return tt.with(u,a,void 0,l)}},t.prototype.getGeneralLimits=function(){return this.da},t.prototype.getSpanLimits=function(){return this.Wn},t.prototype.getActiveSpanProcessor=function(){return this.ha.getActiveSpanProcessor()},t})(),Gk="service.name",Lk="telemetry.sdk.name",Xk="telemetry.sdk.language",Wk="telemetry.sdk.version",Uk=Gk,Md=Lk,Pd=Xk,Fd=Wk;function Mk(){return"unknown_service"}var Ae=function(){return Ae=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ae.apply(this,arguments)},Pk=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Fk=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ak=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ar=(function(){function t(e,n){var r=this,i;this.kr=e,this.asyncAttributesPending=n!=null,this.Vr=(i=this.kr)!==null&&i!==void 0?i:{},this.ur=n==null?void 0:n.then(function(o){return r.kr=Object.assign({},r.kr,o),r.asyncAttributesPending=!1,o},function(o){return X.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[Uk]=Mk(),e[Pd]=il[Pd],e[Md]=il[Md],e[Fd]=il[Fd],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&X.error("Accessing resource attributes before async attributes settled"),(e=this.kr)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return Pk(this,void 0,void 0,function(){return Fk(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this.ur]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var n=this,r;if(!e)return this;var i=Ae(Ae({},this.Vr),(r=e.Vr)!==null&&r!==void 0?r:e.attributes);if(!this.ur&&!e.ur)return new t(i);var o=Promise.all([this.ur,e.ur]).then(function(s){var a,c=Ak(s,2),l=c[0],u=c[1];return Ae(Ae(Ae(Ae({},n.Vr),l),(a=e.Vr)!==null&&a!==void 0?a:e.attributes),u)});return new t(i,o)},t.EMPTY=new t({}),t})(),qi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ad=(function(){function t(e){this.xr=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=qi(this.xr),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.forceFlush())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a){Promise.all(r).then(function(){a()}).catch(function(c){Ke(c||new Error("MultiSpanProcessor: forceFlush failed")),a()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=qi(this.xr),s=o.next();!s.done;s=o.next()){var a=s.value;a.onStart(e,n)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.onEnd=function(e){var n,r;try{for(var i=qi(this.xr),o=i.next();!o.done;o=i.next()){var s=o.value;s.onEnd(e)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,r=[];try{for(var i=qi(this.xr),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.shutdown())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a,c){Promise.all(r).then(function(){a()},c)})},t})(),Jk=(function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t})(),Dk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Yk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},cn;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(cn||(cn={}));var Kk=(function(){function t(e){e===void 0&&(e={});var n,r;this.Pn=[],this.$r=new Map;var i=Fm({},Qm(),Ck(e));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:Ar.empty(),i.mergeResourceWithDefaults&&(this.resource=Ar.default().merge(this.resource)),this.ce=Object.assign({},i,{resource:this.resource}),!((r=e.spanProcessors)===null||r===void 0)&&r.length)this.Pn=Yk([],Dk(e.spanProcessors),!1),this.activeSpanProcessor=new Ad(this.Pn);else{var o=this.fa();if(o!==void 0){var s=new qm(o);this.activeSpanProcessor=s}else this.activeSpanProcessor=new Jk}}return t.prototype.getTracer=function(e,n,r){var i=e+"@"+(n||"")+":"+((r==null?void 0:r.schemaUrl)||"");return this.$r.has(i)||this.$r.set(i,new Ok({name:e,version:n,schemaUrl:r==null?void 0:r.schemaUrl},this.ce,this)),this.$r.get(i)},t.prototype.addSpanProcessor=function(e){this.Pn.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return X.error("Error while trying to shutdown current span processor",n)}),this.Pn.push(e),this.activeSpanProcessor=new Ad(this.Pn)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),ut.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this.ma()),e.contextManager&&tt.setGlobalContextManager(e.contextManager),e.propagator&&Qt.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this.ce.forceFlushTimeoutMillis,n=this.Pn.map(function(r){return new Promise(function(i){var o,s=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),o=cn.timeout},e);r.forceFlush().then(function(){clearTimeout(s),o!==cn.timeout&&(o=cn.resolved,i(o))}).catch(function(a){clearTimeout(s),o=cn.error,i(a)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var s=o.filter(function(a){return a!==cn.resolved});s.length>0?i(s):r()}).catch(function(o){return i([o])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype.ya=function(e){var n;return(n=this.constructor.ga.get(e))===null||n===void 0?void 0:n()},t.prototype.ba=function(e){var n;return(n=this.constructor.va.get(e))===null||n===void 0?void 0:n()},t.prototype.ma=function(){var e=this,n=Array.from(new Set(Yn().OTEL_PROPAGATORS)),r=n.map(function(o){var s=e.ya(o);return s||X.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),s}),i=r.reduce(function(o,s){return s&&o.push(s),o},[]);if(i.length!==0)return n.length===1?i[0]:new Lm({propagators:i})},t.prototype.fa=function(){var e=Yn().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this.ba(e);return n||X.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t.ga=new Map([["tracecontext",function(){return new Xm}],["baggage",function(){return new Zm}]]),t.va=new Map,t})(),_k=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Hk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ty=(function(){function t(){this.qr=!1,this.Xe=an}return t.prototype.Sa=function(e,n){e===void 0&&(e=an);var r=this,i=function(){for(var o=this,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return r.with(e,function(){return n.apply(o,s)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},t.prototype.active=function(){return this.Xe},t.prototype.bind=function(e,n){return e===void 0&&(e=this.active()),typeof n=="function"?this.Sa(e,n):n},t.prototype.disable=function(){return this.Xe=an,this.qr=!1,this},t.prototype.enable=function(){return this.qr?this:(this.qr=!0,this.Xe=an,this)},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=this.Xe;this.Xe=e||an;try{return n.call.apply(n,Hk([r],_k(i),!1))}finally{this.Xe=s}},t})(),zk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Bk=(function(t){zk(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,n)||this;if(n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return r}return e.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new ty),n.contextManager&&n.contextManager.enable(),t.prototype.register.call(this,n)},e})(Kk),J;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(J||(J={}));var jk="http.response_content_length",Qk="http.response_content_length_uncompressed",$k=jk,qk=Qk,ul;function t1(){return ul||(ul=document.createElement("a")),ul}function _e(t,e){return e in t}function Rt(t,e,n,r){var i=void 0,o=void 0;_e(n,e)&&typeof n[e]=="number"&&(i=n[e]);var s=J.FETCH_START;if(_e(n,s)&&typeof n[s]=="number"&&(o=n[s]),i!==void 0&&o!==void 0&&i>=o)return t.addEvent(e,i),t}function _n(t,e,n){n===void 0&&(n=!1),n||(Rt(t,J.FETCH_START,e),Rt(t,J.DOMAIN_LOOKUP_START,e),Rt(t,J.DOMAIN_LOOKUP_END,e),Rt(t,J.CONNECT_START,e),_e(e,"name")&&e.name.startsWith("https:")&&Rt(t,J.SECURE_CONNECTION_START,e),Rt(t,J.CONNECT_END,e),Rt(t,J.REQUEST_START,e),Rt(t,J.RESPONSE_START,e),Rt(t,J.RESPONSE_END,e));var r=e[J.ENCODED_BODY_SIZE];r!==void 0&&t.setAttribute($k,r);var i=e[J.DECODED_BODY_SIZE];i!==void 0&&r!==i&&t.setAttribute(qk,i)}function e1(t){return t.slice().sort(function(e,n){var r=e[J.FETCH_START],i=n[J.FETCH_START];return r>i?1:r<i?-1:0})}function ey(){return typeof location<"u"?location.origin:void 0}function ny(t,e,n,r,i,o){i===void 0&&(i=new WeakSet);var s=Re(t);t=s.toString();var a=r1(t,e,n,r,i,o);if(a.length===0)return{mainRequest:void 0};if(a.length===1)return{mainRequest:a[0]};var c=e1(a);if(s.origin!==ey()&&c.length>1){var l=c[0],u=n1(c,l[J.RESPONSE_END],n),h=l[J.RESPONSE_END],p=u[J.FETCH_START];return p<h&&(u=l,l=void 0),{corsPreFlightRequest:l,mainRequest:u}}else return{mainRequest:a[0]}}function n1(t,e,n){for(var r=Ze(n),i=Ze(Gr(e)),o=t[1],s,a=t.length,c=1;c<a;c++){var l=t[c],u=Ze(Gr(l[J.FETCH_START])),h=Ze(Gr(l[J.RESPONSE_END])),p=r-h;u>=i&&(!s||p<s)&&(s=p,o=l)}return o}function r1(t,e,n,r,i,o){var s=Ze(e),a=Ze(n),c=r.filter(function(l){var u=Ze(Gr(l[J.FETCH_START])),h=Ze(Gr(l[J.RESPONSE_END]));return l.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&l.name===t&&u>=s&&h<=a});return c.length>0&&(c=c.filter(function(l){return!i.has(l)})),c}function Re(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=t1();return e.href=t,e}function ry(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=o1(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=ry(t.parentNode,!1)),r+=n,r}function i1(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var n=Array.from(t.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return e.indexOf(r.nodeType)>=0&&i===t.localName}),n.length>=1?n.indexOf(t)+1:0}function o1(t,e){var n=t.nodeType,r=i1(t),i="";if(n===Node.ELEMENT_NODE){var o=t.getAttribute("id");if(e&&o)return'//*[@id="'+o+'"]';i=t.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else if(n===Node.COMMENT_NODE)i="comment()";else return"";return i&&r>1?"/"+i+"["+r+"]":"/"+i}function iy(t,e){var n=e||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=Re(t);return r.origin===ey()?!0:n.some(function(i){return Dm(t,i)})}var Lr;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(Lr||(Lr={}));var s1="0.44.0",a1="@opentelemetry/instrumentation-document-load",l1="http.url",c1="http.user_agent",hl=l1,u1=c1,h1="deployment.environment",p1=h1,d1="service.name",f1="telemetry.sdk.name",m1="telemetry.sdk.version",y1="url.full",g1="url.path",b1="url.query",Go;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Go||(Go={}));var v1=function(){var t,e,n={},r=(e=(t=te).getEntriesByType)===null||e===void 0?void 0:e.call(t,"navigation")[0];if(r){var i=Object.values(J);i.forEach(function(a){if(_e(r,a)){var c=r[a];typeof c=="number"&&(n[a]=c)}})}else{var o=te,s=o.timing;if(s){var i=Object.values(J);i.forEach(function(c){if(_e(s,c)){var l=s[c];typeof l=="number"&&(n[c]=l)}})}}return n},Jd={"first-paint":Go.FIRST_PAINT,"first-contentful-paint":Go.FIRST_CONTENTFUL_PAINT},S1=function(t){var e,n,r=(n=(e=te).getEntriesByType)===null||n===void 0?void 0:n.call(e,"paint");r&&r.forEach(function(i){var o=i.name,s=i.startTime;_e(Jd,o)&&t.addEvent(Jd[o],s)})},w1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),I1=(function(t){w1(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,a1,s1,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return e.prototype.init=function(){},e.prototype.Fn=function(){var n=this;window.setTimeout(function(){n.wa()})},e.prototype.Ia=function(n){var r=this,i,o,s=(o=(i=te).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");s&&s.forEach(function(a){r.Ta(a,n)})},e.prototype.wa=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(s){return s.getAttribute("name")===bo}),i=v1(),o=r&&r.content||"";tt.with(Qt.extract(an,{traceparent:o}),function(){var s,a=n.ti(Lr.DOCUMENT_LOAD,J.FETCH_START,i);a&&(tt.with(ut.setSpan(tt.active(),a),function(){var c=n.ti(Lr.DOCUMENT_FETCH,J.FETCH_START,i);c&&(c.setAttribute(hl,location.href),tt.with(ut.setSpan(tt.active(),c),function(){var l;n.getConfig().ignoreNetworkEvents||_n(c,i),n.jo(c,(l=n.getConfig().applyCustomAttributesOnSpan)===null||l===void 0?void 0:l.documentFetch),n.kn(c,J.RESPONSE_END,i)}))}),a.setAttribute(hl,location.href),a.setAttribute(u1,navigator.userAgent),n.Ia(a),n.getConfig().ignoreNetworkEvents||(Rt(a,J.FETCH_START,i),Rt(a,J.UNLOAD_EVENT_START,i),Rt(a,J.UNLOAD_EVENT_END,i),Rt(a,J.DOM_INTERACTIVE,i),Rt(a,J.DOM_CONTENT_LOADED_EVENT_START,i),Rt(a,J.DOM_CONTENT_LOADED_EVENT_END,i),Rt(a,J.DOM_COMPLETE,i),Rt(a,J.LOAD_EVENT_START,i),Rt(a,J.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||S1(a),n.jo(a,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentLoad),n.kn(a,J.LOAD_EVENT_END,i))})},e.prototype.kn=function(n,r,i){n&&(_e(i,r)?n.end(i[r]):n.end())},e.prototype.Ta=function(n,r){var i,o=this.ti(Lr.RESOURCE_FETCH,J.FETCH_START,n,r);o&&(o.setAttribute(hl,n.name),this.getConfig().ignoreNetworkEvents||_n(o,n),this.Ea(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this.kn(o,J.RESPONSE_END,n))},e.prototype.ti=function(n,r,i,o){if(_e(i,r)&&typeof i[r]=="number"){var s=this.tracer.startSpan(n,{startTime:i[r]},o?ut.setSpan(tt.active(),o):void 0);return s}},e.prototype.Ra=function(){window.document.readyState==="complete"?this.Fn():(this.Fn=this.Fn.bind(this),window.addEventListener("load",this.Fn))},e.prototype.jo=function(n,r){var i=this;r&&Gd(function(){return r(n)},function(o){o&&i.v.error("addCustomAttributesOnSpan",o)})},e.prototype.Ea=function(n,r,i){var o=this;i&&Gd(function(){return i(n,r)},function(s){s&&o.v.error("addCustomAttributesOnResourceSpan",s)})},e.prototype.enable=function(){window.removeEventListener("load",this.Fn),this.Ra()},e.prototype.disable=function(){window.removeEventListener("load",this.Fn)},e})(jm),oy=(function(){function t(){}return t.prototype.emit=function(e){},t})(),T1=new oy,E1=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new oy},t})(),sy=new E1,R1=(function(){function t(e,n,r,i){this.Zn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.sr().emit(e)},t.prototype.sr=function(){if(this.b)return this.b;var e=this.Zn.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):T1},t})(),Dd=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new R1(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:sy},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),C1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},to=Symbol.for("io.opentelemetry.js.api.logs"),Rr=C1;function Z1(t,e,n){return function(r){return r===t?e:n}}var Yd=1,k1=(function(){function t(){this.en=new Dd}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Rr[to]?this.getLoggerProvider():(Rr[to]=Z1(Yd,e,sy),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Rr[to])===null||e===void 0?void 0:e.call(Rr,Yd))!==null&&n!==void 0?n:this.en},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Rr[to],this.en=new Dd},t})(),V1=k1.getInstance(),_l=function(){return _l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},_l.apply(this,arguments)},x1=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ce={},this.ae=qt.wrap,this.P=qt.unwrap,this.Lo=qt.massWrap,this.Xo=qt.massUnwrap,this.setConfig(r),this.v=X.createComponentLogger({namespace:e}),this.gn=ut.getTracer(e,n),this.bn=Ce.getMeter(e,n),this.vn=V1.getLogger(e,n),this.Sn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.bn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.bn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.Sn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.vn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.vn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.Sn=function(){},t.prototype.getConfig=function(){return this.ce},t.prototype.setConfig=function(e){this.ce=_l({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.gn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.gn},enumerable:!1,configurable:!0}),t.prototype.Wo=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.v.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),N1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),O1=(function(t){N1(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ce.enabled&&o.enable(),o}return e})(x1);function G1(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function L1(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Lo;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(Lo||(Lo={}));var X1="http.method",W1="http.url",U1="http.host",M1="http.scheme",P1="http.status_code",F1="http.user_agent",A1="http.request_content_length_uncompressed",J1=X1,D1=W1,Y1=U1,K1=M1,_1=P1,H1=F1,z1=A1,B1=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},j1=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Q1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ay=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function q1(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[0]instanceof URL||typeof t[0]=="string"){var n=t[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=tV(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(eV(n.body))}else{var s=t[0];return s!=null&&s.body?s.clone().text().then(function(a){return Hl(a)}):Promise.resolve()}}function tV(t){if(!t.pipeThrough)return ay.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};var e=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,s){return B1(this,void 0,void 0,function(){var a;return j1(this,function(c){switch(c.label){case 0:return[4,o];case 1:return a=c.sent(),e+=a.byteLength,s.enqueue(o),[2]}})})},flush:function(){n(e)}});return{body:t.pipeThrough(i),length:r}}function eV(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return rV(t);if(t instanceof URLSearchParams)return Hl(t.toString());if(typeof t=="string")return Hl(t);ay.warn("unknown body type")}var nV=new TextEncoder;function Hl(t){return nV.encode(t).byteLength}function rV(t){var e,n,r=0;try{for(var i=Q1(t.entries()),o=i.next();!o.done;o=i.next()){var s=$1(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var Kd="0.57.1",iV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),oV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},sV=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},pl,aV=300,_d=typeof process=="object"&&((pl=process.release)===null||pl===void 0?void 0:pl.name)==="node",lV=(function(t){iV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",Kd,n)||this;return r.component="fetch",r.version=Kd,r.moduleName=r.component,r.un=new WeakSet,r.wn=0,r}return e.prototype.init=function(){},e.prototype.ei=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]},ut.setSpan(tt.active(),n));_n(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[J.RESPONSE_END])},e.prototype.ii=function(n,r){var i=Re(r.url);n.setAttribute(_1,r.status),r.statusText!=null&&n.setAttribute(Lo.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(Y1,i.host),n.setAttribute(K1,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(H1,navigator.userAgent)},e.prototype.si=function(n,r){if(!iy(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};Qt.inject(tt.active(),i),Object.keys(i).length>0&&this.v.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)Qt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Headers)Qt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Map)Qt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else{var i={};Qt.inject(tt.active(),i),n.headers=Object.assign({},i,n.headers||{})}},e.prototype._i=function(){this.wn===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this.un=new WeakSet)},e.prototype.An=function(n,r){var i;if(r===void 0&&(r={}),Ym(n,this.getConfig().ignoreUrls)){this.v.debug("ignoring span as url matches ignored url");return}var o=(r.method||"GET").toUpperCase(),s="HTTP "+o;return this.tracer.startSpan(s,{kind:Fr.CLIENT,attributes:(i={},i[Lo.COMPONENT]=this.moduleName,i[J1]=o,i[D1]=n,i)})},e.prototype.eo=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var s=ny(r.spanUrl,r.startTime,i,o,this.un,"fetch");if(s.mainRequest){var a=s.mainRequest;this.hr(a);var c=s.corsPreFlightRequest;c&&(this.ei(n,c),this.hr(c)),_n(n,a,this.getConfig().ignoreNetworkEvents)}},e.prototype.hr=function(n){this.un.add(n)},e.prototype.kn=function(n,r,i){var o=this,s=$t(Date.now()),a=fn();this.ii(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o.eo(n,r,a),o.wn--,o._i(),n.end(s)},aV)},e.prototype.Ca=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=this,c=Re(o[0]instanceof Request?o[0].url:String(o[0])).href,l=o[0]instanceof Request?o[0]:o[1]||{},u=i.An(c,l);if(!u)return r.apply(this,o);var h=i.Za(c);i.getConfig().measureRequestSize&&q1.apply(void 0,sV([],oV(o),!1)).then(function(b){b&&u.setAttribute(z1,b)}).catch(function(b){i.v.warn("getFetchBodyLength",b)});function p(b,v){i.Qo(b,l,v),i.kn(b,h,{status:v.status||0,statusText:v.message,url:c})}function f(b,v){i.Qo(b,l,v),v.status>=200&&v.status<400?i.kn(b,h,v):i.kn(b,h,{status:v.status,statusText:v.statusText,url:c})}function m(b,v,I){try{var R=I.clone(),E=I.clone(),T=R.body;if(T){var V=T.getReader(),N=function(){V.read().then(function(U){var C=U.done;C?f(b,E):N()},function(U){p(b,U)})};N()}else f(b,I)}finally{v(I)}}function d(b,v,I){try{p(b,I)}finally{v(I)}}return new Promise(function(b,v){return tt.with(ut.setSpan(tt.active(),u),function(){return i.si(l,c),i.wn++,r.apply(a,l instanceof Request?[l]:[c,l]).then(m.bind(a,u,b),d.bind(a,u,v))})})}}},e.prototype.Qo=function(n,r,i){var o=this,s=this.getConfig().applyCustomAttributesOnSpan;s&&G1(function(){return s(n,r,i)},function(a){a&&o.v.error("applyCustomAttributesOnSpan",a)})},e.prototype.Za=function(n){var r=fn(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:r,spanUrl:n};var o=new PerformanceObserver(function(s){var a=s.getEntries();a.forEach(function(c){c.initiatorType==="fetch"&&c.name===n&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:r,spanUrl:n}},e.prototype.enable=function(){if(_d){this.v.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}L1(fetch)&&(this.P(Or,"fetch"),this.v.debug("removing previous patch for constructor")),this.ae(Or,"fetch",this.Ca())},e.prototype.disable=function(){_d||(this.P(Or,"fetch"),this.un=new WeakSet)},e})(O1),ly=(function(){function t(){}return t.prototype.emit=function(e){},t})(),cV=new ly,uV=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new ly},t})(),cy=new uV,hV=(function(){function t(e,n,r,i){this.Zn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.sr().emit(e)},t.prototype.sr=function(){if(this.b)return this.b;var e=this.Zn.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):cV},t})(),Hd=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new hV(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:cy},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),pV=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},eo=Symbol.for("io.opentelemetry.js.api.logs"),Cr=pV;function dV(t,e,n){return function(r){return r===t?e:n}}var zd=1,fV=(function(){function t(){this.en=new Hd}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Cr[eo]?this.getLoggerProvider():(Cr[eo]=dV(zd,e,cy),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Cr[eo])===null||e===void 0?void 0:e.call(Cr,zd))!==null&&n!==void 0?n:this.en},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Cr[eo],this.en=new Hd},t})(),mV=fV.getInstance(),zl=function(){return zl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zl.apply(this,arguments)},yV=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ce={},this.ae=qt.wrap,this.P=qt.unwrap,this.Lo=qt.massWrap,this.Xo=qt.massUnwrap,this.setConfig(r),this.v=X.createComponentLogger({namespace:e}),this.gn=ut.getTracer(e,n),this.bn=Ce.getMeter(e,n),this.vn=mV.getLogger(e,n),this.Sn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.bn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.bn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.Sn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.vn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.vn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.Sn=function(){},t.prototype.getConfig=function(){return this.ce},t.prototype.setConfig=function(e){this.ce=zl({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.gn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.gn},enumerable:!1,configurable:!0}),t.prototype.Wo=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.v.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),gV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),bV=(function(t){gV(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ce.enabled&&o.enable(),o}return e})(yV);function vV(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Bd(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var SV="http.method",wV="http.url",IV="http.host",TV="http.scheme",EV="http.status_code",RV="http.user_agent",CV="http.request_content_length_uncompressed",ZV=SV,kV=wV,VV=IV,xV=TV,NV=EV,OV=RV,GV=CV,Ee;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(Ee||(Ee={}));var LV=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},XV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},WV=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function UV(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return PV(t);if(t instanceof URLSearchParams)return jd(t.toString());if(typeof t=="string")return jd(t);WV.warn("unknown body type")}var MV=new TextEncoder;function jd(t){return MV.encode(t).byteLength}function PV(t){var e,n,r=0;try{for(var i=LV(t.entries()),o=i.next();!o.done;o=i.next()){var s=XV(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var Qd="0.57.1",Bl;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(Bl||(Bl={}));var FV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),AV=300,JV=(function(t){FV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Qd,n)||this;return r.component="xml-http-request",r.version=Qd,r.moduleName=r.component,r.wn=0,r.ln=new WeakMap,r.un=new WeakSet,r}return e.prototype.init=function(){},e.prototype.si=function(n,r){var i=Re(r).href;if(!iy(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};Qt.inject(tt.active(),o),Object.keys(o).length>0&&this.v.debug("headers inject skipped due to CORS policy");return}var s={};Qt.inject(tt.active(),s),Object.keys(s).forEach(function(a){n.setRequestHeader(a,String(s[a]))})},e.prototype.ei=function(n,r){var i=this;tt.with(ut.setSpan(tt.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]});_n(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[J.RESPONSE_END])})},e.prototype.ii=function(n,r,i){if(typeof i=="string"){var o=Re(i);r.status!==void 0&&n.setAttribute(NV,r.status),r.statusText!==void 0&&n.setAttribute(Bl.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(VV,o.host),n.setAttribute(xV,o.protocol.replace(":","")),n.setAttribute(OV,navigator.userAgent)}},e.prototype.ka=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&vV(function(){return o(n,r)},function(s){s&&i.v.error("applyCustomAttributesOnSpan",s)})},e.prototype.Va=function(n,r){var i=this.ln.get(n);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var s=o.getEntries(),a=Re(r);s.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===a.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._i=function(){this.wn===0&&this.getConfig().clearTimingResources&&(te.clearResourceTimings(),this.ln=new WeakMap,this.un=new WeakSet)},e.prototype.eo=function(n,r,i,o,s){if(!(!i||!o||!s||!n.createdResources)){var a=n.createdResources.entries;(!a||!a.length)&&(a=te.getEntriesByType("resource"));var c=ny(Re(i).href,o,s,a,this.un);if(c.mainRequest){var l=c.mainRequest;this.hr(l);var u=c.corsPreFlightRequest;u&&(this.ei(r,u),this.hr(u)),_n(r,l,this.getConfig().ignoreNetworkEvents)}}},e.prototype.xa=function(n){var r=this.ln.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this.ln.delete(n)}},e.prototype.An=function(n,r,i){var o;if(Ym(r,this.getConfig().ignoreUrls)){this.v.debug("ignoring span as url matches ignored url");return}var s=i.toUpperCase(),a=this.tracer.startSpan(s,{kind:Fr.CLIENT,attributes:(o={},o[ZV]=i,o[kV]=Re(r).toString(),o)});return a.addEvent(Ee.METHOD_OPEN),this.xa(n),this.ln.set(n,{span:a,spanUrl:r}),a},e.prototype.hr=function(n){this.un.add(n)},e.prototype.Na=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=o[0],c=o[1];return i.An(this,c,a),r.apply(this,o)}}},e.prototype.Oa=function(){var n=this;function r(u,h,p,f){var m=h.callbackToRemoveEvents;typeof m=="function"&&m();var d=h.span,b=h.spanUrl,v=h.sendStartTime;d&&(n.eo(h,d,b,v,p),d.addEvent(u,f),n.ii(d,h,b),d.end(f),n.wn--),n._i()}function i(u,h){var p=n.ln.get(h);if(p){p.status=h.status,p.statusText=h.statusText,n.ln.delete(h),p.span&&n.ka(p.span,h);var f=fn(),m=Date.now();setTimeout(function(){r(u,p,f,m)},AV)}}function o(){i(Ee.EVENT_ERROR,this)}function s(){i(Ee.EVENT_ABORT,this)}function a(){i(Ee.EVENT_TIMEOUT,this)}function c(){this.status<299?i(Ee.EVENT_LOAD,this):i(Ee.EVENT_ERROR,this)}function l(u){u.removeEventListener("abort",s),u.removeEventListener("error",o),u.removeEventListener("load",c),u.removeEventListener("timeout",a);var h=n.ln.get(u);h&&(h.callbackToRemoveEvents=void 0)}return function(u){return function(){for(var h=this,p=[],f=0;f<arguments.length;f++)p[f]=arguments[f];var m=n.ln.get(this);if(!m)return u.apply(this,p);var d=m.span,b=m.spanUrl;if(d&&b){if(n.getConfig().measureRequestSize&&p!=null&&p[0]){var v=p[0],I=UV(v);I!==void 0&&d.setAttribute(GV,I)}tt.with(ut.setSpan(tt.active(),d),function(){n.wn++,m.sendStartTime=fn(),d.addEvent(Ee.METHOD_SEND),h.addEventListener("abort",s),h.addEventListener("error",o),h.addEventListener("load",c),h.addEventListener("timeout",a),m.callbackToRemoveEvents=function(){l(h),m.createdResources&&m.createdResources.observer.disconnect()},n.si(h,b),n.Va(h,b)})}return u.apply(this,p)}}},e.prototype.enable=function(){this.v.debug("applying patch to",this.moduleName,this.version),Bd(XMLHttpRequest.prototype.open)&&(this.P(XMLHttpRequest.prototype,"open"),this.v.debug("removing previous patch from method open")),Bd(XMLHttpRequest.prototype.send)&&(this.P(XMLHttpRequest.prototype,"send"),this.v.debug("removing previous patch from method send")),this.ae(XMLHttpRequest.prototype,"open",this.Na()),this.ae(XMLHttpRequest.prototype,"send",this.Oa())},e.prototype.disable=function(){this.v.debug("removing patch from",this.moduleName,this.version),this.P(XMLHttpRequest.prototype,"open"),this.P(XMLHttpRequest.prototype,"send"),this.wn=0,this.ln=new WeakMap,this.un=new WeakSet},e})(bV),DV=(t,e,n)=>{var r,i;let o=mt({},e);return n?((r=Object.keys(o))==null||r.forEach(s=>{[...n].includes(s==null?void 0:s.toLowerCase())||(o[s]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(s=>{[...YV,...t].includes(s==null?void 0:s.toLowerCase())&&(o[s]="[REDACTED]")}),o)},YV=["authorization","cookie","proxy-authorization","token"],KV=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],_V=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),HV=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function zV(t){return!!(t.includes("/sdk/evalx")&&t.match(_V)||t.includes("/eval/")&&t.match(HV))}var BV=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),jV=t=>zV(t),QV=(t,e)=>e.some(n=>t.toLocaleLowerCase().includes(n)),$V=(t,e,n)=>!QV(t,e)&&!jV(t)&&!BV(t),qV=(t,e,n)=>{var r;if(n.some(s=>t.toLowerCase().includes(s)))return!1;let i=[];e===!0?(i=["localhost",/^\//],(r=window==null?void 0:window.location)!=null&&r.host&&i.push(window.location.host)):e instanceof Array&&(i=e);let o=!1;return i.forEach(s=>{t.match(s)&&(o=!0)}),o},$d=64*1024,tx={"application/json":64*1024*1024,"text/plain":64*1024*1024},uy=(t,e,n,r)=>{var i,o,s;let a=$d;if(r){let c="";typeof r.get=="function"?c=(i=r.get("content-type"))!=null?i:"":c=(o=r["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch(l){}a=(s=tx[c])!=null?s:$d}if(t){if(e)try{let c=JSON.parse(t);Array.isArray(c)?c.forEach(l=>{Object.keys(l).forEach(u=>{e.includes(u.toLocaleLowerCase())&&(l[u]="[REDACTED]")})}):Object.keys(c).forEach(l=>{e.includes(l.toLocaleLowerCase())&&(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}if(n)try{let c=JSON.parse(t);Object.keys(c).forEach(l=>{n.includes(l.toLocaleLowerCase())||(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}}try{t=t.slice(0,a)}catch(c){}return t},ex=(t,e,n)=>Yo(void 0,null,function*(){let r;try{let i=t.clone().body;if(i){let o=i.getReader(),s=new TextDecoder,a,c="";for(;!(a=yield o.read()).done;){let l=a.value;c+=s.decode(l)}r=c,r=uy(r,n,e,t.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r}),hy=(function(){function t(e){this.b=e}return t.prototype.export=function(e,n){this.b.export(e,n)},t.prototype.forceFlush=function(){return this.b.forceFlush()},t.prototype.shutdown=function(){return this.b.shutdown()},t})(),nx=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),qd=(function(t){nx(e,t);function e(n,r,i){var o=t.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return e})(Error);function rx(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}function ix(t){if(t!=null)return function(){return t}}function ox(t,e,n){var r,i,o,s,a,c;return{timeoutMillis:rx((i=(r=t.timeoutMillis)!==null&&r!==void 0?r:e.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(s=(o=t.concurrencyLimit)!==null&&o!==void 0?o:e.concurrencyLimit)!==null&&s!==void 0?s:n.concurrencyLimit,compression:(c=(a=t.compression)!==null&&a!==void 0?a:e.compression)!==null&&c!==void 0?c:n.compression}}function sx(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var ax=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},lx=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},cx=(function(){function t(e){this.pr=[],this.Ga=e}return t.prototype.pushPromise=function(e){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this.pr.push(e);var r=function(){var i=n.pr.indexOf(e);n.pr.splice(i,1)};e.then(r,r)},t.prototype.hasReachedLimit=function(){return this.pr.length>=this.Ga},t.prototype.awaitAll=function(){return ax(this,void 0,void 0,function(){return lx(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.pr)];case 1:return e.sent(),[2]}})})},t})();function ux(t){return new cx(t.concurrencyLimit)}function hx(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function px(){return{handleResponse:function(t){t==null||!hx(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||X.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var dx=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},fx=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},mx=(function(){function t(e,n,r,i,o){this.Jn=e,this.$o=n,this.La=r,this.no=i,this.Xa=o,this.ro=X.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(e,n){var r=this;if(this.ro.debug("items to be sent",e),this.no.hasReachedLimit()){n({code:kt.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this.$o.serializeRequest(e);if(i==null){n({code:kt.FAILED,error:new Error("Nothing to send")});return}this.no.pushPromise(this.Jn.send(i,this.Xa).then(function(o){if(o.status==="success"){if(o.data!=null)try{r.La.handleResponse(r.$o.deserializeResponse(o.data))}catch(s){r.ro.warn("Export succeeded but could not deserialize response - is the response specification compliant?",s,o.data)}n({code:kt.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:kt.FAILED,error:o.error});return}else o.status==="retryable"?n({code:kt.FAILED,error:new qd("Export failed with retryable status")}):n({code:kt.FAILED,error:new qd("Export failed with unknown error")})},function(o){return n({code:kt.FAILED,error:o})}))},t.prototype.forceFlush=function(){return this.no.awaitAll()},t.prototype.shutdown=function(){return dx(this,void 0,void 0,function(){return fx(this,function(e){switch(e.label){case 0:return this.ro.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this.Jn.shutdown(),[2]}})})},t})();function yx(t,e){return new mx(t.transport,t.serializer,px(),t.promiseHandler,e.timeout)}function py(t,e,n){return yx({transport:n,serializer:e,promiseHandler:ux(t)},{timeout:t.timeoutMillis})}function dy(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function gx(t){var e=Number(BigInt.asUintN(32,t)),n=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:n}}function fy(t){var e=dy(t);return gx(e)}function bx(t){var e=dy(t);return e.toString()}var vx=typeof BigInt<"u"?bx:Ze;function tf(t){return t}function my(t){if(t!==void 0)return Ec(t)}var Sx={encodeHrTime:fy,encodeSpanContext:Ec,encodeOptionalSpanContext:my};function yy(t){var e,n;if(t===void 0)return Sx;var r=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(n=t.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?fy:vx,encodeSpanContext:i?tf:Ec,encodeOptionalSpanContext:i?tf:my}}var wx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function gy(t){return{attributes:bn(t.attributes),droppedAttributesCount:0}}function by(t){return{name:t.name,version:t.version}}function bn(t){return Object.keys(t).map(function(e){return vy(e,t[e])})}function vy(t,e){return{key:t,value:Sy(e)}}function Sy(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(Sy)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(n){var r=wx(n,2),i=r[0],o=r[1];return vy(i,o)})}}:{}}var ae;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(ae||(ae={}));var be;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(be||(be={}));var Ix=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ef=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},nf=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Tx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ex=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Rx=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Cx(t){return t!=null}function wy(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(n){return[n,t[n]]})))}function Zx(t){var e,n;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((n=t.schemaUrl)!==null&&n!==void 0?n:"")}var Iy=(function(t){Ix(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e})(Error);function Jr(t,e){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new Iy("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function kx(t){return ef(this,void 0,void 0,function(){var e=this;return nf(this,function(n){return[2,Promise.all(t.map(function(r){return ef(e,void 0,void 0,function(){var i,o;return nf(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,r];case 1:return i=s.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=s.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function Vx(t){return t.status==="rejected"}function rf(t,e){var n=[];return t.forEach(function(r){n.push.apply(n,Ex([],Tx(e(r)),!1))}),n}function xx(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=Rx(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!e.has(s))return!1}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function Nx(t,e){for(var n=0,r=t.length-1,i=t.length;r>=n;){var o=n+Math.trunc((r-n)/2);t[o]<e?n=o+1:(i=o,r=o-1)}return i}function Ox(t,e){return t.toLowerCase()===e.toLowerCase()}var mn;(function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(mn||(mn={}));var Gx=(function(){function t(){this.kind=mn.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(e,n){},t.prototype.diff=function(e,n){},t.prototype.toMetricData=function(e,n,r,i){},t})(),K;(function(t){t.COUNTER="COUNTER",t.GAUGE="GAUGE",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(K||(K={}));function Me(t,e,n){var r,i,o,s;return Ux(t)||X.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,description:(r=n==null?void 0:n.description)!==null&&r!==void 0?r:"",unit:(i=n==null?void 0:n.unit)!==null&&i!==void 0?i:"",valueType:(o=n==null?void 0:n.valueType)!==null&&o!==void 0?o:Ye.DOUBLE,advice:(s=n==null?void 0:n.advice)!==null&&s!==void 0?s:{}}}function Lx(t,e){var n,r;return{name:(n=t.name)!==null&&n!==void 0?n:e.name,description:(r=t.description)!==null&&r!==void 0?r:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function Xx(t,e){return Ox(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var Wx=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Ux(t){return t.match(Wx)!=null}var Mx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function Px(t){var e=t.map(function(){return 0});return e.push(0),{buckets:{boundaries:t,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var dl=(function(){function t(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=Px(n)),this.startTime=e,this.dr=n,this.xt=r,this.le=i}return t.prototype.record=function(e){if(!Number.isNaN(e)){this.le.count+=1,this.le.sum+=e,this.xt&&(this.le.min=Math.min(e,this.le.min),this.le.max=Math.max(e,this.le.max),this.le.hasMinMax=!0);var n=Nx(this.dr,e);this.le.buckets.counts[n]+=1}},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.le},t})(),Ty=(function(){function t(e,n){this.dr=e,this.xt=n,this.kind=mn.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new dl(e,this.dr,this.xt)},t.prototype.merge=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=o[c]+s[c];var l=1/0,u=-1/0;return this.xt&&(r.hasMinMax&&i.hasMinMax?(l=Math.min(r.min,i.min),u=Math.max(r.max,i.max)):r.hasMinMax?(l=r.min,u=r.max):i.hasMinMax&&(l=i.min,u=i.max)),new dl(e.startTime,r.buckets.boundaries,this.xt,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:r.count+i.count,sum:r.sum+i.sum,hasMinMax:this.xt&&(r.hasMinMax||i.hasMinMax),min:l,max:u})},t.prototype.diff=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=s[c]-o[c];return new dl(n.startTime,r.buckets.boundaries,this.xt,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:i.count-r.count,sum:i.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.HISTOGRAM,dataPoints:r.map(function(o){var s=Mx(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===K.GAUGE||e.type===K.UP_DOWN_COUNTER||e.type===K.OBSERVABLE_GAUGE||e.type===K.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,buckets:l.buckets,count:l.count}}})}},t})(),fl=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ml=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},of=(function(){function t(e,n,r,i){e===void 0&&(e=new Fx),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=e,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),t.prototype.counts=function(){var e=this;return Array.from({length:this.length},function(n,r){return e.at(r)})},t.prototype.at=function(e){var n=this.indexBase-this.indexStart;return e<n&&(e+=this.backing.length),e-=n,this.backing.countAt(e)},t.prototype.incrementBucket=function(e,n){this.backing.increment(e,n)},t.prototype.decrementBucket=function(e,n){this.backing.decrement(e,n)},t.prototype.trim=function(){for(var e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this.qo()},t.prototype.downscale=function(e){this.qo();for(var n=1+this.indexEnd-this.indexStart,r=1<<e,i=0,o=0,s=this.indexStart;s<=this.indexEnd;){var a=s%r;a<0&&(a+=r);for(var c=a;c<r&&i<n;c++)this.Wa(o,i),i++,s++;o++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype.qo=function(){var e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)},t.prototype.Wa=function(e,n){e!==n&&this.incrementBucket(e,this.backing.emptyBucket(n))},t})(),Fx=(function(){function t(e){e===void 0&&(e=[0]),this.kt=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this.kt.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(e){return this.kt[e]},t.prototype.growTo=function(e,n,r){var i=new Array(e).fill(0);i.splice.apply(i,ml([r,this.kt.length-n],fl(this.kt.slice(n)),!1)),i.splice.apply(i,ml([0,n],fl(this.kt.slice(0,n)),!1)),this.kt=i},t.prototype.reverse=function(e,n){for(var r=Math.floor((e+n)/2)-e,i=0;i<r;i++){var o=this.kt[e+i];this.kt[e+i]=this.kt[n-i-1],this.kt[n-i-1]=o}},t.prototype.emptyBucket=function(e){var n=this.kt[e];return this.kt[e]=0,n},t.prototype.increment=function(e,n){this.kt[e]+=n},t.prototype.decrement=function(e,n){this.kt[e]>=n?this.kt[e]-=n:this.kt[e]=0},t.prototype.clone=function(){return new t(ml([],fl(this.kt),!1))},t})(),Ax=52,Jx=2146435072,Dx=1048575,Ey=1023,Ry=-1022,Cy=Ey,jl=Math.pow(2,-1022);function Zy(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=(n&Jx)>>20;return r-Ey}function ky(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4),i=(n&Dx)*Math.pow(2,32);return i+r}function Ql(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function Yx(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var Kx=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Dr=(function(t){Kx(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Error),_x=(function(){function t(e){this.Vn=-e}return t.prototype.mapToIndex=function(e){if(e<jl)return this.fr();var n=Zy(e),r=this.Ua(ky(e)-1,Ax);return n+r>>this.Vn},t.prototype.lowerBoundary=function(e){var n=this.fr();if(e<n)throw new Dr("underflow: "+e+" is < minimum lower boundary: "+n);var r=this.Nr();if(e>r)throw new Dr("overflow: "+e+" is > maximum lower boundary: "+r);return Ql(1,e<<this.Vn)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.Vn===0?0:-this.Vn},enumerable:!1,configurable:!0}),t.prototype.fr=function(){var e=Ry>>this.Vn;return this.Vn<2&&e--,e},t.prototype.Nr=function(){return Cy>>this.Vn},t.prototype.Ua=function(e,n){return Math.floor(e*Math.pow(2,-n))},t})(),Hx=(function(){function t(e){this.Dn=e,this.io=Ql(Math.LOG2E,e),this.Ma=Ql(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=jl)return this.fr()-1;if(ky(e)===0){var n=Zy(e);return(n<<this.Dn)-1}var r=Math.floor(Math.log(e)*this.io),i=this.Nr();return r>=i?i:r},t.prototype.lowerBoundary=function(e){var n=this.Nr();if(e>=n){if(e===n)return 2*Math.exp((e-(1<<this.Dn))/this.io);throw new Dr("overflow: "+e+" is > maximum lower boundary: "+n)}var r=this.fr();if(e<=r){if(e===r)return jl;if(e===r-1)return Math.exp((e+(1<<this.Dn))/this.io)/2;throw new Dr("overflow: "+e+" is < minimum lower boundary: "+r)}return Math.exp(e*this.Ma)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.Dn},enumerable:!1,configurable:!0}),t.prototype.fr=function(){return Ry<<this.Dn},t.prototype.Nr=function(){return(Cy+1<<this.Dn)-1},t})(),sf=-10,af=20,zx=Array.from({length:31},function(t,e){return e>10?new Hx(e-10):new _x(e-10)});function lf(t){if(t>af||t<sf)throw new Dr("expected scale >= "+sf+" && <= "+af+", got: "+t);return zx[t+10]}var Bx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},no=(function(){function t(e,n){this.low=e,this.high=n}return t.combine=function(e,n){return new t(Math.min(e.low,n.low),Math.max(e.high,n.high))},t})(),jx=20,Qx=160,yl=2,$x=(function(){function t(e,n,r,i,o,s,a,c,l,u,h){e===void 0&&(e=e),n===void 0&&(n=Qx),r===void 0&&(r=!0),i===void 0&&(i=0),o===void 0&&(o=0),s===void 0&&(s=0),a===void 0&&(a=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),l===void 0&&(l=new of),u===void 0&&(u=new of),h===void 0&&(h=lf(jx)),this.startTime=e,this.Ze=n,this.xt=r,this.mr=i,this.xn=o,this.Yn=s,this.Nn=a,this.On=c,this.oo=l,this.so=u,this.Kn=h,this.Ze<yl&&(X.warn("Exponential Histogram Max Size set to "+this.Ze+", changing to the minimum size of: "+yl),this.Ze=yl)}return t.prototype.record=function(e){this.updateByIncrement(e,1)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return{hasMinMax:this.xt,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(t.prototype,"sum",{get:function(){return this.mr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.Nn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.On},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.xn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this.Yn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this.xn===this.Yn?0:this.Kn.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this.oo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this.so},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(e,n){if(!Number.isNaN(e)){if(e>this.On&&(this.On=e),e<this.Nn&&(this.Nn=e),this.xn+=n,e===0){this.Yn+=n;return}this.mr+=e*n,e>0?this.us(this.oo,e,n):this.us(this.so,-e,n)}},t.prototype.merge=function(e){this.xn===0?(this.Nn=e.min,this.On=e.max):e.count!==0&&(e.min<this.min&&(this.Nn=e.min),e.max>this.max&&(this.On=e.max)),this.startTime=e.startTime,this.mr+=e.sum,this.xn+=e.count,this.Yn+=e.zeroCount;var n=this.hs(e);this.ao(this.scale-n),this.ps(this.positive,e,e.positive,n),this.ps(this.negative,e,e.negative,n)},t.prototype.diff=function(e){this.Nn=1/0,this.On=-1/0,this.mr-=e.sum,this.xn-=e.count,this.Yn-=e.zeroCount;var n=this.hs(e);this.ao(this.scale-n),this.ds(this.positive,e,e.positive,n),this.ds(this.negative,e,e.negative,n)},t.prototype.clone=function(){return new t(this.startTime,this.Ze,this.xt,this.mr,this.xn,this.Yn,this.Nn,this.On,this.positive.clone(),this.negative.clone(),this.Kn)},t.prototype.us=function(e,n,r){var i=this.Kn.mapToIndex(n),o=!1,s=0,a=0;if(e.length===0?(e.indexStart=i,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):i<e.indexStart&&e.indexEnd-i>=this.Ze?(o=!0,a=i,s=e.indexEnd):i>e.indexEnd&&i-e.indexStart>=this.Ze&&(o=!0,a=e.indexStart,s=i),o){var c=this.lo(s,a);this.ao(c),i=this.Kn.mapToIndex(n)}this.fs(e,i,r)},t.prototype.fs=function(e,n,r){if(r!==0){if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=n),n<e.indexStart){var i=e.indexEnd-n;i>=e.backing.length&&this.ms(e,i+1),e.indexStart=n}else if(n>e.indexEnd){var i=n-e.indexStart;i>=e.backing.length&&this.ms(e,i+1),e.indexEnd=n}var o=n-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,r)}},t.prototype.ms=function(e,n){var r=e.backing.length,i=e.indexBase-e.indexStart,o=r-i,s=Yx(n);s>this.Ze&&(s=this.Ze);var a=s-i;e.backing.growTo(s,o,a)},t.prototype.lo=function(e,n){for(var r=0;e-n>=this.Ze;)e>>=1,n>>=1,r++;return r},t.prototype.ao=function(e){if(e!==0){if(e<0)throw new Error("impossible change of scale: "+this.scale);var n=this.Kn.scale-e;this.oo.downscale(e),this.so.downscale(e),this.Kn=lf(n)}},t.prototype.hs=function(e){var n=Math.min(this.scale,e.scale),r=no.combine(this.Or(this.positive,this.scale,n),this.Or(e.positive,e.scale,n)),i=no.combine(this.Or(this.negative,this.scale,n),this.Or(e.negative,e.scale,n));return Math.min(n-this.lo(r.high,r.low),n-this.lo(i.high,i.low))},t.prototype.Or=function(e,n,r){if(e.length===0)return new no(0,-1);var i=n-r;return new no(e.indexStart>>i,e.indexEnd>>i)},t.prototype.ps=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++)this.fs(e,o+a>>s,r.at(a))},t.prototype.ds=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++){var c=o+a>>s,l=c-e.indexBase;l<0&&(l+=e.backing.length),e.decrementBucket(l,r.at(a))}e.trim()},t})(),qx=(function(){function t(e,n){this.Ze=e,this.xt=n,this.kind=mn.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new $x(e,this.Ze,this.xt)},t.prototype.merge=function(e,n){var r=n.clone();return r.merge(e),r},t.prototype.diff=function(e,n){var r=n.clone();return r.diff(e),r},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var s=Bx(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===K.GAUGE||e.type===K.UP_DOWN_COUNTER||e.type===K.OBSERVABLE_GAUGE||e.type===K.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,positive:{offset:l.positive.offset,bucketCounts:l.positive.bucketCounts},negative:{offset:l.negative.offset,bucketCounts:l.negative.bucketCounts},count:l.count,scale:l.scale,zeroCount:l.zeroCount}}})}},t})(),tN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},gl=(function(){function t(e,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=e,this.le=n,this.sampleTime=r}return t.prototype.record=function(e){this.le=e,this.sampleTime=$t(Date.now())},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.le},t})(),eN=(function(){function t(){this.kind=mn.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new gl(e)},t.prototype.merge=function(e,n){var r=ji(n.sampleTime)>=ji(e.sampleTime)?n:e;return new gl(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(e,n){var r=ji(n.sampleTime)>=ji(e.sampleTime)?n:e;return new gl(n.startTime,r.toPointValue(),r.sampleTime)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.GAUGE,dataPoints:r.map(function(o){var s=tN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t})(),nN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Zr=(function(){function t(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=e,this.monotonic=n,this.le=r,this.reset=i}return t.prototype.record=function(e){this.monotonic&&e<0||(this.le+=e)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.le},t})(),cf=(function(){function t(e){this.monotonic=e,this.kind=mn.SUM}return t.prototype.createAccumulation=function(e){return new Zr(e,this.monotonic)},t.prototype.merge=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return n.reset?new Zr(n.startTime,this.monotonic,i,n.reset):new Zr(e.startTime,this.monotonic,r+i)},t.prototype.diff=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return this.monotonic&&r>i?new Zr(n.startTime,this.monotonic,i,!0):new Zr(n.startTime,this.monotonic,i-r)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.SUM,dataPoints:r.map(function(o){var s=nN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t})(),vn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),xe=(function(){function t(){}return t.Drop=function(){return Vy},t.Sum=function(){return xy},t.LastValue=function(){return Ny},t.Histogram=function(){return Oy},t.ExponentialHistogram=function(){return uN},t.Default=function(){return hN},t})(),rN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Gx,e})(xe),iN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){switch(n.type){case K.COUNTER:case K.OBSERVABLE_COUNTER:case K.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new cf(!0),e.NON_MONOTONIC_INSTANCE=new cf(!1),e})(xe),oN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new eN,e})(xe),sN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Ty([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e})(xe),aN=(function(t){vn(e,t);function e(n,r){r===void 0&&(r=!0);var i=t.call(this)||this;if(i.xt=r,n==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort(function(a,c){return a-c});var o=n.lastIndexOf(-1/0),s=n.indexOf(1/0);return s===-1&&(s=void 0),i.dr=n.slice(o+1,s),i}return e.prototype.createAggregator=function(n){return new Ty(this.dr,this.xt)},e})(xe),lN=(function(t){vn(e,t);function e(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=t.call(this)||this;return i.Ze=n,i.xt=r,i}return e.prototype.createAggregator=function(n){return new qx(this.Ze,this.xt)},e})(xe),cN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.Kr=function(n){switch(n.type){case K.COUNTER:case K.UP_DOWN_COUNTER:case K.OBSERVABLE_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:return xy;case K.GAUGE:case K.OBSERVABLE_GAUGE:return Ny;case K.HISTOGRAM:return n.advice.explicitBucketBoundaries?new aN(n.advice.explicitBucketBoundaries):Oy}return X.warn("Unable to recognize instrument type: "+n.type),Vy},e.prototype.createAggregator=function(n){return this.Kr(n).createAggregator(n)},e})(xe),Vy=new rN,xy=new iN,Ny=new oN,Oy=new sN,uN=new lN,hN=new cN,pN=function(t){return xe.Default()},dN=function(t){return ae.CUMULATIVE},bl=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},vl=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},uf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},fN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},mN=(function(){function t(e){var n,r,i;this.nn=!1,this.co=(n=e==null?void 0:e.aggregationSelector)!==null&&n!==void 0?n:pN,this.uo=(r=e==null?void 0:e.aggregationTemporalitySelector)!==null&&r!==void 0?r:dN,this.Pa=(i=e==null?void 0:e.metricProducers)!==null&&i!==void 0?i:[],this.ys=e==null?void 0:e.cardinalitySelector}return t.prototype.setMetricProducer=function(e){if(this.ho)throw new Error("MetricReader can not be bound to a MeterProvider again.");this.ho=e,this.onInitialized()},t.prototype.selectAggregation=function(e){return this.co(e)},t.prototype.selectAggregationTemporality=function(e){return this.uo(e)},t.prototype.selectCardinalityLimit=function(e){return this.ys?this.ys(e):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(e){return bl(this,void 0,void 0,function(){var n,r,i,o,s,a;return vl(this,function(c){switch(c.label){case 0:if(this.ho===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this.nn)throw new Error("MetricReader is shutdown");return[4,Promise.all(fN([this.ho.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})],uf(this.Pa.map(function(l){return l.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})})),!1))];case 1:return n=uf.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(rf(i,function(l){return l.errors})),s=r.resourceMetrics.resource,a=r.resourceMetrics.scopeMetrics.concat(rf(i,function(l){return l.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:s,scopeMetrics:a},errors:o}]}})})},t.prototype.shutdown=function(e){return bl(this,void 0,void 0,function(){return vl(this,function(n){switch(n.label){case 0:return this.nn?(X.error("Cannot call shutdown twice."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,Jr(this.onShutdown(),e.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this.nn=!0,[2]}})})},t.prototype.forceFlush=function(e){return bl(this,void 0,void 0,function(){return vl(this,function(n){switch(n.label){case 0:return this.nn?(X.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,Jr(this.onForceFlush(),e.timeoutMillis)];case 3:return n.sent(),[2]}})})},t})(),yN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ro=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},io=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},gN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},bN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},vN=(function(t){yN(e,t);function e(n){var r,i,o,s,a=t.call(this,{aggregationSelector:(r=n.exporter.selectAggregation)===null||r===void 0?void 0:r.bind(n.exporter),aggregationTemporalitySelector:(i=n.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(n.exporter),metricProducers:n.metricProducers})||this;if(n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<n.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return a.Fa=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,a.po=(s=n.exportTimeoutMillis)!==null&&s!==void 0?s:3e4,a.Un=n.exporter,a}return e.prototype.gs=function(){return ro(this,void 0,void 0,function(){var n;return io(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Jr(this.Aa(),this.po)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof Iy?(X.error("Export took longer than %s milliseconds and timed out.",this.po),[2]):(Ke(n),[3,3]);case 3:return[2]}})})},e.prototype.Aa=function(){var n,r;return ro(this,void 0,void 0,function(){var i,o,s,a,c,l;return io(this,function(u){switch(u.label){case 0:return[4,this.collect({timeoutMillis:this.po})];case 1:if(i=u.sent(),o=i.resourceMetrics,s=i.errors,s.length>0&&(l=X).error.apply(l,bN(["PeriodicExportingMetricReader: metrics collection errors"],gN(s),!1)),!o.resource.asyncAttributesPending)return[3,5];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,(r=(n=o.resource).waitForAsyncAttributes)===null||r===void 0?void 0:r.call(n)];case 3:return u.sent(),[3,5];case 4:return a=u.sent(),X.debug("Error while resolving async portion of resource: ",a),Ke(a),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,nk.qs(this.Un,o)];case 6:if(c=u.sent(),c.code!==kt.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},e.prototype.onInitialized=function(){var n=this;this.bs=setInterval(function(){n.gs()},this.Fa)},e.prototype.onForceFlush=function(){return ro(this,void 0,void 0,function(){return io(this,function(n){switch(n.label){case 0:return[4,this.gs()];case 1:return n.sent(),[4,this.Un.forceFlush()];case 2:return n.sent(),[2]}})})},e.prototype.onShutdown=function(){return ro(this,void 0,void 0,function(){return io(this,function(n){switch(n.label){case 0:return this.bs&&clearInterval(this.bs),[4,this.onForceFlush()];case 1:return n.sent(),[4,this.Un.shutdown()];case 2:return n.sent(),[2]}})})},e})(mN),SN=(function(){function t(){this.vs=[]}return t.prototype.addView=function(e){this.vs.push(e)},t.prototype.findViews=function(e,n){var r=this,i=this.vs.filter(function(o){return r.Ja(o.instrumentSelector,e)&&r.Da(o.meterSelector,n)});return i},t.prototype.Ja=function(e,n){return(e.getType()===void 0||n.type===e.getType())&&e.getNameFilter().match(n.name)&&e.getUnitFilter().match(n.unit)},t.prototype.Da=function(e,n){return e.getNameFilter().match(n.name)&&(n.version===void 0||e.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||e.getSchemaUrlFilter().match(n.schemaUrl))},t})(),Sn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Bo=(function(){function t(e,n){this.Ya=e,this.rn=n}return t.prototype.Gr=function(e,n,r){if(n===void 0&&(n={}),r===void 0&&(r=tt.active()),typeof e!="number"){X.warn("non-number value provided to metric "+this.rn.name+": "+e);return}this.rn.valueType===Ye.INT&&!Number.isInteger(e)&&(X.warn("INT value type cannot accept a floating-point value for "+this.rn.name+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Ya.record(e,n,r,$t(Date.now()))},t})(),wN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){this.Gr(n,r,i)},e})(Bo),IN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){if(n<0){X.warn("negative value provided to counter "+this.rn.name+": "+n);return}this.Gr(n,r,i)},e})(Bo),TN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){this.Gr(n,r,i)},e})(Bo),EN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){if(n<0){X.warn("negative value provided to histogram "+this.rn.name+": "+n);return}this.Gr(n,r,i)},e})(Bo),jo=(function(){function t(e,n,r){this.Ss=r,this.rn=e,this.ws=n}return t.prototype.addCallback=function(e){this.Ss.addCallback(e,this)},t.prototype.removeCallback=function(e){this.Ss.removeCallback(e,this)},t})(),RN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(jo),CN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(jo),ZN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(jo);function $l(t){return t instanceof jo}var kN=(function(){function t(e){this.Qe=e}return t.prototype.createGauge=function(e,n){var r=Me(e,K.GAUGE,n),i=this.Qe.registerMetricStorage(r);return new TN(i,r)},t.prototype.createHistogram=function(e,n){var r=Me(e,K.HISTOGRAM,n),i=this.Qe.registerMetricStorage(r);return new EN(i,r)},t.prototype.createCounter=function(e,n){var r=Me(e,K.COUNTER,n),i=this.Qe.registerMetricStorage(r);return new IN(i,r)},t.prototype.createUpDownCounter=function(e,n){var r=Me(e,K.UP_DOWN_COUNTER,n),i=this.Qe.registerMetricStorage(r);return new wN(i,r)},t.prototype.createObservableGauge=function(e,n){var r=Me(e,K.OBSERVABLE_GAUGE,n),i=this.Qe.registerAsyncMetricStorage(r);return new CN(r,i,this.Qe.observableRegistry)},t.prototype.createObservableCounter=function(e,n){var r=Me(e,K.OBSERVABLE_COUNTER,n),i=this.Qe.registerAsyncMetricStorage(r);return new RN(r,i,this.Qe.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,n){var r=Me(e,K.OBSERVABLE_UP_DOWN_COUNTER,n),i=this.Qe.registerAsyncMetricStorage(r);return new ZN(r,i,this.Qe.observableRegistry)},t.prototype.addBatchObservableCallback=function(e,n){this.Qe.observableRegistry.addBatchCallback(e,n)},t.prototype.removeBatchObservableCallback=function(e,n){this.Qe.observableRegistry.removeBatchCallback(e,n)},t})(),Gy=(function(){function t(e){this.hn=e}return t.prototype.getInstrumentDescriptor=function(){return this.hn},t.prototype.updateDescription=function(e){this.hn=Me(this.hn.name,this.hn.type,{description:e,valueType:this.hn.valueType,unit:this.hn.unit,advice:this.hn.advice})},t})(),VN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),hf=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},xN=(function(){function t(e){this.Lr=e,this.In=new Map,this._n=new Map}return t.prototype.get=function(e,n){return n!=null||(n=this.Lr(e)),this.In.get(n)},t.prototype.getOrDefault=function(e,n){var r=this.Lr(e);if(this.In.has(r))return this.In.get(r);var i=n();return this._n.has(r)||this._n.set(r,e),this.In.set(r,i),i},t.prototype.set=function(e,n,r){r!=null||(r=this.Lr(e)),this._n.has(r)||this._n.set(r,e),this.In.set(r,n)},t.prototype.has=function(e,n){return n!=null||(n=this.Lr(e)),this.In.has(n)},t.prototype.keys=function(){var e,n;return hf(this,function(r){switch(r.label){case 0:e=this._n.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var e,n;return hf(this,function(r){switch(r.label){case 0:e=this.In.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this._n.get(n.value[0]),n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this.In.size},enumerable:!1,configurable:!0}),t})(),hn=(function(t){VN(e,t);function e(){return t.call(this,wy)||this}return e})(xN),NN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ly=(function(){function t(e,n){this.cn=e,this.pn=new hn,this.Hn=new hn,this.fo={"otel.metric.overflow":!0},this.Is=(n!=null?n:2e3)-1,this.Ka=wy(this.fo)}return t.prototype.record=function(e,n,r,i){var o=this,s=this.pn.get(n);if(!s){if(this.pn.size>=this.Is){var a=this.pn.getOrDefault(this.fo,function(){return o.cn.createAccumulation(i)});a==null||a.record(e);return}s=this.cn.createAccumulation(i),this.pn.set(n,s)}s==null||s.record(e)},t.prototype.batchCumulate=function(e,n){var r=this;Array.from(e.entries()).forEach(function(i){var o=NN(i,3),s=o[0],a=o[1],c=o[2],l=r.cn.createAccumulation(n);l==null||l.record(a);var u=l;if(r.Hn.has(s,c)){var h=r.Hn.get(s,c);u=r.cn.diff(h,l)}else if(r.Hn.size>=r.Is&&(s=r.fo,c=r.Ka,r.Hn.has(s,c))){var h=r.Hn.get(s,c);u=r.cn.diff(h,l)}if(r.pn.has(s,c)){var p=r.pn.get(s,c);u=r.cn.merge(p,u)}r.Hn.set(s,l,c),r.pn.set(s,u,c)})},t.prototype.collect=function(){var e=this.pn;return this.pn=new hn,e},t})(),Sl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Xy=(function(){function t(e,n){var r=this;this.cn=e,this.zn=new Map,this.mo=new Map,n.forEach(function(i){r.zn.set(i,[])})}return t.prototype.buildMetrics=function(e,n,r,i){this._a(r);var o=this.Ha(e),s=o,a;if(this.mo.has(e)){var c=this.mo.get(e),l=c.collectionTime;a=c.aggregationTemporality,a===ae.CUMULATIVE?s=t.merge(c.accumulations,o,this.cn):s=t.calibrateStartTime(c.accumulations,o,l)}else a=e.selectAggregationTemporality(n.type);this.mo.set(e,{accumulations:s,collectionTime:i,aggregationTemporality:a});var u=ON(s);if(u.length!==0)return this.cn.toMetricData(n,a,u,i)},t.prototype._a=function(e){var n,r,i=this.zn.keys();try{for(var o=Sl(i),s=o.next();!s.done;s=o.next()){var a=s.value,c=this.zn.get(a);c===void 0&&(c=[],this.zn.set(a,c)),c.push(e)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.Ha=function(e){var n,r,i=new hn,o=this.zn.get(e);if(this.zn.set(e,[]),o===void 0)return i;try{for(var s=Sl(o),a=s.next();!a.done;a=s.next()){var c=a.value;i=t.merge(i,c,this.cn)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},t.merge=function(e,n,r){for(var i=e,o=n.entries(),s=o.next();s.done!==!0;){var a=pf(s.value,3),c=a[0],l=a[1],u=a[2];if(e.has(c,u)){var h=e.get(c,u),p=r.merge(h,l);i.set(c,p,u)}else i.set(c,l,u);s=o.next()}return i},t.calibrateStartTime=function(e,n,r){var i,o;try{for(var s=Sl(e.keys()),a=s.next();!a.done;a=s.next()){var c=pf(a.value,2),l=c[0],u=c[1],h=n.get(l,u);h==null||h.setStartTime(r)}}catch(p){i={error:p}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n},t})();function ON(t){return Array.from(t.entries())}var GN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),LN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},XN=(function(t){GN(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.yo=i,a.bo=s,a.yr=new Ly(r,a.bo),a.vo=new Xy(r,o),a}return e.prototype.record=function(n,r){var i=this,o=new hn;Array.from(n.entries()).forEach(function(s){var a=LN(s,2),c=a[0],l=a[1];o.set(i.yo.process(c),l)}),this.yr.batchCumulate(o,r)},e.prototype.collect=function(n,r){var i=this.yr.collect();return this.vo.buildMetrics(n,this.hn,i,r)},e})(Gy);function df(t,e){var n="";return t.unit!==e.unit&&(n+=" - Unit '"+t.unit+"' does not match '"+e.unit+`'
|
|
631
|
+
`).filter(function(c){return!!c.match(r)&&!c.match(/^Error created at/)},this);return a.map(function(c){var l=c.split("@"),u=this.extractLocation(l.pop()),h=l.shift()||"",p=h.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,f;h.match(/\(([^)]*)\)/)&&(f=h.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var m=f===void 0||f==="[arguments not available]"?void 0:f.split(",");return new n({functionName:p,args:m,fileName:u[0],lineNumber:u[1],columnNumber:u[2],source:c})},this)}}})})(mm);var dR=mm.exports,bd=pc(dR);function Ko(t){try{return bd.parse(t)}catch(e){try{return bd.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:n}),[]}}}function fR(t,e){let n=e.logger,r;r=window[n];let i=[];if(e.level.includes("error")&&window){let s=a=>{let{message:c,error:l}=a,u=[];l&&(u=Ko(l));let h=[Wl(c,e.stringifyOptions)];t({type:"Error",trace:u,time:Date.now(),value:h})};window.addEventListener("error",s),i.push(()=>{window&&window.removeEventListener("error",s)})}for(let s of e.level)i.push(o(r,s));return()=>{i.forEach(s=>s())};function o(s,a){return s[a]?CE(s,a,c=>(...l)=>{c.apply(this,l);try{t(mR(a,e,...l))}catch(u){c("highlight logger error:",u,...l)}}):()=>{}}}function mR(t,e,...n){let r=Ko(new Error),i=e.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Wl(o,e.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:r.slice(1),value:i,attributes:Wl(n.filter(o=>typeof o=="object").reduce((o,s)=>mt(mt({},o),s),{}),e.stringifyOptions),time:Date.now()}}function Qa(t,e,n,r){var i,o,s,a;let c=r!=null?r:e,l=Ko(c),u={};e instanceof Error&&(e=e.message,e.cause&&(u={"exception.cause":e.cause}));let h=gR(l);t({error:c,event:sn(e),type:"window.onerror",url:window.location.href,source:n!=null?n:"",lineNumber:(i=h[0])!=null&&i.lineNumber?(o=h[0])==null?void 0:o.lineNumber:0,columnNumber:(s=h[0])!=null&&s.columnNumber?(a=h[0])==null?void 0:a.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString(),payload:u?sn(u):void 0})}var yR=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};let n=window.onerror=(s,a,c,l,u)=>{Qa(t,s,a,u)},r=window.onunhandledrejection=s=>{if(s.reason){let a=s.promise;a.getStack?Qa(t,s.reason,s.type,a.getStack()):Qa(t,s.reason,s.type)}},i=window.Promise,o=class extends i{constructor(s){super(s),yt(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){let s=typeof window.Zone>"u";return e&&s}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},gR=t=>{var e,n;if(t.length===0)return t;let r=t[0];return(e=r.fileName)!=null&&e.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?t.slice(1):t},vd=['["\\"Script error.\\""]','"Script error."','["\\"Load failed.\\""]','"Load failed."','["\\"Network request failed.\\""]','"Network request failed."','["\\"Document is not focused.\\""]','"Document is not focused."','["\\"Failed to fetch\\""]','"Failed to fetch"','[{"isTrusted":true}]','{"isTrusted":true}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],Sd=["websocket error",'\\"ResizeObserver loop'],bR=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},un="1.9.0",wd=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function vR(t){var e=new Set([t]),n=new Set,r=t.match(wd);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(a){return a===t};function o(a){return n.add(a),!1}function s(a){return e.add(a),!0}return function(a){if(e.has(a))return!0;if(n.has(a))return!1;var c=a.match(wd);if(!c)return o(a);var l={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return l.prerelease!=null||i.major!==l.major?o(a):i.major===0?i.minor===l.minor&&i.patch<=l.patch?s(a):o(a):i.minor<=l.minor?s(a):o(a)}}var SR=vR(un),wR=un.split(".")[0],Mr=Symbol.for("opentelemetry.js.api."+wR),Pr=bR;function Kr(t,e,n,r){var i;r===void 0&&(r=!1);var o=Pr[Mr]=(i=Pr[Mr])!==null&&i!==void 0?i:{version:un};if(!r&&o[t]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(s.stack||s.message),!1}if(o.version!==un){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+un);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+un+"."),!0}function dn(t){var e,n,r=(e=Pr[Mr])===null||e===void 0?void 0:e.version;if(!(!r||!SR(r)))return(n=Pr[Mr])===null||n===void 0?void 0:n[t]}function _r(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+un+".");var n=Pr[Mr];n&&delete n[t]}var IR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},TR=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ER=(function(){function t(e){this.ir=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return wr("debug",this.ir,e)},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return wr("error",this.ir,e)},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return wr("info",this.ir,e)},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return wr("warn",this.ir,e)},t.prototype.verbose=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return wr("verbose",this.ir,e)},t})();function wr(t,e,n){var r=dn("diag");if(r)return n.unshift(e),r[t].apply(r,TR([],IR(n),!1))}var St;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(St||(St={}));function RR(t,e){t<St.NONE?t=St.NONE:t>St.ALL&&(t=St.ALL),e=e||{};function n(r,i){var o=e[r];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:n("error",St.ERROR),warn:n("warn",St.WARN),info:n("info",St.INFO),debug:n("debug",St.DEBUG),verbose:n("verbose",St.VERBOSE)}}var CR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ZR=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},kR="diag",ve=(function(){function t(){function e(i){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=dn("diag");if(a)return a[i].apply(a,ZR([],CR(o),!1))}}var n=this,r=function(i,o){var s,a,c;if(o===void 0&&(o={logLevel:St.INFO}),i===n){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=l.stack)!==null&&s!==void 0?s:l.message),!1}typeof o=="number"&&(o={logLevel:o});var u=dn("diag"),h=RR((a=o.logLevel)!==null&&a!==void 0?a:St.INFO,i);if(u&&!o.suppressOverrideMessage){var p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+p),h.warn("Current logger will overwrite one already registered from "+p)}return Kr("diag",h,n,!0)};n.setLogger=r,n.disable=function(){_r(kR,n)},n.createComponentLogger=function(i){return new ER(i)},n.verbose=e("verbose"),n.debug=e("debug"),n.info=e("info"),n.warn=e("warn"),n.error=e("error")}return t.instance=function(){return this.V||(this.V=new t),this.V},t})(),VR=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},xR=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},NR=(function(){function t(e){this.yn=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var n=this.yn.get(e);if(n)return Object.assign({},n)},t.prototype.getAllEntries=function(){return Array.from(this.yn.entries()).map(function(e){var n=VR(e,2),r=n[0],i=n[1];return[r,i]})},t.prototype.setEntry=function(e,n){var r=new t(this.yn);return r.yn.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this.yn);return n.yn.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new t(this.yn);try{for(var s=xR(r),a=s.next();!a.done;a=s.next()){var c=a.value;o.yn.delete(c)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t})(),OR=Symbol("BaggageEntryMetadata"),GR=ve.instance();function LR(t){return t===void 0&&(t={}),new NR(new Map(Object.entries(t)))}function XR(t){return typeof t!="string"&&(GR.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:OR,toString:function(){return t}}}function gc(t){return Symbol.for(t)}var WR=(function(){function t(e){var n=this;n.Xe=e?new Map(e):new Map,n.getValue=function(r){return n.Xe.get(r)},n.setValue=function(r,i){var o=new t(n.Xe);return o.Xe.set(r,i),o},n.deleteValue=function(r){var i=new t(n.Xe);return i.Xe.delete(r),i}}return t})(),an=new WR,gn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),UR=(function(){function t(){}return t.prototype.createGauge=function(e,n){return _R},t.prototype.createHistogram=function(e,n){return HR},t.prototype.createCounter=function(e,n){return KR},t.prototype.createUpDownCounter=function(e,n){return zR},t.prototype.createObservableGauge=function(e,n){return jR},t.prototype.createObservableCounter=function(e,n){return BR},t.prototype.createObservableUpDownCounter=function(e,n){return QR},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t})(),_o=(function(){function t(){}return t})(),MR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(_o),PR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(_o),FR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(_o),AR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(_o),bc=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),JR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(bc),DR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(bc),YR=(function(t){gn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(bc),ym=new UR,KR=new MR,_R=new FR,HR=new AR,zR=new PR,BR=new JR,jR=new DR,QR=new YR;function $R(){return ym}var Ye;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(Ye||(Ye={}));var qR={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},tC={set:function(t,e,n){t!=null&&(t[e]=n)}},eC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},nC=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},rC=(function(){function t(){}return t.prototype.active=function(){return an},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,nC([r],eC(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})(),iC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},oC=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},$a="context",sC=new rC,Ho=(function(){function t(){}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalContextManager=function(e){return Kr($a,e,ve.instance())},t.prototype.active=function(){return this.Ir().active()},t.prototype.with=function(e,n,r){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this.Ir()).with.apply(i,oC([e,n,r],iC(o),!1))},t.prototype.bind=function(e,n){return this.Ir().bind(e,n)},t.prototype.Ir=function(){return dn($a)||sC},t.prototype.disable=function(){this.Ir().disable(),_r($a,ve.instance())},t})(),Ve;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(Ve||(Ve={}));var gm="0000000000000000",bm="00000000000000000000000000000000",vm={traceId:bm,spanId:gm,traceFlags:Ve.NONE},Nr=(function(){function t(e){e===void 0&&(e=vm),this.Cn=e}return t.prototype.spanContext=function(){return this.Cn},t.prototype.setAttribute=function(e,n){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,n){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,n){},t})(),vc=gc("OpenTelemetry Context Key SPAN");function Sc(t){return t.getValue(vc)||void 0}function aC(){return Sc(Ho.getInstance().active())}function wc(t,e){return t.setValue(vc,e)}function lC(t){return t.deleteValue(vc)}function cC(t,e){return wc(t,new Nr(e))}function Sm(t){var e;return(e=Sc(t))===null||e===void 0?void 0:e.spanContext()}var uC=/^([0-9a-f]{32})$/i,hC=/^[0-9a-f]{16}$/i;function wm(t){return uC.test(t)&&t!==bm}function pC(t){return hC.test(t)&&t!==gm}function zo(t){return wm(t.traceId)&&pC(t.spanId)}function dC(t){return new Nr(t)}var qa=Ho.getInstance(),Im=(function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=qa.active());var i=!!(n!=null&&n.root);if(i)return new Nr;var o=r&&Sm(r);return fC(o)&&zo(o)?new Nr(o):new Nr},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:qa.active(),l=this.startSpan(e,o,c),u=wc(c,l);return qa.with(u,a,void 0,l)}},t})();function fC(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var mC=new Im,yC=(function(){function t(e,n,r,i){this.Zn=e,this.name=n,this.version=r,this.options=i}return t.prototype.startSpan=function(e,n,r){return this.Oo().startSpan(e,n,r)},t.prototype.startActiveSpan=function(e,n,r,i){var o=this.Oo();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype.Oo=function(){if(this.b)return this.b;var e=this.Zn.getDelegateTracer(this.name,this.version,this.options);return e?(this.b=e,this.b):mC},t})(),gC=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new Im},t})(),bC=new gC,Id=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){var i;return(i=this.getDelegateTracer(e,n,r))!==null&&i!==void 0?i:new yC(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:bC},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateTracer=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getTracer(e,n,r)},t})(),ko;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ko||(ko={}));var Fr;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(Fr||(Fr={}));var Vo;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Vo||(Vo={}));var tt=Ho.getInstance(),X=ve.instance(),vC=(function(){function t(){}return t.prototype.getMeter=function(e,n,r){return ym},t})(),SC=new vC,tl="metrics",wC=(function(){function t(){}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalMeterProvider=function(e){return Kr(tl,e,ve.instance())},t.prototype.getMeterProvider=function(){return dn(tl)||SC},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){_r(tl,ve.instance())},t})(),Ce=wC.getInstance(),IC=(function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t})(),Ic=gc("OpenTelemetry Baggage Key");function Tm(t){return t.getValue(Ic)||void 0}function TC(){return Tm(Ho.getInstance().active())}function EC(t,e){return t.setValue(Ic,e)}function RC(t){return t.deleteValue(Ic)}var el="propagation",CC=new IC,ZC=(function(){function t(){this.createBaggage=LR,this.getBaggage=Tm,this.getActiveBaggage=TC,this.setBaggage=EC,this.deleteBaggage=RC}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalPropagator=function(e){return Kr(el,e,ve.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=tC),this.Dr().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=qR),this.Dr().extract(e,n,r)},t.prototype.fields=function(){return this.Dr().fields()},t.prototype.disable=function(){_r(el,ve.instance())},t.prototype.Dr=function(){return dn(el)||CC},t})(),Qt=ZC.getInstance(),nl="trace",kC=(function(){function t(){this.Tr=new Id,this.wrapSpanContext=dC,this.isSpanContextValid=zo,this.deleteSpan=lC,this.getSpan=Sc,this.getActiveSpan=aC,this.getSpanContext=Sm,this.setSpan=wc,this.setSpanContext=cC}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalTracerProvider=function(e){var n=Kr(nl,this.Tr,ve.instance());return n&&this.Tr.setDelegate(e),n},t.prototype.getTracerProvider=function(){return dn(nl)||this.Tr},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){_r(nl,ve.instance()),this.Tr=new Id},t})(),ut=kC.getInstance(),Em=gc("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Rm(t){return t.setValue(Em,!0)}function Tc(t){return t.getValue(Em)===!0}var VC="=",Fl=";",Al=",",rl="baggage",xC=180,NC=4096,OC=8192,GC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function LC(t){return t.reduce(function(e,n){var r=""+e+(e!==""?Al:"")+n;return r.length>OC?e:r},"")}function XC(t){return t.getAllEntries().map(function(e){var n=GC(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Fl+i.metadata.toString()),o})}function WC(t){var e=t.split(Fl);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(VC);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),s;return e.length>0&&(s=XR(e.join(Fl))),{key:i,value:o,metadata:s}}}}}var Cm=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=Qt.getBaggage(e);if(!(!i||Tc(e))){var o=XC(i).filter(function(a){return a.length<=NC}).slice(0,xC),s=LC(o);s.length>0&&r.set(n,rl,s)}},t.prototype.extract=function(e,n,r){var i=r.get(n,rl),o=Array.isArray(i)?i.join(Al):i;if(!o)return e;var s={};if(o.length===0)return e;var a=o.split(Al);return a.forEach(function(c){var l=WC(c);if(l){var u={value:l.value};l.metadata&&(u.metadata=l.metadata),s[l.key]=u}}),Object.entries(s).length===0?e:Qt.setBaggage(e,Qt.createBaggage(s))},t.prototype.fields=function(){return[rl]},t})(),Zm=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},UC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function mo(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=Zm(Object.entries(t)),o=i.next();!o.done;o=i.next()){var s=UC(o.value,2),a=s[0],c=s[1];if(!MC(a)){X.warn("Invalid attribute key: "+a);continue}if(!km(c)){X.warn("Invalid attribute value set for key: "+a);continue}Array.isArray(c)?r[a]=c.slice():r[a]=c}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function MC(t){return typeof t=="string"&&t.length>0}function km(t){return t==null?!0:Array.isArray(t)?PC(t):Vm(t)}function PC(t){var e,n,r;try{for(var i=Zm(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!=null){if(!r){if(Vm(s)){r=typeof s;continue}return!1}if(typeof s!==r)return!1}}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return!0}function Vm(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function FC(){return function(t){X.error(AC(t))}}function AC(t){return typeof t=="string"?t:JSON.stringify(JC(t))}function JC(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var i=n[r];i&&(e[r]=String(i))}}),n=Object.getPrototypeOf(n);return e}var DC=FC();function Ke(t){try{DC(t)}catch(e){}}var ye;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(ye||(ye={}));var YC=",",KC=["OTEL_SDK_DISABLED"];function _C(t){return KC.indexOf(t)>-1}var HC=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function zC(t){return HC.indexOf(t)>-1}var BC=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function jC(t){return BC.indexOf(t)>-1}var yo=1/0,go=128,QC=128,$C=128,xm={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:St.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:yo,OTEL_ATTRIBUTE_COUNT_LIMIT:go,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:yo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:go,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:yo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:go,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:QC,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:$C,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ye.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function qC(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function tZ(t,e,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[t]<"u"){var o=Number(n[t]);isNaN(o)||(o<r?e[t]=r:o>i?e[t]=i:e[t]=o)}}function eZ(t,e,n,r){r===void 0&&(r=YC);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var nZ={ALL:St.ALL,VERBOSE:St.VERBOSE,DEBUG:St.DEBUG,INFO:St.INFO,WARN:St.WARN,ERROR:St.ERROR,NONE:St.NONE};function rZ(t,e,n){var r=n[t];if(typeof r=="string"){var i=nZ[r.toUpperCase()];i!=null&&(e[t]=i)}}function Nm(t){var e={};for(var n in xm){var r=n;switch(r){case"OTEL_LOG_LEVEL":rZ(r,e,t);break;default:if(_C(r))qC(r,e,t);else if(zC(r))tZ(r,e,t);else if(jC(r))eZ(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}var Or=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Yn(){var t=Nm(Or);return Object.assign({},xm,t)}function iZ(){return Nm(Or)}function Td(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Ec(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var i=Td(t.charCodeAt(r)),o=Td(t.charCodeAt(r+1));e[n++]=i<<4|o}return e}var te=performance,oZ="1.30.1",sZ="process.runtime.name",aZ="telemetry.sdk.name",lZ="telemetry.sdk.language",cZ="telemetry.sdk.version",uZ=sZ,hZ=aZ,pZ=lZ,dZ=cZ,fZ="webjs",mZ=fZ,Wn,il=(Wn={},Wn[hZ]="opentelemetry",Wn[uZ]="browser",Wn[pZ]=mZ,Wn[dZ]=oZ,Wn),yZ=9,gZ=6,bZ=Math.pow(10,gZ),xo=Math.pow(10,yZ);function $t(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*bZ);return[n,r]}function Rc(){var t=te.timeOrigin;if(typeof t!="number"){var e=te;t=e.timing&&e.timing.fetchStart}return t}function fn(t){var e=$t(Rc()),n=$t(typeof t=="number"?t:te.now());return Om(e,n)}function Gr(t){if(Cc(t))return t;if(typeof t=="number")return t<Rc()?fn(t):$t(t);if(t instanceof Date)return $t(t.getTime());throw TypeError("Invalid input type")}function vZ(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=xo),[n,r]}function Ze(t){return t[0]*xo+t[1]}function ji(t){return t[0]*1e6+t[1]/1e3}function Cc(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Ed(t){return Cc(t)||typeof t=="number"||t instanceof Date}function Om(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=xo&&(n[1]-=xo,n[0]+=1),n}var kt;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(kt||(kt={}));var SZ=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gm=(function(){function t(e){e===void 0&&(e={});var n;this.Yr=(n=e.propagators)!==null&&n!==void 0?n:[],this._s=Array.from(new Set(this.Yr.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return t.prototype.inject=function(e,n,r){var i,o;try{for(var s=SZ(this.Yr),a=s.next();!a.done;a=s.next()){var c=a.value;try{c.inject(e,n,r)}catch(l){X.warn("Failed to inject with "+c.constructor.name+". Err: "+l.message)}}}catch(l){i={error:l}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,n,r){return this.Yr.reduce(function(i,o){try{return o.extract(i,n,r)}catch(s){X.warn("Failed to extract with "+o.constructor.name+". Err: "+s.message)}return i},e)},t.prototype.fields=function(){return this._s.slice()},t})(),Jl="[_0-9a-z-*/]",wZ="[a-z]"+Jl+"{0,255}",IZ="[a-z0-9]"+Jl+"{0,240}@[a-z]"+Jl+"{0,13}",TZ=new RegExp("^(?:"+wZ+"|"+IZ+")$"),EZ=/^[ -~]{0,255}[!-~]$/,RZ=/,|=/;function CZ(t){return TZ.test(t)}function ZZ(t){return EZ.test(t)&&!RZ.test(t)}var Rd=32,kZ=512,Cd=",",Zd="=",VZ=(function(){function t(e){this._e=new Map,e&&this.Hs(e)}return t.prototype.set=function(e,n){var r=this.Go();return r._e.has(e)&&r._e.delete(e),r._e.set(e,n),r},t.prototype.unset=function(e){var n=this.Go();return n._e.delete(e),n},t.prototype.get=function(e){return this._e.get(e)},t.prototype.serialize=function(){var e=this;return this.zs().reduce(function(n,r){return n.push(r+Zd+e.get(r)),n},[]).join(Cd)},t.prototype.Hs=function(e){e.length>kZ||(this._e=e.split(Cd).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Zd);if(o!==-1){var s=i.slice(0,o),a=i.slice(o+1,r.length);CZ(s)&&ZZ(a)&&n.set(s,a)}return n},new Map),this._e.size>Rd&&(this._e=new Map(Array.from(this._e.entries()).reverse().slice(0,Rd))))},t.prototype.zs=function(){return Array.from(this._e.keys()).reverse()},t.prototype.Go=function(){var e=new t;return e._e=new Map(this._e),e},t})(),bo="traceparent",ol="tracestate",xZ="00",NZ="(?!ff)[\\da-f]{2}",OZ="(?![0]{32})[\\da-f]{32}",GZ="(?![0]{16})[\\da-f]{16}",LZ="[\\da-f]{2}",XZ=new RegExp("^\\s?("+NZ+")-("+OZ+")-("+GZ+")-("+LZ+")(-.*)?\\s?$");function WZ(t){var e=XZ.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Lm=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=ut.getSpanContext(e);if(!(!i||Tc(e)||!zo(i))){var o=xZ+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||Ve.NONE).toString(16);r.set(n,bo,o),i.traceState&&r.set(n,ol,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,bo);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var s=WZ(o);if(!s)return e;s.isRemote=!0;var a=r.get(n,ol);if(a){var c=Array.isArray(a)?a.join(","):a;s.traceState=new VZ(typeof c=="string"?c:void 0)}return ut.setSpanContext(e,s)},t.prototype.fields=function(){return[bo,ol]},t})(),UZ="[object Object]",MZ="[object Null]",PZ="[object Undefined]",FZ=Function.prototype,Xm=FZ.toString,AZ=Xm.call(Object),JZ=DZ(Object.getPrototypeOf,Object),Wm=Object.prototype,Um=Wm.hasOwnProperty,ln=Symbol?Symbol.toStringTag:void 0,Mm=Wm.toString;function DZ(t,e){return function(n){return t(e(n))}}function kd(t){if(!YZ(t)||KZ(t)!==UZ)return!1;var e=JZ(t);if(e===null)return!0;var n=Um.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Xm.call(n)===AZ}function YZ(t){return t!=null&&typeof t=="object"}function KZ(t){return t==null?t===void 0?PZ:MZ:ln&&ln in Object(t)?_Z(t):HZ(t)}function _Z(t){var e=Um.call(t,ln),n=t[ln],r=!1;try{t[ln]=void 0,r=!0}catch(o){}var i=Mm.call(t);return r&&(e?t[ln]=n:delete t[ln]),i}function HZ(t){return Mm.call(t)}var zZ=20;function Pm(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=Fm(n,t.shift(),0,r);return n}function sl(t){return No(t)?t.slice():t}function Fm(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>zZ)){if(n++,vo(t)||vo(e)||Am(e))i=sl(e);else if(No(t)){if(i=t.slice(),No(e))for(var o=0,s=e.length;o<s;o++)i.push(sl(e[o]));else if(Ir(e))for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o];i[c]=sl(e[c])}}else if(Ir(t))if(Ir(e)){if(!BZ(t,e))return e;i=Object.assign({},t);for(var a=Object.keys(e),o=0,s=a.length;o<s;o++){var c=a[o],l=e[c];if(vo(l))typeof l>"u"?delete i[c]:i[c]=l;else{var u=i[c],h=l;if(Vd(t,c,r)||Vd(e,c,r))delete i[c];else{if(Ir(u)&&Ir(h)){var p=r.get(u)||[],f=r.get(h)||[];p.push({obj:t,key:c}),f.push({obj:e,key:c}),r.set(u,p),r.set(h,f)}i[c]=Fm(i[c],l,n,r)}}}}else i=e;return i}}function Vd(t,e,n){for(var r=n.get(t[e])||[],i=0,o=r.length;i<o;i++){var s=r[i];if(s.key===e&&s.obj===t)return!0}return!1}function No(t){return Array.isArray(t)}function Am(t){return typeof t=="function"}function Ir(t){return!vo(t)&&!No(t)&&!Am(t)&&typeof t=="object"}function vo(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function BZ(t,e){return!(!kd(t)||!kd(e))}var jZ=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Jm(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Dm(t,e){var n,r;if(!e)return!1;try{for(var i=jZ(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(Jm(t,s))return!0}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var QZ=(function(){function t(){var e=this;this.Bs=new Promise(function(n,r){e.Kr=n,e.js=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this.Bs},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this.Kr(e)},t.prototype.reject=function(e){this.js(e)},t})(),$Z=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},qZ=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},tk=(function(){function t(e,n){this.Qs=e,this.$s=n,this._r=!1,this.or=new QZ}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this.or.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this._r){this._r=!0;try{Promise.resolve((e=this.Qs).call.apply(e,qZ([this.$s],$Z(r),!1))).then(function(o){return n.or.resolve(o)},function(o){return n.or.reject(o)})}catch(o){this.or.reject(o)}}return this.or.promise},t})();function ek(t,e){return new Promise(function(n){tt.with(Rm(tt.active()),function(){t.export(e,function(r){n(r)})})})}var nk={qs:ek},Ym=(function(){function t(){}return t.prototype.emit=function(e){},t})(),rk=new Ym,ik=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new Ym},t})(),Km=new ik,ok=(function(){function t(e,n,r,i){this.Zn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.sr().emit(e)},t.prototype.sr=function(){if(this.b)return this.b;var e=this.Zn.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):rk},t})(),xd=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new ok(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:Km},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),sk=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Qi=Symbol.for("io.opentelemetry.js.api.logs"),Tr=sk;function ak(t,e,n){return function(r){return r===t?e:n}}var Nd=1,lk=(function(){function t(){this.en=new xd}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Tr[Qi]?this.getLoggerProvider():(Tr[Qi]=ak(Nd,e,Km),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Tr[Qi])===null||e===void 0?void 0:e.call(Tr,Nd))!==null&&n!==void 0?n:this.en},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Tr[Qi],this.en=new xd},t})(),_m=lk.getInstance();function ck(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var s=t[i];e&&s.setTracerProvider(e),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}function uk(t){t.forEach(function(e){return e.disable()})}function hk(t){var e,n,r=t.tracerProvider||ut.getTracerProvider(),i=t.meterProvider||Ce.getMeterProvider(),o=t.loggerProvider||_m.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return ck(s,r,i,o),function(){uk(s)}}function Dl(t){return typeof t=="function"}var Xt=console.error.bind(console);function Er(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Hr(t){t&&t.logger&&(Dl(t.logger)?Xt=t.logger:Xt("new logger isn't a function, not replacing"))}function Hm(t,e,n){if(!t||!t[e]){Xt("no original function "+e+" to wrap");return}if(!n){Xt("no wrapper function"),Xt(new Error().stack);return}if(!Dl(t[e])||!Dl(n)){Xt("original object and wrapper must be functions");return}var r=t[e],i=n(r,e);return Er(i,"__original",r),Er(i,"__unwrap",function(){t[e]===i&&Er(t,e,r)}),Er(i,"__wrapped",!0),Er(t,e,i),i}function pk(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{Xt("must provide one or more modules to patch"),Xt(new Error().stack);return}if(!(e&&Array.isArray(e))){Xt("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(i){Hm(r,i,n)})})}function zm(t,e){if(!t||!t[e]){Xt("no function to unwrap."),Xt(new Error().stack);return}if(!t[e].__unwrap)Xt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function dk(t,e){if(t)Array.isArray(t)||(t=[t]);else{Xt("must provide one or more modules to patch"),Xt(new Error().stack);return}if(!(e&&Array.isArray(e))){Xt("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){zm(n,r)})})}Hr.wrap=Hm;Hr.massWrap=pk;Hr.unwrap=zm;Hr.massUnwrap=dk;var qt=Hr,Yl=function(){return Yl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Yl.apply(this,arguments)},fk=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ce={},this.ae=qt.wrap,this.P=qt.unwrap,this.Lo=qt.massWrap,this.Xo=qt.massUnwrap,this.setConfig(r),this.v=X.createComponentLogger({namespace:e}),this.gn=ut.getTracer(e,n),this.bn=Ce.getMeter(e,n),this.vn=_m.getLogger(e,n),this.Sn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.bn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.bn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.Sn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.vn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.vn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.Sn=function(){},t.prototype.getConfig=function(){return this.ce},t.prototype.setConfig=function(e){this.ce=Yl({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.gn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.gn},enumerable:!1,configurable:!0}),t.prototype.Wo=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.v.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),mk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Bm=(function(t){mk(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ce.enabled&&o.enable(),o}return e})(fk);function Od(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Gt(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var yk="exception.type",gk="exception.message",bk="exception.stacktrace",al=yk,ll=gk,vk=bk,Sk="exception",Kl=function(){return Kl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Kl.apply(this,arguments)},wk=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gd=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ik=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Tk=(function(){function t(e,n,r,i,o,s,a,c,l,u){a===void 0&&(a=[]),this.attributes={},this.links=[],this.events=[],this.Uo=0,this.Xn=0,this.ta=0,this.status={code:Vo.UNSET},this.endTime=[0,0],this.ar=!1,this.Er=[-1,-1],this.name=r,this.Cn=i,this.parentSpanId=s,this.kind=o,this.links=a;var h=Date.now();this.Mo=te.now(),this.ea=h-(this.Mo+Rc()),this.na=c!=null,this.startTime=this.Hr(c!=null?c:h),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this.Wn=e.getSpanLimits(),this.ra=this.Wn.attributeValueLengthLimit||0,u!=null&&this.setAttributes(u),this.Po=e.getActiveSpanProcessor(),this.Po.onStart(this,n)}return t.prototype.spanContext=function(){return this.Cn},t.prototype.setAttribute=function(e,n){return n==null||this.lr()?this:e.length===0?(X.warn("Invalid attribute key: "+e),this):km(n)?Object.keys(this.attributes).length>=this.Wn.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.Uo++,this):(this.attributes[e]=this.ia(n),this):(X.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,r;try{for(var i=wk(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=Gd(o.value,2),a=s[0],c=s[1];this.setAttribute(a,c)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,r){if(this.lr())return this;if(this.Wn.eventCountLimit===0)return X.warn("No events allowed."),this.Xn++,this;this.events.length>=this.Wn.eventCountLimit&&(this.Xn===0&&X.debug("Dropping extra events."),this.events.shift(),this.Xn++),Ed(n)&&(Ed(r)||(r=n),n=void 0);var i=mo(n);return this.events.push({name:e,attributes:i,time:this.Hr(r),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,Ik([],Gd(e),!1)),this},t.prototype.setStatus=function(e){return this.lr()?this:(this.status=Kl({},e),this.status.message!=null&&typeof e.message!="string"&&(X.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this.lr()?this:(this.name=e,this)},t.prototype.end=function(e){if(this.lr()){X.error(this.name+" "+this.Cn.traceId+"-"+this.Cn.spanId+" - You can only call end() on a span once.");return}this.ar=!0,this.endTime=this.Hr(e),this.Er=vZ(this.startTime,this.endTime),this.Er[0]<0&&(X.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this.Er=[0,0]),this.Xn>0&&X.warn("Dropped "+this.Xn+" events because eventCountLimit reached"),this.Po.onEnd(this)},t.prototype.Hr=function(e){if(typeof e=="number"&&e<=te.now())return fn(e+this.ea);if(typeof e=="number")return $t(e);if(e instanceof Date)return $t(e.getTime());if(Cc(e))return e;if(this.na)return $t(Date.now());var n=te.now()-this.Mo;return Om(this.startTime,$t(n))},t.prototype.isRecording=function(){return this.ar===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[ll]=e:e&&(e.code?r[al]=e.code.toString():e.name&&(r[al]=e.name),e.message&&(r[ll]=e.message),e.stack&&(r[vk]=e.stack)),r[al]||r[ll]?this.addEvent(Sk,r,n):X.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this.Er},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this.ar},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this.Uo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this.Xn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this.ta},enumerable:!1,configurable:!0}),t.prototype.lr=function(){return this.ar&&X.warn("Can not execute the operation on ended Span {traceId: "+this.Cn.traceId+", spanId: "+this.Cn.spanId+"}"),this.ar},t.prototype.Fo=function(e,n){return e.length<=n?e:e.substring(0,n)},t.prototype.ia=function(e){var n=this,r=this.ra;return r<=0?(X.warn("Attribute value limit must be positive, got "+r),e):typeof e=="string"?this.Fo(e,r):Array.isArray(e)?e.map(function(i){return typeof i=="string"?n.Fo(i,r):i}):e},t})(),Kn;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Kn||(Kn={}));var Oo=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Kn.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t})(),Jn=(function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Kn.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t})(),cl=(function(){function t(e){var n,r,i,o;this.sn=e.root,this.sn||(Ke(new Error("ParentBasedSampler must have a root sampler configured")),this.sn=new Jn),this.Ao=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Jn,this.Jo=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new Oo,this.Do=(i=e.localParentSampled)!==null&&i!==void 0?i:new Jn,this.Yo=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new Oo}return t.prototype.shouldSample=function(e,n,r,i,o,s){var a=ut.getSpanContext(e);return!a||!zo(a)?this.sn.shouldSample(e,n,r,i,o,s):a.isRemote?a.traceFlags&Ve.SAMPLED?this.Ao.shouldSample(e,n,r,i,o,s):this.Jo.shouldSample(e,n,r,i,o,s):a.traceFlags&Ve.SAMPLED?this.Do.shouldSample(e,n,r,i,o,s):this.Yo.shouldSample(e,n,r,i,o,s)},t.prototype.toString=function(){return"ParentBased{root="+this.sn.toString()+", remoteParentSampled="+this.Ao.toString()+", remoteParentNotSampled="+this.Jo.toString()+", localParentSampled="+this.Do.toString()+", localParentNotSampled="+this.Yo.toString()+"}"},t})(),Ld=(function(){function t(e){e===void 0&&(e=0),this.zr=e,this.zr=this.oa(e),this.sa=Math.floor(this.zr*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:wm(n)&&this.aa(n)<this.sa?Kn.RECORD_AND_SAMPLED:Kn.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this.zr+"}"},t.prototype.oa=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype.aa=function(e){for(var n=0,r=0;r<e.length/8;r++){var i=r*8,o=parseInt(e.slice(i,i+8),16);n=(n^o)>>>0}return n},t})(),Ek=ye.AlwaysOn,Un=1;function jm(){var t=Yn();return{sampler:Qm(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Qm(t){switch(t===void 0&&(t=Yn()),t.OTEL_TRACES_SAMPLER){case ye.AlwaysOn:return new Jn;case ye.AlwaysOff:return new Oo;case ye.ParentBasedAlwaysOn:return new cl({root:new Jn});case ye.ParentBasedAlwaysOff:return new cl({root:new Oo});case ye.TraceIdRatio:return new Ld(Xd(t));case ye.ParentBasedTraceIdRatio:return new cl({root:new Ld(Xd(t))});default:return X.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Ek+'".'),new Jn}}function Xd(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return X.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Un+"."),Un;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(X.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Un+"."),Un):e<0||e>1?(X.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Un+"."),Un):e}function Rk(t){var e={sampler:Qm()},n=jm(),r=Object.assign({},n,e,t);return r.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),r}function Ck(t){var e,n,r,i,o,s,a,c,l,u,h,p,f=Object.assign({},t.spanLimits),m=iZ();return f.attributeCountLimit=(s=(o=(i=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(r=t.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:m.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:m.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:go,f.attributeValueLengthLimit=(p=(h=(u=(c=(a=t.spanLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&c!==void 0?c:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&u!==void 0?u:m.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:m.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:yo,Object.assign({},t,{spanLimits:f})}var Zk=(function(){function t(e,n){this.Un=e,this.Rr=!1,this.an=[],this.cr=0;var r=Yn();this.Mn=typeof(n==null?void 0:n.maxExportBatchSize)=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this.Br=typeof(n==null?void 0:n.maxQueueSize)=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this.la=typeof(n==null?void 0:n.scheduledDelayMillis)=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this.ca=typeof(n==null?void 0:n.exportTimeoutMillis)=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this.Cr=new tk(this.nn,this),this.Mn>this.Br&&(X.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this.Mn=this.Br)}return t.prototype.forceFlush=function(){return this.Cr.isCalled?this.Cr.promise:this.Ko()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this.Cr.isCalled||e.spanContext().traceFlags&Ve.SAMPLED&&this.ua(e)},t.prototype.shutdown=function(){return this.Cr.call()},t.prototype.nn=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e.Ko()}).then(function(){return e.Un.shutdown()})},t.prototype.ua=function(e){if(this.an.length>=this.Br){this.cr===0&&X.debug("maxQueueSize reached, dropping spans"),this.cr++;return}this.cr>0&&(X.warn("Dropped "+this.cr+" spans because maxQueueSize reached"),this.cr=0),this.an.push(e),this._o()},t.prototype.Ko=function(){var e=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(e.an.length/e.Mn),s=0,a=o;s<a;s++)i.push(e.Ho());Promise.all(i).then(function(){n()}).catch(r)})},t.prototype.Ho=function(){var e=this;return this.zo(),this.an.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},e.ca);tt.with(Rm(tt.active()),function(){var o;e.an.length<=e.Mn?(o=e.an,e.an=[]):o=e.an.splice(0,e.Mn);for(var s=function(){return e.Un.export(o,function(h){var p;clearTimeout(i),h.code===kt.SUCCESS?n():r((p=h.error)!==null&&p!==void 0?p:new Error("BatchSpanProcessor: span export failed"))})},a=null,c=0,l=o.length;c<l;c++){var u=o[c];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(a!=null||(a=[]),a.push(u.resource.waitForAsyncAttributes()))}a===null?s():Promise.all(a).then(s,function(h){Ke(h),r(h)})})})},t.prototype._o=function(){var e=this;if(!this.Rr){var n=function(){e.Rr=!0,e.Ho().finally(function(){e.Rr=!1,e.an.length>0&&(e.zo(),e._o())}).catch(function(r){e.Rr=!1,Ke(r)})};if(this.an.length>=this.Mn)return n();this.Zr===void 0&&(this.Zr=setTimeout(function(){return n()},this.la))}},t.prototype.zo=function(){this.Zr!==void 0&&(clearTimeout(this.Zr),this.Zr=void 0)},t})(),kk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$m=(function(t){kk(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.onInit(r),i}return e.prototype.onInit=function(n){var r=this;(n==null?void 0:n.disableAutoFlushOnDocumentHide)!==!0&&typeof document<"u"&&(this.jr=function(){document.visibilityState==="hidden"&&r.forceFlush().catch(function(i){Ke(i)})},this.Qr=function(){r.forceFlush().catch(function(i){Ke(i)})},document.addEventListener("visibilitychange",this.jr),document.addEventListener("pagehide",this.Qr))},e.prototype.onShutdown=function(){typeof document<"u"&&(this.jr&&document.removeEventListener("visibilitychange",this.jr),this.Qr&&document.removeEventListener("pagehide",this.Qr))},e})(Zk),Vk=8,xk=16,Nk=(function(){function t(){this.generateTraceId=Wd(xk),this.generateSpanId=Wd(Vk)}return t})(),$i=Array(32);function Wd(t){return function(){for(var e=0;e<t*2;e++)$i[e]=Math.floor(Math.random()*16)+48,$i[e]>=58&&($i[e]+=39);return String.fromCharCode.apply(null,$i.slice(0,t*2))}}var Ok=(function(){function t(e,n,r){this.ha=r;var i=Rk(n);this.pa=i.sampler,this.da=i.generalLimits,this.Wn=i.spanLimits,this.Bo=n.idGenerator||new Nk,this.resource=r.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,r){var i,o,s;n===void 0&&(n={}),r===void 0&&(r=tt.active()),n.root&&(r=ut.deleteSpan(r));var a=ut.getSpan(r);if(Tc(r)){X.debug("Instrumentation suppressed, returning Noop Span");var c=ut.wrapSpanContext(vm);return c}var l=a==null?void 0:a.spanContext(),u=this.Bo.generateSpanId(),h,p,f;!l||!ut.isSpanContextValid(l)?h=this.Bo.generateTraceId():(h=l.traceId,p=l.traceState,f=l.spanId);var m=(i=n.kind)!==null&&i!==void 0?i:Fr.INTERNAL,d=((o=n.links)!==null&&o!==void 0?o:[]).map(function(V){return{context:V.context,attributes:mo(V.attributes)}}),b=mo(n.attributes),v=this.pa.shouldSample(r,h,e,m,b,d);p=(s=v.traceState)!==null&&s!==void 0?s:p;var I=v.decision===ko.RECORD_AND_SAMPLED?Ve.SAMPLED:Ve.NONE,R={traceId:h,spanId:u,traceFlags:I,traceState:p};if(v.decision===ko.NOT_RECORD){X.debug("Recording is off, propagating context in a non-recording span");var c=ut.wrapSpanContext(R);return c}var E=mo(Object.assign(b,v.attributes)),T=new Tk(this,r,e,R,m,f,d,n.startTime,void 0,E);return T},t.prototype.startActiveSpan=function(e,n,r,i){var o,s,a;if(!(arguments.length<2)){arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);var c=s!=null?s:tt.active(),l=this.startSpan(e,o,c),u=ut.setSpan(c,l);return tt.with(u,a,void 0,l)}},t.prototype.getGeneralLimits=function(){return this.da},t.prototype.getSpanLimits=function(){return this.Wn},t.prototype.getActiveSpanProcessor=function(){return this.ha.getActiveSpanProcessor()},t})(),Gk="service.name",Lk="telemetry.sdk.name",Xk="telemetry.sdk.language",Wk="telemetry.sdk.version",Uk=Gk,Ud=Lk,Md=Xk,Pd=Wk;function Mk(){return"unknown_service"}var Ae=function(){return Ae=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ae.apply(this,arguments)},Pk=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Fk=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ak=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ar=(function(){function t(e,n){var r=this,i;this.kr=e,this.asyncAttributesPending=n!=null,this.Vr=(i=this.kr)!==null&&i!==void 0?i:{},this.ur=n==null?void 0:n.then(function(o){return r.kr=Object.assign({},r.kr,o),r.asyncAttributesPending=!1,o},function(o){return X.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[Uk]=Mk(),e[Md]=il[Md],e[Ud]=il[Ud],e[Pd]=il[Pd],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&X.error("Accessing resource attributes before async attributes settled"),(e=this.kr)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return Pk(this,void 0,void 0,function(){return Fk(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this.ur]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var n=this,r;if(!e)return this;var i=Ae(Ae({},this.Vr),(r=e.Vr)!==null&&r!==void 0?r:e.attributes);if(!this.ur&&!e.ur)return new t(i);var o=Promise.all([this.ur,e.ur]).then(function(s){var a,c=Ak(s,2),l=c[0],u=c[1];return Ae(Ae(Ae(Ae({},n.Vr),l),(a=e.Vr)!==null&&a!==void 0?a:e.attributes),u)});return new t(i,o)},t.EMPTY=new t({}),t})(),qi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Fd=(function(){function t(e){this.xr=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=qi(this.xr),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.forceFlush())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a){Promise.all(r).then(function(){a()}).catch(function(c){Ke(c||new Error("MultiSpanProcessor: forceFlush failed")),a()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=qi(this.xr),s=o.next();!s.done;s=o.next()){var a=s.value;a.onStart(e,n)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.onEnd=function(e){var n,r;try{for(var i=qi(this.xr),o=i.next();!o.done;o=i.next()){var s=o.value;s.onEnd(e)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,r=[];try{for(var i=qi(this.xr),o=i.next();!o.done;o=i.next()){var s=o.value;r.push(s.shutdown())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(a,c){Promise.all(r).then(function(){a()},c)})},t})(),Jk=(function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t})(),Dk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Yk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},cn;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(cn||(cn={}));var Kk=(function(){function t(e){e===void 0&&(e={});var n,r;this.Pn=[],this.$r=new Map;var i=Pm({},jm(),Ck(e));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:Ar.empty(),i.mergeResourceWithDefaults&&(this.resource=Ar.default().merge(this.resource)),this.ce=Object.assign({},i,{resource:this.resource}),!((r=e.spanProcessors)===null||r===void 0)&&r.length)this.Pn=Yk([],Dk(e.spanProcessors),!1),this.activeSpanProcessor=new Fd(this.Pn);else{var o=this.fa();if(o!==void 0){var s=new $m(o);this.activeSpanProcessor=s}else this.activeSpanProcessor=new Jk}}return t.prototype.getTracer=function(e,n,r){var i=e+"@"+(n||"")+":"+((r==null?void 0:r.schemaUrl)||"");return this.$r.has(i)||this.$r.set(i,new Ok({name:e,version:n,schemaUrl:r==null?void 0:r.schemaUrl},this.ce,this)),this.$r.get(i)},t.prototype.addSpanProcessor=function(e){this.Pn.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return X.error("Error while trying to shutdown current span processor",n)}),this.Pn.push(e),this.activeSpanProcessor=new Fd(this.Pn)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),ut.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this.ma()),e.contextManager&&tt.setGlobalContextManager(e.contextManager),e.propagator&&Qt.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this.ce.forceFlushTimeoutMillis,n=this.Pn.map(function(r){return new Promise(function(i){var o,s=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),o=cn.timeout},e);r.forceFlush().then(function(){clearTimeout(s),o!==cn.timeout&&(o=cn.resolved,i(o))}).catch(function(a){clearTimeout(s),o=cn.error,i(a)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var s=o.filter(function(a){return a!==cn.resolved});s.length>0?i(s):r()}).catch(function(o){return i([o])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype.ya=function(e){var n;return(n=this.constructor.ga.get(e))===null||n===void 0?void 0:n()},t.prototype.ba=function(e){var n;return(n=this.constructor.va.get(e))===null||n===void 0?void 0:n()},t.prototype.ma=function(){var e=this,n=Array.from(new Set(Yn().OTEL_PROPAGATORS)),r=n.map(function(o){var s=e.ya(o);return s||X.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),s}),i=r.reduce(function(o,s){return s&&o.push(s),o},[]);if(i.length!==0)return n.length===1?i[0]:new Gm({propagators:i})},t.prototype.fa=function(){var e=Yn().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this.ba(e);return n||X.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t.ga=new Map([["tracecontext",function(){return new Lm}],["baggage",function(){return new Cm}]]),t.va=new Map,t})(),_k=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Hk=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},qm=(function(){function t(){this.qr=!1,this.Xe=an}return t.prototype.Sa=function(e,n){e===void 0&&(e=an);var r=this,i=function(){for(var o=this,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return r.with(e,function(){return n.apply(o,s)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},t.prototype.active=function(){return this.Xe},t.prototype.bind=function(e,n){return e===void 0&&(e=this.active()),typeof n=="function"?this.Sa(e,n):n},t.prototype.disable=function(){return this.Xe=an,this.qr=!1,this},t.prototype.enable=function(){return this.qr?this:(this.qr=!0,this.Xe=an,this)},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=this.Xe;this.Xe=e||an;try{return n.call.apply(n,Hk([r],_k(i),!1))}finally{this.Xe=s}},t})(),zk=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Bk=(function(t){zk(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,n)||this;if(n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return r}return e.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new qm),n.contextManager&&n.contextManager.enable(),t.prototype.register.call(this,n)},e})(Kk),J;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(J||(J={}));var jk="http.response_content_length",Qk="http.response_content_length_uncompressed",$k=jk,qk=Qk,ul;function t1(){return ul||(ul=document.createElement("a")),ul}function _e(t,e){return e in t}function Rt(t,e,n,r){var i=void 0,o=void 0;_e(n,e)&&typeof n[e]=="number"&&(i=n[e]);var s=J.FETCH_START;if(_e(n,s)&&typeof n[s]=="number"&&(o=n[s]),i!==void 0&&o!==void 0&&i>=o)return t.addEvent(e,i),t}function _n(t,e,n){n===void 0&&(n=!1),n||(Rt(t,J.FETCH_START,e),Rt(t,J.DOMAIN_LOOKUP_START,e),Rt(t,J.DOMAIN_LOOKUP_END,e),Rt(t,J.CONNECT_START,e),_e(e,"name")&&e.name.startsWith("https:")&&Rt(t,J.SECURE_CONNECTION_START,e),Rt(t,J.CONNECT_END,e),Rt(t,J.REQUEST_START,e),Rt(t,J.RESPONSE_START,e),Rt(t,J.RESPONSE_END,e));var r=e[J.ENCODED_BODY_SIZE];r!==void 0&&t.setAttribute($k,r);var i=e[J.DECODED_BODY_SIZE];i!==void 0&&r!==i&&t.setAttribute(qk,i)}function e1(t){return t.slice().sort(function(e,n){var r=e[J.FETCH_START],i=n[J.FETCH_START];return r>i?1:r<i?-1:0})}function ty(){return typeof location<"u"?location.origin:void 0}function ey(t,e,n,r,i,o){i===void 0&&(i=new WeakSet);var s=Re(t);t=s.toString();var a=r1(t,e,n,r,i,o);if(a.length===0)return{mainRequest:void 0};if(a.length===1)return{mainRequest:a[0]};var c=e1(a);if(s.origin!==ty()&&c.length>1){var l=c[0],u=n1(c,l[J.RESPONSE_END],n),h=l[J.RESPONSE_END],p=u[J.FETCH_START];return p<h&&(u=l,l=void 0),{corsPreFlightRequest:l,mainRequest:u}}else return{mainRequest:a[0]}}function n1(t,e,n){for(var r=Ze(n),i=Ze(Gr(e)),o=t[1],s,a=t.length,c=1;c<a;c++){var l=t[c],u=Ze(Gr(l[J.FETCH_START])),h=Ze(Gr(l[J.RESPONSE_END])),p=r-h;u>=i&&(!s||p<s)&&(s=p,o=l)}return o}function r1(t,e,n,r,i,o){var s=Ze(e),a=Ze(n),c=r.filter(function(l){var u=Ze(Gr(l[J.FETCH_START])),h=Ze(Gr(l[J.RESPONSE_END]));return l.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&l.name===t&&u>=s&&h<=a});return c.length>0&&(c=c.filter(function(l){return!i.has(l)})),c}function Re(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=t1();return e.href=t,e}function ny(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=o1(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=ny(t.parentNode,!1)),r+=n,r}function i1(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var n=Array.from(t.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return e.indexOf(r.nodeType)>=0&&i===t.localName}),n.length>=1?n.indexOf(t)+1:0}function o1(t,e){var n=t.nodeType,r=i1(t),i="";if(n===Node.ELEMENT_NODE){var o=t.getAttribute("id");if(e&&o)return'//*[@id="'+o+'"]';i=t.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else if(n===Node.COMMENT_NODE)i="comment()";else return"";return i&&r>1?"/"+i+"["+r+"]":"/"+i}function ry(t,e){var n=e||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=Re(t);return r.origin===ty()?!0:n.some(function(i){return Jm(t,i)})}var Lr;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(Lr||(Lr={}));var s1="0.44.0",a1="@opentelemetry/instrumentation-document-load",l1="http.url",c1="http.user_agent",hl=l1,u1=c1,h1="deployment.environment",p1=h1,d1="service.name",f1="telemetry.sdk.name",m1="telemetry.sdk.version",y1="url.full",g1="url.path",b1="url.query",Go;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Go||(Go={}));var v1=function(){var t,e,n={},r=(e=(t=te).getEntriesByType)===null||e===void 0?void 0:e.call(t,"navigation")[0];if(r){var i=Object.values(J);i.forEach(function(a){if(_e(r,a)){var c=r[a];typeof c=="number"&&(n[a]=c)}})}else{var o=te,s=o.timing;if(s){var i=Object.values(J);i.forEach(function(c){if(_e(s,c)){var l=s[c];typeof l=="number"&&(n[c]=l)}})}}return n},Ad={"first-paint":Go.FIRST_PAINT,"first-contentful-paint":Go.FIRST_CONTENTFUL_PAINT},S1=function(t){var e,n,r=(n=(e=te).getEntriesByType)===null||n===void 0?void 0:n.call(e,"paint");r&&r.forEach(function(i){var o=i.name,s=i.startTime;_e(Ad,o)&&t.addEvent(Ad[o],s)})},w1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),I1=(function(t){w1(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,a1,s1,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return e.prototype.init=function(){},e.prototype.Fn=function(){var n=this;window.setTimeout(function(){n.wa()})},e.prototype.Ia=function(n){var r=this,i,o,s=(o=(i=te).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");s&&s.forEach(function(a){r.Ta(a,n)})},e.prototype.wa=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(s){return s.getAttribute("name")===bo}),i=v1(),o=r&&r.content||"";tt.with(Qt.extract(an,{traceparent:o}),function(){var s,a=n.ti(Lr.DOCUMENT_LOAD,J.FETCH_START,i);a&&(tt.with(ut.setSpan(tt.active(),a),function(){var c=n.ti(Lr.DOCUMENT_FETCH,J.FETCH_START,i);c&&(c.setAttribute(hl,location.href),tt.with(ut.setSpan(tt.active(),c),function(){var l;n.getConfig().ignoreNetworkEvents||_n(c,i),n.jo(c,(l=n.getConfig().applyCustomAttributesOnSpan)===null||l===void 0?void 0:l.documentFetch),n.kn(c,J.RESPONSE_END,i)}))}),a.setAttribute(hl,location.href),a.setAttribute(u1,navigator.userAgent),n.Ia(a),n.getConfig().ignoreNetworkEvents||(Rt(a,J.FETCH_START,i),Rt(a,J.UNLOAD_EVENT_START,i),Rt(a,J.UNLOAD_EVENT_END,i),Rt(a,J.DOM_INTERACTIVE,i),Rt(a,J.DOM_CONTENT_LOADED_EVENT_START,i),Rt(a,J.DOM_CONTENT_LOADED_EVENT_END,i),Rt(a,J.DOM_COMPLETE,i),Rt(a,J.LOAD_EVENT_START,i),Rt(a,J.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||S1(a),n.jo(a,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentLoad),n.kn(a,J.LOAD_EVENT_END,i))})},e.prototype.kn=function(n,r,i){n&&(_e(i,r)?n.end(i[r]):n.end())},e.prototype.Ta=function(n,r){var i,o=this.ti(Lr.RESOURCE_FETCH,J.FETCH_START,n,r);o&&(o.setAttribute(hl,n.name),this.getConfig().ignoreNetworkEvents||_n(o,n),this.Ea(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this.kn(o,J.RESPONSE_END,n))},e.prototype.ti=function(n,r,i,o){if(_e(i,r)&&typeof i[r]=="number"){var s=this.tracer.startSpan(n,{startTime:i[r]},o?ut.setSpan(tt.active(),o):void 0);return s}},e.prototype.Ra=function(){window.document.readyState==="complete"?this.Fn():(this.Fn=this.Fn.bind(this),window.addEventListener("load",this.Fn))},e.prototype.jo=function(n,r){var i=this;r&&Od(function(){return r(n)},function(o){o&&i.v.error("addCustomAttributesOnSpan",o)})},e.prototype.Ea=function(n,r,i){var o=this;i&&Od(function(){return i(n,r)},function(s){s&&o.v.error("addCustomAttributesOnResourceSpan",s)})},e.prototype.enable=function(){window.removeEventListener("load",this.Fn),this.Ra()},e.prototype.disable=function(){window.removeEventListener("load",this.Fn)},e})(Bm),iy=(function(){function t(){}return t.prototype.emit=function(e){},t})(),T1=new iy,E1=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new iy},t})(),oy=new E1,R1=(function(){function t(e,n,r,i){this.Zn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.sr().emit(e)},t.prototype.sr=function(){if(this.b)return this.b;var e=this.Zn.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):T1},t})(),Jd=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new R1(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:oy},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),C1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},to=Symbol.for("io.opentelemetry.js.api.logs"),Rr=C1;function Z1(t,e,n){return function(r){return r===t?e:n}}var Dd=1,k1=(function(){function t(){this.en=new Jd}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Rr[to]?this.getLoggerProvider():(Rr[to]=Z1(Dd,e,oy),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Rr[to])===null||e===void 0?void 0:e.call(Rr,Dd))!==null&&n!==void 0?n:this.en},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Rr[to],this.en=new Jd},t})(),V1=k1.getInstance(),_l=function(){return _l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},_l.apply(this,arguments)},x1=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ce={},this.ae=qt.wrap,this.P=qt.unwrap,this.Lo=qt.massWrap,this.Xo=qt.massUnwrap,this.setConfig(r),this.v=X.createComponentLogger({namespace:e}),this.gn=ut.getTracer(e,n),this.bn=Ce.getMeter(e,n),this.vn=V1.getLogger(e,n),this.Sn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.bn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.bn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.Sn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.vn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.vn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.Sn=function(){},t.prototype.getConfig=function(){return this.ce},t.prototype.setConfig=function(e){this.ce=_l({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.gn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.gn},enumerable:!1,configurable:!0}),t.prototype.Wo=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.v.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),N1=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),O1=(function(t){N1(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ce.enabled&&o.enable(),o}return e})(x1);function G1(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function L1(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Lo;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(Lo||(Lo={}));var X1="http.method",W1="http.url",U1="http.host",M1="http.scheme",P1="http.status_code",F1="http.user_agent",A1="http.request_content_length_uncompressed",J1=X1,D1=W1,Y1=U1,K1=M1,_1=P1,H1=F1,z1=A1,B1=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},j1=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Q1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},sy=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function q1(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[0]instanceof URL||typeof t[0]=="string"){var n=t[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=tV(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(eV(n.body))}else{var s=t[0];return s!=null&&s.body?s.clone().text().then(function(a){return Hl(a)}):Promise.resolve()}}function tV(t){if(!t.pipeThrough)return sy.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};var e=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,s){return B1(this,void 0,void 0,function(){var a;return j1(this,function(c){switch(c.label){case 0:return[4,o];case 1:return a=c.sent(),e+=a.byteLength,s.enqueue(o),[2]}})})},flush:function(){n(e)}});return{body:t.pipeThrough(i),length:r}}function eV(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return rV(t);if(t instanceof URLSearchParams)return Hl(t.toString());if(typeof t=="string")return Hl(t);sy.warn("unknown body type")}var nV=new TextEncoder;function Hl(t){return nV.encode(t).byteLength}function rV(t){var e,n,r=0;try{for(var i=Q1(t.entries()),o=i.next();!o.done;o=i.next()){var s=$1(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var Yd="0.57.1",iV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),oV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},sV=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},pl,aV=300,Kd=typeof process=="object"&&((pl=process.release)===null||pl===void 0?void 0:pl.name)==="node",lV=(function(t){iV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",Yd,n)||this;return r.component="fetch",r.version=Yd,r.moduleName=r.component,r.un=new WeakSet,r.wn=0,r}return e.prototype.init=function(){},e.prototype.ei=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]},ut.setSpan(tt.active(),n));_n(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[J.RESPONSE_END])},e.prototype.ii=function(n,r){var i=Re(r.url);n.setAttribute(_1,r.status),r.statusText!=null&&n.setAttribute(Lo.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(Y1,i.host),n.setAttribute(K1,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(H1,navigator.userAgent)},e.prototype.si=function(n,r){if(!ry(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};Qt.inject(tt.active(),i),Object.keys(i).length>0&&this.v.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)Qt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Headers)Qt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else if(n.headers instanceof Map)Qt.inject(tt.active(),n.headers,{set:function(o,s,a){return o.set(s,typeof a=="string"?a:String(a))}});else{var i={};Qt.inject(tt.active(),i),n.headers=Object.assign({},i,n.headers||{})}},e.prototype._i=function(){this.wn===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this.un=new WeakSet)},e.prototype.An=function(n,r){var i;if(r===void 0&&(r={}),Dm(n,this.getConfig().ignoreUrls)){this.v.debug("ignoring span as url matches ignored url");return}var o=(r.method||"GET").toUpperCase(),s="HTTP "+o;return this.tracer.startSpan(s,{kind:Fr.CLIENT,attributes:(i={},i[Lo.COMPONENT]=this.moduleName,i[J1]=o,i[D1]=n,i)})},e.prototype.eo=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var s=ey(r.spanUrl,r.startTime,i,o,this.un,"fetch");if(s.mainRequest){var a=s.mainRequest;this.hr(a);var c=s.corsPreFlightRequest;c&&(this.ei(n,c),this.hr(c)),_n(n,a,this.getConfig().ignoreNetworkEvents)}},e.prototype.hr=function(n){this.un.add(n)},e.prototype.kn=function(n,r,i){var o=this,s=$t(Date.now()),a=fn();this.ii(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o.eo(n,r,a),o.wn--,o._i(),n.end(s)},aV)},e.prototype.Ca=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=this,c=Re(o[0]instanceof Request?o[0].url:String(o[0])).href,l=o[0]instanceof Request?o[0]:o[1]||{},u=i.An(c,l);if(!u)return r.apply(this,o);var h=i.Za(c);i.getConfig().measureRequestSize&&q1.apply(void 0,sV([],oV(o),!1)).then(function(b){b&&u.setAttribute(z1,b)}).catch(function(b){i.v.warn("getFetchBodyLength",b)});function p(b,v){i.Qo(b,l,v),i.kn(b,h,{status:v.status||0,statusText:v.message,url:c})}function f(b,v){i.Qo(b,l,v),v.status>=200&&v.status<400?i.kn(b,h,v):i.kn(b,h,{status:v.status,statusText:v.statusText,url:c})}function m(b,v,I){try{var R=I.clone(),E=I.clone(),T=R.body;if(T){var V=T.getReader(),N=function(){V.read().then(function(U){var C=U.done;C?f(b,E):N()},function(U){p(b,U)})};N()}else f(b,I)}finally{v(I)}}function d(b,v,I){try{p(b,I)}finally{v(I)}}return new Promise(function(b,v){return tt.with(ut.setSpan(tt.active(),u),function(){return i.si(l,c),i.wn++,r.apply(a,l instanceof Request?[l]:[c,l]).then(m.bind(a,u,b),d.bind(a,u,v))})})}}},e.prototype.Qo=function(n,r,i){var o=this,s=this.getConfig().applyCustomAttributesOnSpan;s&&G1(function(){return s(n,r,i)},function(a){a&&o.v.error("applyCustomAttributesOnSpan",a)})},e.prototype.Za=function(n){var r=fn(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:r,spanUrl:n};var o=new PerformanceObserver(function(s){var a=s.getEntries();a.forEach(function(c){c.initiatorType==="fetch"&&c.name===n&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:r,spanUrl:n}},e.prototype.enable=function(){if(Kd){this.v.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}L1(fetch)&&(this.P(Or,"fetch"),this.v.debug("removing previous patch for constructor")),this.ae(Or,"fetch",this.Ca())},e.prototype.disable=function(){Kd||(this.P(Or,"fetch"),this.un=new WeakSet)},e})(O1),ay=(function(){function t(){}return t.prototype.emit=function(e){},t})(),cV=new ay,uV=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new ay},t})(),ly=new uV,hV=(function(){function t(e,n,r,i){this.Zn=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this.sr().emit(e)},t.prototype.sr=function(){if(this.b)return this.b;var e=this.Zn.getDelegateLogger(this.name,this.version,this.options);return e?(this.b=e,this.b):cV},t})(),_d=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new hV(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:ly},t.prototype.setDelegate=function(e){this.b=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this.b)===null||i===void 0?void 0:i.getLogger(e,n,r)},t})(),pV=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},eo=Symbol.for("io.opentelemetry.js.api.logs"),Cr=pV;function dV(t,e,n){return function(r){return r===t?e:n}}var Hd=1,fV=(function(){function t(){this.en=new _d}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Cr[eo]?this.getLoggerProvider():(Cr[eo]=dV(Hd,e,ly),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Cr[eo])===null||e===void 0?void 0:e.call(Cr,Hd))!==null&&n!==void 0?n:this.en},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Cr[eo],this.en=new _d},t})(),mV=fV.getInstance(),zl=function(){return zl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zl.apply(this,arguments)},yV=(function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this.ce={},this.ae=qt.wrap,this.P=qt.unwrap,this.Lo=qt.massWrap,this.Xo=qt.massUnwrap,this.setConfig(r),this.v=X.createComponentLogger({namespace:e}),this.gn=ut.getTracer(e,n),this.bn=Ce.getMeter(e,n),this.vn=mV.getLogger(e,n),this.Sn()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this.bn},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this.bn=e.getMeter(this.instrumentationName,this.instrumentationVersion),this.Sn()},Object.defineProperty(t.prototype,"logger",{get:function(){return this.vn},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this.vn=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype.Sn=function(){},t.prototype.getConfig=function(){return this.ce},t.prototype.setConfig=function(e){this.ce=zl({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this.gn=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this.gn},enumerable:!1,configurable:!0}),t.prototype.Wo=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this.v.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t})(),gV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),bV=(function(t){gV(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o.ce.enabled&&o.enable(),o}return e})(yV);function vV(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function zd(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var SV="http.method",wV="http.url",IV="http.host",TV="http.scheme",EV="http.status_code",RV="http.user_agent",CV="http.request_content_length_uncompressed",ZV=SV,kV=wV,VV=IV,xV=TV,NV=EV,OV=RV,GV=CV,Ee;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(Ee||(Ee={}));var LV=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},XV=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},WV=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function UV(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return PV(t);if(t instanceof URLSearchParams)return Bd(t.toString());if(typeof t=="string")return Bd(t);WV.warn("unknown body type")}var MV=new TextEncoder;function Bd(t){return MV.encode(t).byteLength}function PV(t){var e,n,r=0;try{for(var i=LV(t.entries()),o=i.next();!o.done;o=i.next()){var s=XV(o.value,2),a=s[0],c=s[1];r+=a.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var jd="0.57.1",Bl;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(Bl||(Bl={}));var FV=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),AV=300,JV=(function(t){FV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",jd,n)||this;return r.component="xml-http-request",r.version=jd,r.moduleName=r.component,r.wn=0,r.ln=new WeakMap,r.un=new WeakSet,r}return e.prototype.init=function(){},e.prototype.si=function(n,r){var i=Re(r).href;if(!ry(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};Qt.inject(tt.active(),o),Object.keys(o).length>0&&this.v.debug("headers inject skipped due to CORS policy");return}var s={};Qt.inject(tt.active(),s),Object.keys(s).forEach(function(a){n.setRequestHeader(a,String(s[a]))})},e.prototype.ei=function(n,r){var i=this;tt.with(ut.setSpan(tt.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[J.FETCH_START]});_n(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[J.RESPONSE_END])})},e.prototype.ii=function(n,r,i){if(typeof i=="string"){var o=Re(i);r.status!==void 0&&n.setAttribute(NV,r.status),r.statusText!==void 0&&n.setAttribute(Bl.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(VV,o.host),n.setAttribute(xV,o.protocol.replace(":","")),n.setAttribute(OV,navigator.userAgent)}},e.prototype.ka=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&vV(function(){return o(n,r)},function(s){s&&i.v.error("applyCustomAttributesOnSpan",s)})},e.prototype.Va=function(n,r){var i=this.ln.get(n);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var s=o.getEntries(),a=Re(r);s.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===a.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._i=function(){this.wn===0&&this.getConfig().clearTimingResources&&(te.clearResourceTimings(),this.ln=new WeakMap,this.un=new WeakSet)},e.prototype.eo=function(n,r,i,o,s){if(!(!i||!o||!s||!n.createdResources)){var a=n.createdResources.entries;(!a||!a.length)&&(a=te.getEntriesByType("resource"));var c=ey(Re(i).href,o,s,a,this.un);if(c.mainRequest){var l=c.mainRequest;this.hr(l);var u=c.corsPreFlightRequest;u&&(this.ei(r,u),this.hr(u)),_n(r,l,this.getConfig().ignoreNetworkEvents)}}},e.prototype.xa=function(n){var r=this.ln.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this.ln.delete(n)}},e.prototype.An=function(n,r,i){var o;if(Dm(r,this.getConfig().ignoreUrls)){this.v.debug("ignoring span as url matches ignored url");return}var s=i.toUpperCase(),a=this.tracer.startSpan(s,{kind:Fr.CLIENT,attributes:(o={},o[ZV]=i,o[kV]=Re(r).toString(),o)});return a.addEvent(Ee.METHOD_OPEN),this.xa(n),this.ln.set(n,{span:a,spanUrl:r}),a},e.prototype.hr=function(n){this.un.add(n)},e.prototype.Na=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=o[0],c=o[1];return i.An(this,c,a),r.apply(this,o)}}},e.prototype.Oa=function(){var n=this;function r(u,h,p,f){var m=h.callbackToRemoveEvents;typeof m=="function"&&m();var d=h.span,b=h.spanUrl,v=h.sendStartTime;d&&(n.eo(h,d,b,v,p),d.addEvent(u,f),n.ii(d,h,b),d.end(f),n.wn--),n._i()}function i(u,h){var p=n.ln.get(h);if(p){p.status=h.status,p.statusText=h.statusText,n.ln.delete(h),p.span&&n.ka(p.span,h);var f=fn(),m=Date.now();setTimeout(function(){r(u,p,f,m)},AV)}}function o(){i(Ee.EVENT_ERROR,this)}function s(){i(Ee.EVENT_ABORT,this)}function a(){i(Ee.EVENT_TIMEOUT,this)}function c(){this.status<299?i(Ee.EVENT_LOAD,this):i(Ee.EVENT_ERROR,this)}function l(u){u.removeEventListener("abort",s),u.removeEventListener("error",o),u.removeEventListener("load",c),u.removeEventListener("timeout",a);var h=n.ln.get(u);h&&(h.callbackToRemoveEvents=void 0)}return function(u){return function(){for(var h=this,p=[],f=0;f<arguments.length;f++)p[f]=arguments[f];var m=n.ln.get(this);if(!m)return u.apply(this,p);var d=m.span,b=m.spanUrl;if(d&&b){if(n.getConfig().measureRequestSize&&p!=null&&p[0]){var v=p[0],I=UV(v);I!==void 0&&d.setAttribute(GV,I)}tt.with(ut.setSpan(tt.active(),d),function(){n.wn++,m.sendStartTime=fn(),d.addEvent(Ee.METHOD_SEND),h.addEventListener("abort",s),h.addEventListener("error",o),h.addEventListener("load",c),h.addEventListener("timeout",a),m.callbackToRemoveEvents=function(){l(h),m.createdResources&&m.createdResources.observer.disconnect()},n.si(h,b),n.Va(h,b)})}return u.apply(this,p)}}},e.prototype.enable=function(){this.v.debug("applying patch to",this.moduleName,this.version),zd(XMLHttpRequest.prototype.open)&&(this.P(XMLHttpRequest.prototype,"open"),this.v.debug("removing previous patch from method open")),zd(XMLHttpRequest.prototype.send)&&(this.P(XMLHttpRequest.prototype,"send"),this.v.debug("removing previous patch from method send")),this.ae(XMLHttpRequest.prototype,"open",this.Na()),this.ae(XMLHttpRequest.prototype,"send",this.Oa())},e.prototype.disable=function(){this.v.debug("removing patch from",this.moduleName,this.version),this.P(XMLHttpRequest.prototype,"open"),this.P(XMLHttpRequest.prototype,"send"),this.wn=0,this.ln=new WeakMap,this.un=new WeakSet},e})(bV),DV=(t,e,n)=>{var r,i;let o=mt({},e);return n?((r=Object.keys(o))==null||r.forEach(s=>{[...n].includes(s==null?void 0:s.toLowerCase())||(o[s]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(s=>{[...YV,...t].includes(s==null?void 0:s.toLowerCase())&&(o[s]="[REDACTED]")}),o)},YV=["authorization","cookie","proxy-authorization","token"],KV=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],_V=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),HV=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function zV(t){return!!(t.includes("/sdk/evalx")&&t.match(_V)||t.includes("/eval/")&&t.match(HV))}var BV=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),jV=t=>zV(t),QV=(t,e)=>e.some(n=>t.toLocaleLowerCase().includes(n)),$V=(t,e,n)=>!QV(t,e)&&!jV(t)&&!BV(t),qV=(t,e,n)=>{var r;if(n.some(s=>t.toLowerCase().includes(s)))return!1;let i=[];e===!0?(i=["localhost",/^\//],(r=window==null?void 0:window.location)!=null&&r.host&&i.push(window.location.host)):e instanceof Array&&(i=e);let o=!1;return i.forEach(s=>{t.match(s)&&(o=!0)}),o},Qd=64*1024,tx={"application/json":64*1024*1024,"text/plain":64*1024*1024},cy=(t,e,n,r)=>{var i,o,s;let a=Qd;if(r){let c="";typeof r.get=="function"?c=(i=r.get("content-type"))!=null?i:"":c=(o=r["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch(l){}a=(s=tx[c])!=null?s:Qd}if(t){if(e)try{let c=JSON.parse(t);Array.isArray(c)?c.forEach(l=>{Object.keys(l).forEach(u=>{e.includes(u.toLocaleLowerCase())&&(l[u]="[REDACTED]")})}):Object.keys(c).forEach(l=>{e.includes(l.toLocaleLowerCase())&&(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}if(n)try{let c=JSON.parse(t);Object.keys(c).forEach(l=>{n.includes(l.toLocaleLowerCase())||(c[l]="[REDACTED]")}),t=JSON.stringify(c)}catch(c){}}try{t=t.slice(0,a)}catch(c){}return t},ex=(t,e,n)=>Yo(void 0,null,function*(){let r;try{let i=t.clone().body;if(i){let o=i.getReader(),s=new TextDecoder,a,c="";for(;!(a=yield o.read()).done;){let l=a.value;c+=s.decode(l)}r=c,r=cy(r,n,e,t.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r}),uy=(function(){function t(e){this.b=e}return t.prototype.export=function(e,n){this.b.export(e,n)},t.prototype.forceFlush=function(){return this.b.forceFlush()},t.prototype.shutdown=function(){return this.b.shutdown()},t})(),nx=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$d=(function(t){nx(e,t);function e(n,r,i){var o=t.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return e})(Error);function rx(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}function ix(t){if(t!=null)return function(){return t}}function ox(t,e,n){var r,i,o,s,a,c;return{timeoutMillis:rx((i=(r=t.timeoutMillis)!==null&&r!==void 0?r:e.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(s=(o=t.concurrencyLimit)!==null&&o!==void 0?o:e.concurrencyLimit)!==null&&s!==void 0?s:n.concurrencyLimit,compression:(c=(a=t.compression)!==null&&a!==void 0?a:e.compression)!==null&&c!==void 0?c:n.compression}}function sx(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var ax=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},lx=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},cx=(function(){function t(e){this.pr=[],this.Ga=e}return t.prototype.pushPromise=function(e){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this.pr.push(e);var r=function(){var i=n.pr.indexOf(e);n.pr.splice(i,1)};e.then(r,r)},t.prototype.hasReachedLimit=function(){return this.pr.length>=this.Ga},t.prototype.awaitAll=function(){return ax(this,void 0,void 0,function(){return lx(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.pr)];case 1:return e.sent(),[2]}})})},t})();function ux(t){return new cx(t.concurrencyLimit)}function hx(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function px(){return{handleResponse:function(t){t==null||!hx(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||X.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var dx=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},fx=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},mx=(function(){function t(e,n,r,i,o){this.Jn=e,this.$o=n,this.La=r,this.no=i,this.Xa=o,this.ro=X.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(e,n){var r=this;if(this.ro.debug("items to be sent",e),this.no.hasReachedLimit()){n({code:kt.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this.$o.serializeRequest(e);if(i==null){n({code:kt.FAILED,error:new Error("Nothing to send")});return}this.no.pushPromise(this.Jn.send(i,this.Xa).then(function(o){if(o.status==="success"){if(o.data!=null)try{r.La.handleResponse(r.$o.deserializeResponse(o.data))}catch(s){r.ro.warn("Export succeeded but could not deserialize response - is the response specification compliant?",s,o.data)}n({code:kt.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:kt.FAILED,error:o.error});return}else o.status==="retryable"?n({code:kt.FAILED,error:new $d("Export failed with retryable status")}):n({code:kt.FAILED,error:new $d("Export failed with unknown error")})},function(o){return n({code:kt.FAILED,error:o})}))},t.prototype.forceFlush=function(){return this.no.awaitAll()},t.prototype.shutdown=function(){return dx(this,void 0,void 0,function(){return fx(this,function(e){switch(e.label){case 0:return this.ro.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this.Jn.shutdown(),[2]}})})},t})();function yx(t,e){return new mx(t.transport,t.serializer,px(),t.promiseHandler,e.timeout)}function hy(t,e,n){return yx({transport:n,serializer:e,promiseHandler:ux(t)},{timeout:t.timeoutMillis})}function py(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function gx(t){var e=Number(BigInt.asUintN(32,t)),n=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:n}}function dy(t){var e=py(t);return gx(e)}function bx(t){var e=py(t);return e.toString()}var vx=typeof BigInt<"u"?bx:Ze;function qd(t){return t}function fy(t){if(t!==void 0)return Ec(t)}var Sx={encodeHrTime:dy,encodeSpanContext:Ec,encodeOptionalSpanContext:fy};function my(t){var e,n;if(t===void 0)return Sx;var r=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(n=t.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?dy:vx,encodeSpanContext:i?qd:Ec,encodeOptionalSpanContext:i?qd:fy}}var wx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function yy(t){return{attributes:bn(t.attributes),droppedAttributesCount:0}}function gy(t){return{name:t.name,version:t.version}}function bn(t){return Object.keys(t).map(function(e){return by(e,t[e])})}function by(t,e){return{key:t,value:vy(e)}}function vy(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(vy)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(n){var r=wx(n,2),i=r[0],o=r[1];return by(i,o)})}}:{}}var ae;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(ae||(ae={}));var be;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(be||(be={}));var Ix=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),tf=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},ef=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Tx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ex=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Rx=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Cx(t){return t!=null}function Sy(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(n){return[n,t[n]]})))}function Zx(t){var e,n;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((n=t.schemaUrl)!==null&&n!==void 0?n:"")}var wy=(function(t){Ix(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e})(Error);function Jr(t,e){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new wy("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function kx(t){return tf(this,void 0,void 0,function(){var e=this;return ef(this,function(n){return[2,Promise.all(t.map(function(r){return tf(e,void 0,void 0,function(){var i,o;return ef(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,r];case 1:return i=s.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=s.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function Vx(t){return t.status==="rejected"}function nf(t,e){var n=[];return t.forEach(function(r){n.push.apply(n,Ex([],Tx(e(r)),!1))}),n}function xx(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=Rx(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!e.has(s))return!1}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function Nx(t,e){for(var n=0,r=t.length-1,i=t.length;r>=n;){var o=n+Math.trunc((r-n)/2);t[o]<e?n=o+1:(i=o,r=o-1)}return i}function Ox(t,e){return t.toLowerCase()===e.toLowerCase()}var mn;(function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(mn||(mn={}));var Gx=(function(){function t(){this.kind=mn.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(e,n){},t.prototype.diff=function(e,n){},t.prototype.toMetricData=function(e,n,r,i){},t})(),K;(function(t){t.COUNTER="COUNTER",t.GAUGE="GAUGE",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(K||(K={}));function Me(t,e,n){var r,i,o,s;return Ux(t)||X.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,description:(r=n==null?void 0:n.description)!==null&&r!==void 0?r:"",unit:(i=n==null?void 0:n.unit)!==null&&i!==void 0?i:"",valueType:(o=n==null?void 0:n.valueType)!==null&&o!==void 0?o:Ye.DOUBLE,advice:(s=n==null?void 0:n.advice)!==null&&s!==void 0?s:{}}}function Lx(t,e){var n,r;return{name:(n=t.name)!==null&&n!==void 0?n:e.name,description:(r=t.description)!==null&&r!==void 0?r:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function Xx(t,e){return Ox(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var Wx=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Ux(t){return t.match(Wx)!=null}var Mx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function Px(t){var e=t.map(function(){return 0});return e.push(0),{buckets:{boundaries:t,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var dl=(function(){function t(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=Px(n)),this.startTime=e,this.dr=n,this.xt=r,this.le=i}return t.prototype.record=function(e){if(!Number.isNaN(e)){this.le.count+=1,this.le.sum+=e,this.xt&&(this.le.min=Math.min(e,this.le.min),this.le.max=Math.max(e,this.le.max),this.le.hasMinMax=!0);var n=Nx(this.dr,e);this.le.buckets.counts[n]+=1}},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.le},t})(),Iy=(function(){function t(e,n){this.dr=e,this.xt=n,this.kind=mn.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new dl(e,this.dr,this.xt)},t.prototype.merge=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=o[c]+s[c];var l=1/0,u=-1/0;return this.xt&&(r.hasMinMax&&i.hasMinMax?(l=Math.min(r.min,i.min),u=Math.max(r.max,i.max)):r.hasMinMax?(l=r.min,u=r.max):i.hasMinMax&&(l=i.min,u=i.max)),new dl(e.startTime,r.buckets.boundaries,this.xt,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:r.count+i.count,sum:r.sum+i.sum,hasMinMax:this.xt&&(r.hasMinMax||i.hasMinMax),min:l,max:u})},t.prototype.diff=function(e,n){for(var r=e.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,s=i.buckets.counts,a=new Array(o.length),c=0;c<o.length;c++)a[c]=s[c]-o[c];return new dl(n.startTime,r.buckets.boundaries,this.xt,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:i.count-r.count,sum:i.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.HISTOGRAM,dataPoints:r.map(function(o){var s=Mx(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===K.GAUGE||e.type===K.UP_DOWN_COUNTER||e.type===K.OBSERVABLE_GAUGE||e.type===K.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,buckets:l.buckets,count:l.count}}})}},t})(),fl=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},ml=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},rf=(function(){function t(e,n,r,i){e===void 0&&(e=new Fx),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=e,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),t.prototype.counts=function(){var e=this;return Array.from({length:this.length},function(n,r){return e.at(r)})},t.prototype.at=function(e){var n=this.indexBase-this.indexStart;return e<n&&(e+=this.backing.length),e-=n,this.backing.countAt(e)},t.prototype.incrementBucket=function(e,n){this.backing.increment(e,n)},t.prototype.decrementBucket=function(e,n){this.backing.decrement(e,n)},t.prototype.trim=function(){for(var e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this.qo()},t.prototype.downscale=function(e){this.qo();for(var n=1+this.indexEnd-this.indexStart,r=1<<e,i=0,o=0,s=this.indexStart;s<=this.indexEnd;){var a=s%r;a<0&&(a+=r);for(var c=a;c<r&&i<n;c++)this.Wa(o,i),i++,s++;o++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype.qo=function(){var e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)},t.prototype.Wa=function(e,n){e!==n&&this.incrementBucket(e,this.backing.emptyBucket(n))},t})(),Fx=(function(){function t(e){e===void 0&&(e=[0]),this.kt=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this.kt.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(e){return this.kt[e]},t.prototype.growTo=function(e,n,r){var i=new Array(e).fill(0);i.splice.apply(i,ml([r,this.kt.length-n],fl(this.kt.slice(n)),!1)),i.splice.apply(i,ml([0,n],fl(this.kt.slice(0,n)),!1)),this.kt=i},t.prototype.reverse=function(e,n){for(var r=Math.floor((e+n)/2)-e,i=0;i<r;i++){var o=this.kt[e+i];this.kt[e+i]=this.kt[n-i-1],this.kt[n-i-1]=o}},t.prototype.emptyBucket=function(e){var n=this.kt[e];return this.kt[e]=0,n},t.prototype.increment=function(e,n){this.kt[e]+=n},t.prototype.decrement=function(e,n){this.kt[e]>=n?this.kt[e]-=n:this.kt[e]=0},t.prototype.clone=function(){return new t(ml([],fl(this.kt),!1))},t})(),Ax=52,Jx=2146435072,Dx=1048575,Ty=1023,Ey=-1022,Ry=Ty,jl=Math.pow(2,-1022);function Cy(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=(n&Jx)>>20;return r-Ty}function Zy(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4),i=(n&Dx)*Math.pow(2,32);return i+r}function Ql(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function Yx(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var Kx=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Dr=(function(t){Kx(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Error),_x=(function(){function t(e){this.Vn=-e}return t.prototype.mapToIndex=function(e){if(e<jl)return this.fr();var n=Cy(e),r=this.Ua(Zy(e)-1,Ax);return n+r>>this.Vn},t.prototype.lowerBoundary=function(e){var n=this.fr();if(e<n)throw new Dr("underflow: "+e+" is < minimum lower boundary: "+n);var r=this.Nr();if(e>r)throw new Dr("overflow: "+e+" is > maximum lower boundary: "+r);return Ql(1,e<<this.Vn)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.Vn===0?0:-this.Vn},enumerable:!1,configurable:!0}),t.prototype.fr=function(){var e=Ey>>this.Vn;return this.Vn<2&&e--,e},t.prototype.Nr=function(){return Ry>>this.Vn},t.prototype.Ua=function(e,n){return Math.floor(e*Math.pow(2,-n))},t})(),Hx=(function(){function t(e){this.Dn=e,this.io=Ql(Math.LOG2E,e),this.Ma=Ql(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=jl)return this.fr()-1;if(Zy(e)===0){var n=Cy(e);return(n<<this.Dn)-1}var r=Math.floor(Math.log(e)*this.io),i=this.Nr();return r>=i?i:r},t.prototype.lowerBoundary=function(e){var n=this.Nr();if(e>=n){if(e===n)return 2*Math.exp((e-(1<<this.Dn))/this.io);throw new Dr("overflow: "+e+" is > maximum lower boundary: "+n)}var r=this.fr();if(e<=r){if(e===r)return jl;if(e===r-1)return Math.exp((e+(1<<this.Dn))/this.io)/2;throw new Dr("overflow: "+e+" is < minimum lower boundary: "+r)}return Math.exp(e*this.Ma)},Object.defineProperty(t.prototype,"scale",{get:function(){return this.Dn},enumerable:!1,configurable:!0}),t.prototype.fr=function(){return Ey<<this.Dn},t.prototype.Nr=function(){return(Ry+1<<this.Dn)-1},t})(),of=-10,sf=20,zx=Array.from({length:31},function(t,e){return e>10?new Hx(e-10):new _x(e-10)});function af(t){if(t>sf||t<of)throw new Dr("expected scale >= "+of+" && <= "+sf+", got: "+t);return zx[t+10]}var Bx=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},no=(function(){function t(e,n){this.low=e,this.high=n}return t.combine=function(e,n){return new t(Math.min(e.low,n.low),Math.max(e.high,n.high))},t})(),jx=20,Qx=160,yl=2,$x=(function(){function t(e,n,r,i,o,s,a,c,l,u,h){e===void 0&&(e=e),n===void 0&&(n=Qx),r===void 0&&(r=!0),i===void 0&&(i=0),o===void 0&&(o=0),s===void 0&&(s=0),a===void 0&&(a=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),l===void 0&&(l=new rf),u===void 0&&(u=new rf),h===void 0&&(h=af(jx)),this.startTime=e,this.Ze=n,this.xt=r,this.mr=i,this.xn=o,this.Yn=s,this.Nn=a,this.On=c,this.oo=l,this.so=u,this.Kn=h,this.Ze<yl&&(X.warn("Exponential Histogram Max Size set to "+this.Ze+", changing to the minimum size of: "+yl),this.Ze=yl)}return t.prototype.record=function(e){this.updateByIncrement(e,1)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return{hasMinMax:this.xt,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(t.prototype,"sum",{get:function(){return this.mr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.Nn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.On},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.xn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this.Yn},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this.xn===this.Yn?0:this.Kn.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this.oo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this.so},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(e,n){if(!Number.isNaN(e)){if(e>this.On&&(this.On=e),e<this.Nn&&(this.Nn=e),this.xn+=n,e===0){this.Yn+=n;return}this.mr+=e*n,e>0?this.us(this.oo,e,n):this.us(this.so,-e,n)}},t.prototype.merge=function(e){this.xn===0?(this.Nn=e.min,this.On=e.max):e.count!==0&&(e.min<this.min&&(this.Nn=e.min),e.max>this.max&&(this.On=e.max)),this.startTime=e.startTime,this.mr+=e.sum,this.xn+=e.count,this.Yn+=e.zeroCount;var n=this.hs(e);this.ao(this.scale-n),this.ps(this.positive,e,e.positive,n),this.ps(this.negative,e,e.negative,n)},t.prototype.diff=function(e){this.Nn=1/0,this.On=-1/0,this.mr-=e.sum,this.xn-=e.count,this.Yn-=e.zeroCount;var n=this.hs(e);this.ao(this.scale-n),this.ds(this.positive,e,e.positive,n),this.ds(this.negative,e,e.negative,n)},t.prototype.clone=function(){return new t(this.startTime,this.Ze,this.xt,this.mr,this.xn,this.Yn,this.Nn,this.On,this.positive.clone(),this.negative.clone(),this.Kn)},t.prototype.us=function(e,n,r){var i=this.Kn.mapToIndex(n),o=!1,s=0,a=0;if(e.length===0?(e.indexStart=i,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):i<e.indexStart&&e.indexEnd-i>=this.Ze?(o=!0,a=i,s=e.indexEnd):i>e.indexEnd&&i-e.indexStart>=this.Ze&&(o=!0,a=e.indexStart,s=i),o){var c=this.lo(s,a);this.ao(c),i=this.Kn.mapToIndex(n)}this.fs(e,i,r)},t.prototype.fs=function(e,n,r){if(r!==0){if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=n),n<e.indexStart){var i=e.indexEnd-n;i>=e.backing.length&&this.ms(e,i+1),e.indexStart=n}else if(n>e.indexEnd){var i=n-e.indexStart;i>=e.backing.length&&this.ms(e,i+1),e.indexEnd=n}var o=n-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,r)}},t.prototype.ms=function(e,n){var r=e.backing.length,i=e.indexBase-e.indexStart,o=r-i,s=Yx(n);s>this.Ze&&(s=this.Ze);var a=s-i;e.backing.growTo(s,o,a)},t.prototype.lo=function(e,n){for(var r=0;e-n>=this.Ze;)e>>=1,n>>=1,r++;return r},t.prototype.ao=function(e){if(e!==0){if(e<0)throw new Error("impossible change of scale: "+this.scale);var n=this.Kn.scale-e;this.oo.downscale(e),this.so.downscale(e),this.Kn=af(n)}},t.prototype.hs=function(e){var n=Math.min(this.scale,e.scale),r=no.combine(this.Or(this.positive,this.scale,n),this.Or(e.positive,e.scale,n)),i=no.combine(this.Or(this.negative,this.scale,n),this.Or(e.negative,e.scale,n));return Math.min(n-this.lo(r.high,r.low),n-this.lo(i.high,i.low))},t.prototype.Or=function(e,n,r){if(e.length===0)return new no(0,-1);var i=n-r;return new no(e.indexStart>>i,e.indexEnd>>i)},t.prototype.ps=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++)this.fs(e,o+a>>s,r.at(a))},t.prototype.ds=function(e,n,r,i){for(var o=r.offset,s=n.scale-i,a=0;a<r.length;a++){var c=o+a>>s,l=c-e.indexBase;l<0&&(l+=e.backing.length),e.decrementBucket(l,r.at(a))}e.trim()},t})(),qx=(function(){function t(e,n){this.Ze=e,this.xt=n,this.kind=mn.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new $x(e,this.Ze,this.xt)},t.prototype.merge=function(e,n){var r=n.clone();return r.merge(e),r},t.prototype.diff=function(e,n){var r=n.clone();return r.diff(e),r},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var s=Bx(o,2),a=s[0],c=s[1],l=c.toPointValue(),u=e.type===K.GAUGE||e.type===K.UP_DOWN_COUNTER||e.type===K.OBSERVABLE_GAUGE||e.type===K.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:c.startTime,endTime:i,value:{min:l.hasMinMax?l.min:void 0,max:l.hasMinMax?l.max:void 0,sum:u?void 0:l.sum,positive:{offset:l.positive.offset,bucketCounts:l.positive.bucketCounts},negative:{offset:l.negative.offset,bucketCounts:l.negative.bucketCounts},count:l.count,scale:l.scale,zeroCount:l.zeroCount}}})}},t})(),tN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},gl=(function(){function t(e,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=e,this.le=n,this.sampleTime=r}return t.prototype.record=function(e){this.le=e,this.sampleTime=$t(Date.now())},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.le},t})(),eN=(function(){function t(){this.kind=mn.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new gl(e)},t.prototype.merge=function(e,n){var r=ji(n.sampleTime)>=ji(e.sampleTime)?n:e;return new gl(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(e,n){var r=ji(n.sampleTime)>=ji(e.sampleTime)?n:e;return new gl(n.startTime,r.toPointValue(),r.sampleTime)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.GAUGE,dataPoints:r.map(function(o){var s=tN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t})(),nN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Zr=(function(){function t(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=e,this.monotonic=n,this.le=r,this.reset=i}return t.prototype.record=function(e){this.monotonic&&e<0||(this.le+=e)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this.le},t})(),lf=(function(){function t(e){this.monotonic=e,this.kind=mn.SUM}return t.prototype.createAccumulation=function(e){return new Zr(e,this.monotonic)},t.prototype.merge=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return n.reset?new Zr(n.startTime,this.monotonic,i,n.reset):new Zr(e.startTime,this.monotonic,r+i)},t.prototype.diff=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return this.monotonic&&r>i?new Zr(n.startTime,this.monotonic,i,!0):new Zr(n.startTime,this.monotonic,i-r)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:be.SUM,dataPoints:r.map(function(o){var s=nN(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t})(),vn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),xe=(function(){function t(){}return t.Drop=function(){return ky},t.Sum=function(){return Vy},t.LastValue=function(){return xy},t.Histogram=function(){return Ny},t.ExponentialHistogram=function(){return uN},t.Default=function(){return hN},t})(),rN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Gx,e})(xe),iN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){switch(n.type){case K.COUNTER:case K.OBSERVABLE_COUNTER:case K.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new lf(!0),e.NON_MONOTONIC_INSTANCE=new lf(!1),e})(xe),oN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new eN,e})(xe),sN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Iy([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e})(xe),aN=(function(t){vn(e,t);function e(n,r){r===void 0&&(r=!0);var i=t.call(this)||this;if(i.xt=r,n==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort(function(a,c){return a-c});var o=n.lastIndexOf(-1/0),s=n.indexOf(1/0);return s===-1&&(s=void 0),i.dr=n.slice(o+1,s),i}return e.prototype.createAggregator=function(n){return new Iy(this.dr,this.xt)},e})(xe),lN=(function(t){vn(e,t);function e(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=t.call(this)||this;return i.Ze=n,i.xt=r,i}return e.prototype.createAggregator=function(n){return new qx(this.Ze,this.xt)},e})(xe),cN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.Kr=function(n){switch(n.type){case K.COUNTER:case K.UP_DOWN_COUNTER:case K.OBSERVABLE_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:return Vy;case K.GAUGE:case K.OBSERVABLE_GAUGE:return xy;case K.HISTOGRAM:return n.advice.explicitBucketBoundaries?new aN(n.advice.explicitBucketBoundaries):Ny}return X.warn("Unable to recognize instrument type: "+n.type),ky},e.prototype.createAggregator=function(n){return this.Kr(n).createAggregator(n)},e})(xe),ky=new rN,Vy=new iN,xy=new oN,Ny=new sN,uN=new lN,hN=new cN,pN=function(t){return xe.Default()},dN=function(t){return ae.CUMULATIVE},bl=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},vl=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},cf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},fN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},mN=(function(){function t(e){var n,r,i;this.nn=!1,this.co=(n=e==null?void 0:e.aggregationSelector)!==null&&n!==void 0?n:pN,this.uo=(r=e==null?void 0:e.aggregationTemporalitySelector)!==null&&r!==void 0?r:dN,this.Pa=(i=e==null?void 0:e.metricProducers)!==null&&i!==void 0?i:[],this.ys=e==null?void 0:e.cardinalitySelector}return t.prototype.setMetricProducer=function(e){if(this.ho)throw new Error("MetricReader can not be bound to a MeterProvider again.");this.ho=e,this.onInitialized()},t.prototype.selectAggregation=function(e){return this.co(e)},t.prototype.selectAggregationTemporality=function(e){return this.uo(e)},t.prototype.selectCardinalityLimit=function(e){return this.ys?this.ys(e):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(e){return bl(this,void 0,void 0,function(){var n,r,i,o,s,a;return vl(this,function(c){switch(c.label){case 0:if(this.ho===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this.nn)throw new Error("MetricReader is shutdown");return[4,Promise.all(fN([this.ho.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})],cf(this.Pa.map(function(l){return l.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})})),!1))];case 1:return n=cf.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(nf(i,function(l){return l.errors})),s=r.resourceMetrics.resource,a=r.resourceMetrics.scopeMetrics.concat(nf(i,function(l){return l.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:s,scopeMetrics:a},errors:o}]}})})},t.prototype.shutdown=function(e){return bl(this,void 0,void 0,function(){return vl(this,function(n){switch(n.label){case 0:return this.nn?(X.error("Cannot call shutdown twice."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,Jr(this.onShutdown(),e.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this.nn=!0,[2]}})})},t.prototype.forceFlush=function(e){return bl(this,void 0,void 0,function(){return vl(this,function(n){switch(n.label){case 0:return this.nn?(X.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):(e==null?void 0:e.timeoutMillis)!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,Jr(this.onForceFlush(),e.timeoutMillis)];case 3:return n.sent(),[2]}})})},t})(),yN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ro=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},io=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},gN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},bN=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},vN=(function(t){yN(e,t);function e(n){var r,i,o,s,a=t.call(this,{aggregationSelector:(r=n.exporter.selectAggregation)===null||r===void 0?void 0:r.bind(n.exporter),aggregationTemporalitySelector:(i=n.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(n.exporter),metricProducers:n.metricProducers})||this;if(n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<n.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return a.Fa=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,a.po=(s=n.exportTimeoutMillis)!==null&&s!==void 0?s:3e4,a.Un=n.exporter,a}return e.prototype.gs=function(){return ro(this,void 0,void 0,function(){var n;return io(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Jr(this.Aa(),this.po)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof wy?(X.error("Export took longer than %s milliseconds and timed out.",this.po),[2]):(Ke(n),[3,3]);case 3:return[2]}})})},e.prototype.Aa=function(){var n,r;return ro(this,void 0,void 0,function(){var i,o,s,a,c,l;return io(this,function(u){switch(u.label){case 0:return[4,this.collect({timeoutMillis:this.po})];case 1:if(i=u.sent(),o=i.resourceMetrics,s=i.errors,s.length>0&&(l=X).error.apply(l,bN(["PeriodicExportingMetricReader: metrics collection errors"],gN(s),!1)),!o.resource.asyncAttributesPending)return[3,5];u.label=2;case 2:return u.trys.push([2,4,,5]),[4,(r=(n=o.resource).waitForAsyncAttributes)===null||r===void 0?void 0:r.call(n)];case 3:return u.sent(),[3,5];case 4:return a=u.sent(),X.debug("Error while resolving async portion of resource: ",a),Ke(a),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,nk.qs(this.Un,o)];case 6:if(c=u.sent(),c.code!==kt.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},e.prototype.onInitialized=function(){var n=this;this.bs=setInterval(function(){n.gs()},this.Fa)},e.prototype.onForceFlush=function(){return ro(this,void 0,void 0,function(){return io(this,function(n){switch(n.label){case 0:return[4,this.gs()];case 1:return n.sent(),[4,this.Un.forceFlush()];case 2:return n.sent(),[2]}})})},e.prototype.onShutdown=function(){return ro(this,void 0,void 0,function(){return io(this,function(n){switch(n.label){case 0:return this.bs&&clearInterval(this.bs),[4,this.onForceFlush()];case 1:return n.sent(),[4,this.Un.shutdown()];case 2:return n.sent(),[2]}})})},e})(mN),SN=(function(){function t(){this.vs=[]}return t.prototype.addView=function(e){this.vs.push(e)},t.prototype.findViews=function(e,n){var r=this,i=this.vs.filter(function(o){return r.Ja(o.instrumentSelector,e)&&r.Da(o.meterSelector,n)});return i},t.prototype.Ja=function(e,n){return(e.getType()===void 0||n.type===e.getType())&&e.getNameFilter().match(n.name)&&e.getUnitFilter().match(n.unit)},t.prototype.Da=function(e,n){return e.getNameFilter().match(n.name)&&(n.version===void 0||e.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||e.getSchemaUrlFilter().match(n.schemaUrl))},t})(),Sn=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Bo=(function(){function t(e,n){this.Ya=e,this.rn=n}return t.prototype.Gr=function(e,n,r){if(n===void 0&&(n={}),r===void 0&&(r=tt.active()),typeof e!="number"){X.warn("non-number value provided to metric "+this.rn.name+": "+e);return}this.rn.valueType===Ye.INT&&!Number.isInteger(e)&&(X.warn("INT value type cannot accept a floating-point value for "+this.rn.name+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Ya.record(e,n,r,$t(Date.now()))},t})(),wN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){this.Gr(n,r,i)},e})(Bo),IN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){if(n<0){X.warn("negative value provided to counter "+this.rn.name+": "+n);return}this.Gr(n,r,i)},e})(Bo),TN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){this.Gr(n,r,i)},e})(Bo),EN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){if(n<0){X.warn("negative value provided to histogram "+this.rn.name+": "+n);return}this.Gr(n,r,i)},e})(Bo),jo=(function(){function t(e,n,r){this.Ss=r,this.rn=e,this.ws=n}return t.prototype.addCallback=function(e){this.Ss.addCallback(e,this)},t.prototype.removeCallback=function(e){this.Ss.removeCallback(e,this)},t})(),RN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(jo),CN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(jo),ZN=(function(t){Sn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(jo);function $l(t){return t instanceof jo}var kN=(function(){function t(e){this.Qe=e}return t.prototype.createGauge=function(e,n){var r=Me(e,K.GAUGE,n),i=this.Qe.registerMetricStorage(r);return new TN(i,r)},t.prototype.createHistogram=function(e,n){var r=Me(e,K.HISTOGRAM,n),i=this.Qe.registerMetricStorage(r);return new EN(i,r)},t.prototype.createCounter=function(e,n){var r=Me(e,K.COUNTER,n),i=this.Qe.registerMetricStorage(r);return new IN(i,r)},t.prototype.createUpDownCounter=function(e,n){var r=Me(e,K.UP_DOWN_COUNTER,n),i=this.Qe.registerMetricStorage(r);return new wN(i,r)},t.prototype.createObservableGauge=function(e,n){var r=Me(e,K.OBSERVABLE_GAUGE,n),i=this.Qe.registerAsyncMetricStorage(r);return new CN(r,i,this.Qe.observableRegistry)},t.prototype.createObservableCounter=function(e,n){var r=Me(e,K.OBSERVABLE_COUNTER,n),i=this.Qe.registerAsyncMetricStorage(r);return new RN(r,i,this.Qe.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,n){var r=Me(e,K.OBSERVABLE_UP_DOWN_COUNTER,n),i=this.Qe.registerAsyncMetricStorage(r);return new ZN(r,i,this.Qe.observableRegistry)},t.prototype.addBatchObservableCallback=function(e,n){this.Qe.observableRegistry.addBatchCallback(e,n)},t.prototype.removeBatchObservableCallback=function(e,n){this.Qe.observableRegistry.removeBatchCallback(e,n)},t})(),Oy=(function(){function t(e){this.hn=e}return t.prototype.getInstrumentDescriptor=function(){return this.hn},t.prototype.updateDescription=function(e){this.hn=Me(this.hn.name,this.hn.type,{description:e,valueType:this.hn.valueType,unit:this.hn.unit,advice:this.hn.advice})},t})(),VN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),uf=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},xN=(function(){function t(e){this.Lr=e,this.In=new Map,this._n=new Map}return t.prototype.get=function(e,n){return n!=null||(n=this.Lr(e)),this.In.get(n)},t.prototype.getOrDefault=function(e,n){var r=this.Lr(e);if(this.In.has(r))return this.In.get(r);var i=n();return this._n.has(r)||this._n.set(r,e),this.In.set(r,i),i},t.prototype.set=function(e,n,r){r!=null||(r=this.Lr(e)),this._n.has(r)||this._n.set(r,e),this.In.set(r,n)},t.prototype.has=function(e,n){return n!=null||(n=this.Lr(e)),this.In.has(n)},t.prototype.keys=function(){var e,n;return uf(this,function(r){switch(r.label){case 0:e=this._n.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var e,n;return uf(this,function(r){switch(r.label){case 0:e=this.In.entries(),n=e.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this._n.get(n.value[0]),n.value[1],n.value[0]]];case 2:return r.sent(),n=e.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this.In.size},enumerable:!1,configurable:!0}),t})(),hn=(function(t){VN(e,t);function e(){return t.call(this,Sy)||this}return e})(xN),NN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Gy=(function(){function t(e,n){this.cn=e,this.pn=new hn,this.Hn=new hn,this.fo={"otel.metric.overflow":!0},this.Is=(n!=null?n:2e3)-1,this.Ka=Sy(this.fo)}return t.prototype.record=function(e,n,r,i){var o=this,s=this.pn.get(n);if(!s){if(this.pn.size>=this.Is){var a=this.pn.getOrDefault(this.fo,function(){return o.cn.createAccumulation(i)});a==null||a.record(e);return}s=this.cn.createAccumulation(i),this.pn.set(n,s)}s==null||s.record(e)},t.prototype.batchCumulate=function(e,n){var r=this;Array.from(e.entries()).forEach(function(i){var o=NN(i,3),s=o[0],a=o[1],c=o[2],l=r.cn.createAccumulation(n);l==null||l.record(a);var u=l;if(r.Hn.has(s,c)){var h=r.Hn.get(s,c);u=r.cn.diff(h,l)}else if(r.Hn.size>=r.Is&&(s=r.fo,c=r.Ka,r.Hn.has(s,c))){var h=r.Hn.get(s,c);u=r.cn.diff(h,l)}if(r.pn.has(s,c)){var p=r.pn.get(s,c);u=r.cn.merge(p,u)}r.Hn.set(s,l,c),r.pn.set(s,u,c)})},t.prototype.collect=function(){var e=this.pn;return this.pn=new hn,e},t})(),Sl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},hf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ly=(function(){function t(e,n){var r=this;this.cn=e,this.zn=new Map,this.mo=new Map,n.forEach(function(i){r.zn.set(i,[])})}return t.prototype.buildMetrics=function(e,n,r,i){this._a(r);var o=this.Ha(e),s=o,a;if(this.mo.has(e)){var c=this.mo.get(e),l=c.collectionTime;a=c.aggregationTemporality,a===ae.CUMULATIVE?s=t.merge(c.accumulations,o,this.cn):s=t.calibrateStartTime(c.accumulations,o,l)}else a=e.selectAggregationTemporality(n.type);this.mo.set(e,{accumulations:s,collectionTime:i,aggregationTemporality:a});var u=ON(s);if(u.length!==0)return this.cn.toMetricData(n,a,u,i)},t.prototype._a=function(e){var n,r,i=this.zn.keys();try{for(var o=Sl(i),s=o.next();!s.done;s=o.next()){var a=s.value,c=this.zn.get(a);c===void 0&&(c=[],this.zn.set(a,c)),c.push(e)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.Ha=function(e){var n,r,i=new hn,o=this.zn.get(e);if(this.zn.set(e,[]),o===void 0)return i;try{for(var s=Sl(o),a=s.next();!a.done;a=s.next()){var c=a.value;i=t.merge(i,c,this.cn)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},t.merge=function(e,n,r){for(var i=e,o=n.entries(),s=o.next();s.done!==!0;){var a=hf(s.value,3),c=a[0],l=a[1],u=a[2];if(e.has(c,u)){var h=e.get(c,u),p=r.merge(h,l);i.set(c,p,u)}else i.set(c,l,u);s=o.next()}return i},t.calibrateStartTime=function(e,n,r){var i,o;try{for(var s=Sl(e.keys()),a=s.next();!a.done;a=s.next()){var c=hf(a.value,2),l=c[0],u=c[1],h=n.get(l,u);h==null||h.setStartTime(r)}}catch(p){i={error:p}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n},t})();function ON(t){return Array.from(t.entries())}var GN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),LN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},XN=(function(t){GN(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.yo=i,a.bo=s,a.yr=new Gy(r,a.bo),a.vo=new Ly(r,o),a}return e.prototype.record=function(n,r){var i=this,o=new hn;Array.from(n.entries()).forEach(function(s){var a=LN(s,2),c=a[0],l=a[1];o.set(i.yo.process(c),l)}),this.yr.batchCumulate(o,r)},e.prototype.collect=function(n,r){var i=this.yr.collect();return this.vo.buildMetrics(n,this.hn,i,r)},e})(Oy);function pf(t,e){var n="";return t.unit!==e.unit&&(n+=" - Unit '"+t.unit+"' does not match '"+e.unit+`'
|
|
632
632
|
`),t.type!==e.type&&(n+=" - Type '"+t.type+"' does not match '"+e.type+`'
|
|
633
633
|
`),t.valueType!==e.valueType&&(n+=" - Value Type '"+t.valueType+"' does not match '"+e.valueType+`'
|
|
634
634
|
`),t.description!==e.description&&(n+=" - Description '"+t.description+"' does not match '"+e.description+`'
|
|
635
635
|
`),n}function WN(t,e){return" - use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function UN(t,e){return" - use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function MN(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+"'"}function PN(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+`'
|
|
636
636
|
- OR - create a new view with the name `+t.name+" and description '"+t.description+"' and InstrumentSelector "+r+`
|
|
637
|
-
- OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+r}function
|
|
637
|
+
- OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+r}function df(t,e){return t.valueType!==e.valueType?WN(t,e):t.unit!==e.unit?UN(t,e):t.type!==e.type?MN(t,e):t.description!==e.description?PN(t,e):""}var wl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},FN=(function(){function t(){this.So=new Map,this.Xr=new Map}return t.create=function(){return new t},t.prototype.getStorages=function(e){var n,r,i,o,s=[];try{for(var a=wl(this.So.values()),c=a.next();!c.done;c=a.next()){var l=c.value;s=s.concat(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var u=this.Xr.get(e);if(u!=null)try{for(var h=wl(u.values()),p=h.next();!p.done;p=h.next()){var l=p.value;s=s.concat(l)}}catch(f){i={error:f}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}return s},t.prototype.register=function(e){this.Ts(e,this.So)},t.prototype.registerForCollector=function(e,n){var r=this.Xr.get(e);r==null&&(r=new Map,this.Xr.set(e,r)),this.Ts(n,r)},t.prototype.findOrUpdateCompatibleStorage=function(e){var n=this.So.get(e.name);return n===void 0?null:this.Es(e,n)},t.prototype.findOrUpdateCompatibleCollectorStorage=function(e,n){var r=this.Xr.get(e);if(r===void 0)return null;var i=r.get(n.name);return i===void 0?null:this.Es(n,i)},t.prototype.Ts=function(e,n){var r=e.getInstrumentDescriptor(),i=n.get(r.name);if(i===void 0){n.set(r.name,[e]);return}i.push(e)},t.prototype.Es=function(e,n){var r,i,o=null;try{for(var s=wl(n),a=s.next();!a.done;a=s.next()){var c=a.value,l=c.getInstrumentDescriptor();Xx(l,e)?(l.description!==e.description&&(e.description.length>l.description.length&&c.updateDescription(e.description),X.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view.
|
|
638
638
|
`,`Details:
|
|
639
|
-
`,
|
|
640
|
-
To resolve the conflict:`,
|
|
639
|
+
`,pf(l,e),`The longer description will be used.
|
|
640
|
+
To resolve the conflict:`,df(l,e))),o=c):X.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view.
|
|
641
641
|
`,`Details:
|
|
642
|
-
`,
|
|
643
|
-
`,ff(l,e))}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o},t})(),AN=(function(){function t(e){this.za=e}return t.prototype.record=function(e,n,r,i){this.za.forEach(function(o){o.record(e,n,r,i)})},t})(),JN=(function(){function t(e,n){this.Rs=e,this.Ba=n,this.Bn=new hn}return t.prototype.observe=function(e,n){if(n===void 0&&(n={}),typeof e!="number"){X.warn("non-number value provided to metric "+this.Rs+": "+e);return}this.Ba===Ye.INT&&!Number.isInteger(e)&&(X.warn("INT value type cannot accept a floating-point value for "+this.Rs+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Bn.set(n,e)},t})(),DN=(function(){function t(){this.Bn=new Map}return t.prototype.observe=function(e,n,r){if(r===void 0&&(r={}),!!$l(e)){var i=this.Bn.get(e);if(i==null&&(i=new hn,this.Bn.set(e,i)),typeof n!="number"){X.warn("non-number value provided to metric "+e.rn.name+": "+n);return}e.rn.valueType===Ye.INT&&!Number.isInteger(n)&&(X.warn("INT value type cannot accept a floating-point value for "+e.rn.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},t})(),Il=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Tl=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},mf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},yf=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},YN=(function(){function t(){this.Wr=[],this.Ur=[]}return t.prototype.addCallback=function(e,n){var r=this.Cs(e,n);r>=0||this.Wr.push({callback:e,instrument:n})},t.prototype.removeCallback=function(e,n){var r=this.Cs(e,n);r<0||this.Wr.splice(r,1)},t.prototype.addBatchCallback=function(e,n){var r=new Set(n.filter($l));if(r.size===0){X.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this.Zs(e,r);i>=0||this.Ur.push({callback:e,instruments:r})},t.prototype.removeBatchCallback=function(e,n){var r=new Set(n.filter($l)),i=this.Zs(e,r);i<0||this.Ur.splice(i,1)},t.prototype.observe=function(e,n){return Il(this,void 0,void 0,function(){var r,i,o,s;return Tl(this,function(a){switch(a.label){case 0:return r=this.ja(e,n),i=this.Qa(e,n),[4,kx(yf(yf([],mf(r),!1),mf(i),!1))];case 1:return o=a.sent(),s=o.filter(Vx).map(function(c){return c.reason}),[2,s]}})})},t.prototype.ja=function(e,n){var r=this;return this.Wr.map(function(i){var o=i.callback,s=i.instrument;return Il(r,void 0,void 0,function(){var a,c;return Tl(this,function(l){switch(l.label){case 0:return a=new JN(s.rn.name,s.rn.valueType),c=Promise.resolve(o(a)),n!=null&&(c=Jr(c,n)),[4,c];case 1:return l.sent(),s.ws.forEach(function(u){u.record(a.Bn,e)}),[2]}})})})},t.prototype.Qa=function(e,n){var r=this;return this.Ur.map(function(i){var o=i.callback,s=i.instruments;return Il(r,void 0,void 0,function(){var a,c;return Tl(this,function(l){switch(l.label){case 0:return a=new DN,c=Promise.resolve(o(a)),n!=null&&(c=Jr(c,n)),[4,c];case 1:return l.sent(),s.forEach(function(u){var h=a.Bn.get(u);h!=null&&u.ws.forEach(function(p){p.record(h,e)})}),[2]}})})})},t.prototype.Cs=function(e,n){return this.Wr.findIndex(function(r){return r.callback===e&&r.instrument===n})},t.prototype.Zs=function(e,n){return this.Ur.findIndex(function(r){return r.callback===e&&xx(r.instruments,n)})},t})(),KN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),_N=(function(t){KN(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.yo=i,a.bo=s,a.yr=new Ly(r,a.bo),a.vo=new Xy(r,o),a}return e.prototype.record=function(n,r,i,o){r=this.yo.process(r,i),this.yr.record(n,r,i,o)},e.prototype.collect=function(n,r){var i=this.yr.collect();return this.vo.buildMetrics(n,this.hn,i,r)},e})(Gy),Wy=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Zc=(function(){function t(){}return t.Noop=function(){return zN},t})(),HN=(function(t){Wy(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(n,r){return n},e})(Zc);(function(t){Wy(e,t);function e(n){var r=t.call(this)||this;return r.$a=n,r}return e.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(s){return i.$a.includes(s)}).forEach(function(s){return o[s]=n[s]}),o},e})(Zc);var zN=new HN,BN=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},jN=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},QN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},$N=(function(){function t(e,n){this.wo=e,this.ks=n,this.metricStorageRegistry=new FN,this.observableRegistry=new YN,this.meter=new kN(this)}return t.prototype.registerMetricStorage=function(e){var n=this.Vs(e,_N);return n.length===1?n[0]:new AN(n)},t.prototype.registerAsyncMetricStorage=function(e){var n=this.Vs(e,XN);return n},t.prototype.collect=function(e,n,r){return BN(this,void 0,void 0,function(){var i,o,s;return jN(this,function(a){switch(a.label){case 0:return[4,this.observableRegistry.observe(n,r==null?void 0:r.timeoutMillis)];case 1:return i=a.sent(),o=this.metricStorageRegistry.getStorages(e),o.length===0?[2,null]:(s=o.map(function(c){return c.collect(e,n)}).filter(Cx),s.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this.ks,metrics:s},errors:i}])}})})},t.prototype.Vs=function(e,n){var r=this,i=this.wo.viewRegistry.findViews(e,this.ks),o=i.map(function(c){var l=Lx(c,e),u=r.metricStorageRegistry.findOrUpdateCompatibleStorage(l);if(u!=null)return u;var h=c.aggregation.createAggregator(l),p=new n(l,h,c.attributesProcessor,r.wo.metricCollectors,c.aggregationCardinalityLimit);return r.metricStorageRegistry.register(p),p});if(o.length===0){var s=this.wo.selectAggregations(e.type),a=s.map(function(c){var l=QN(c,2),u=l[0],h=l[1],p=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(u,e);if(p!=null)return p;var f=h.createAggregator(e),m=u.selectCardinalityLimit(e.type),d=new n(e,f,Zc.Noop(),[u],m);return r.metricStorageRegistry.registerForCollector(u,d),d});o=o.concat(a)}return o},t})(),qN=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tO=(function(){function t(e){this.resource=e,this.viewRegistry=new SN,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var n=Zx(e),r=this.meterSharedStates.get(n);return r==null&&(r=new $N(this,e),this.meterSharedStates.set(n,r)),r},t.prototype.selectAggregations=function(e){var n,r,i=[];try{for(var o=qN(this.metricCollectors),s=o.next();!s.done;s=o.next()){var a=s.value;i.push([a,a.selectAggregation(e)])}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t})(),oo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},so=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},eO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},nO=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},rO=(function(){function t(e,n){this.dn=e,this.gr=n}return t.prototype.collect=function(e){return oo(this,void 0,void 0,function(){var n,r,i,o,s=this;return so(this,function(a){switch(a.label){case 0:return n=$t(Date.now()),r=[],i=[],o=Array.from(this.dn.meterSharedStates.values()).map(function(c){return oo(s,void 0,void 0,function(){var l;return so(this,function(u){switch(u.label){case 0:return[4,c.collect(this,n,e)];case 1:return l=u.sent(),(l==null?void 0:l.scopeMetrics)!=null&&r.push(l.scopeMetrics),(l==null?void 0:l.errors)!=null&&i.push.apply(i,nO([],eO(l.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return a.sent(),[2,{resourceMetrics:{resource:this.dn.resource,scopeMetrics:r},errors:i}]}})})},t.prototype.forceFlush=function(e){return oo(this,void 0,void 0,function(){return so(this,function(n){switch(n.label){case 0:return[4,this.gr.forceFlush(e)];case 1:return n.sent(),[2]}})})},t.prototype.shutdown=function(e){return oo(this,void 0,void 0,function(){return so(this,function(n){switch(n.label){case 0:return[4,this.gr.shutdown(e)];case 1:return n.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this.gr.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this.gr.selectAggregation(e)},t.prototype.selectCardinalityLimit=function(e){var n,r,i;return(i=(r=(n=this.gr).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,e))!==null&&i!==void 0?i:2e3},t})(),gf=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},bf=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},vf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function iO(t,e){var n=e!=null?e:Ar.empty();return t?Ar.default().merge(n):n}var oO=(function(){function t(e){var n,r,i,o,s;if(this.nn=!1,this.dn=new tO(iO((s=e==null?void 0:e.mergeResourceWithDefaults)!==null&&s!==void 0?s:!0,e==null?void 0:e.resource)),(e==null?void 0:e.views)!=null&&e.views.length>0)try{for(var a=vf(e.views),c=a.next();!c.done;c=a.next()){var l=c.value;this.dn.viewRegistry.addView(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if((e==null?void 0:e.readers)!=null&&e.readers.length>0)try{for(var u=vf(e.readers),h=u.next();!h.done;h=u.next()){var p=h.value;this.addMetricReader(p)}}catch(f){i={error:f}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}return t.prototype.getMeter=function(e,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this.nn?(X.warn("A shutdown MeterProvider cannot provide a Meter"),$R()):this.dn.getMeterSharedState({name:e,version:n,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var n=new rO(this.dn,e);e.setMetricProducer(n),this.dn.metricCollectors.push(n)},t.prototype.shutdown=function(e){return gf(this,void 0,void 0,function(){return bf(this,function(n){switch(n.label){case 0:return this.nn?(X.warn("shutdown may only be called once per MeterProvider"),[2]):(this.nn=!0,[4,Promise.all(this.dn.metricCollectors.map(function(r){return r.shutdown(e)}))]);case 1:return n.sent(),[2]}})})},t.prototype.forceFlush=function(e){return gf(this,void 0,void 0,function(){return bf(this,function(n){switch(n.label){case 0:return this.nn?(X.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this.dn.metricCollectors.map(function(r){return r.forceFlush(e)}))];case 1:return n.sent(),[2]}})})},t})();function sO(t,e){var n=yy(e);return{resource:gy(t.resource),schemaUrl:void 0,scopeMetrics:aO(t.scopeMetrics,n)}}function aO(t,e){return Array.from(t.map(function(n){return{scope:by(n.scope),metrics:n.metrics.map(function(r){return lO(r,e)}),schemaUrl:n.scope.schemaUrl}}))}function lO(t,e){var n={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},r=pO(t.aggregationTemporality);switch(t.dataPointType){case be.SUM:n.sum={aggregationTemporality:r,isMonotonic:t.isMonotonic,dataPoints:Sf(t,e)};break;case be.GAUGE:n.gauge={dataPoints:Sf(t,e)};break;case be.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:uO(t,e)};break;case be.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:hO(t,e)};break}return n}function cO(t,e,n){var r={attributes:bn(t.attributes),startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)};switch(e){case Ye.INT:r.asInt=t.value;break;case Ye.DOUBLE:r.asDouble=t.value;break}return r}function Sf(t,e){return t.dataPoints.map(function(n){return cO(n,t.descriptor.valueType,e)})}function uO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:bn(n.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function hO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:bn(n.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function pO(t){switch(t){case ae.DELTA:return 1;case ae.CUMULATIVE:return 2}}function dO(t,e){return{resourceMetrics:t.map(function(n){return sO(n,e)})}}var fO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function yO(t,e){var n,r=t.spanContext(),i=t.status;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:bn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return bO(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return gO(o,e)}),droppedLinksCount:t.droppedLinksCount}}function gO(t,e){var n;return{attributes:t.attributes?bn(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(n=t.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function bO(t,e){return{attributes:t.attributes?bn(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function vO(t,e){var n=yy(e);return{resourceSpans:wO(t,n)}}function SO(t){var e,n,r=new Map;try{for(var i=fO(t),o=i.next();!o.done;o=i.next()){var s=o.value,a=r.get(s.resource);a||(a=new Map,r.set(s.resource,a));var c=s.instrumentationLibrary.name+"@"+(s.instrumentationLibrary.version||"")+":"+(s.instrumentationLibrary.schemaUrl||""),l=a.get(c);l||(l=[],a.set(c,l)),l.push(s)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function wO(t,e){for(var n=SO(t),r=[],i=n.entries(),o=i.next();!o.done;){for(var s=mO(o.value,2),a=s[0],c=s[1],l=[],u=c.values(),h=u.next();!h.done;){var p=h.value;if(p.length>0){var f=p.map(function(d){return yO(d,e)});l.push({scope:by(p[0].instrumentationLibrary),spans:f,schemaUrl:p[0].instrumentationLibrary.schemaUrl})}h=u.next()}var m={resource:gy(a),scopeSpans:l,schemaUrl:void 0};r.push(m),o=i.next()}return r}var IO={serializeRequest:function(t){var e=dO([t],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},TO={serializeRequest:function(t){var e=vO(t,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},EO=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},RO=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},CO=5,ZO=1e3,kO=5e3,VO=1.5,wf=.2;function xO(){return Math.random()*(2*wf)-wf}var NO=(function(){function t(e){this.Jn=e}return t.prototype.retry=function(e,n,r){var i=this;return new Promise(function(o,s){setTimeout(function(){i.Jn.send(e,n).then(o,s)},r)})},t.prototype.send=function(e,n){var r;return EO(this,void 0,void 0,function(){var i,o,s,a,c,l,u;return RO(this,function(h){switch(h.label){case 0:return i=Date.now()+n,[4,this.Jn.send(e,n)];case 1:o=h.sent(),s=CO,a=ZO,h.label=2;case 2:return o.status==="retryable"&&s>0?(s--,c=Math.max(Math.min(a,kO)+xO(),0),a=a*VO,l=(r=o.retryInMillis)!==null&&r!==void 0?r:c,u=i-Date.now(),l>u?[2,o]:[4,this.retry(e,u,l)]):[3,4];case 3:return o=h.sent(),[3,2];case 4:return[2,o]}})})},t.prototype.shutdown=function(){return this.Jn.shutdown()},t})();function Uy(t){return new NO(t.transport)}function OO(t){var e=[429,502,503,504];return e.includes(t)}function GO(t){if(t!=null){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var n=new Date(t).getTime()-Date.now();return n>=0?n:0}}var LO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},XO=(function(){function t(e){this.xs=e}return t.prototype.send=function(e,n){var r=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=n,o.open("POST",r.xs.url);var s=r.xs.headers();Object.entries(s).forEach(function(a){var c=LO(a,2),l=c[0],u=c[1];o.setRequestHeader(l,u)}),o.ontimeout=function(a){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(X.debug("XHR success"),i({status:"success"})):o.status&&OO(o.status)?i({status:"retryable",retryInMillis:GO(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(e)})},t.prototype.shutdown=function(){},t})();function WO(t){return new XO(t)}var UO=(function(){function t(e){this.Ns=e}return t.prototype.send=function(e){var n=this;return new Promise(function(r){navigator.sendBeacon(n.Ns.url,new Blob([e],{type:n.Ns.blobType}))?(X.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t})();function MO(t){return new UO(t)}function PO(t,e){return py(t,e,Uy({transport:WO(t)}))}function FO(t,e){return py(t,e,Uy({transport:MO({url:t.url,blobType:t.headers()["Content-Type"]})}))}var AO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function JO(t){return function(){var e,n={};return Object.entries((e=t==null?void 0:t())!==null&&e!==void 0?e:{}).forEach(function(r){var i=AO(r,2),o=i[0],s=i[1];typeof s<"u"?n[o]=String(s):X.warn('Header "'+o+'" has invalid value ('+s+") and will be ignored")}),n}}var yn=function(){return yn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},yn.apply(this,arguments)};function DO(t,e,n){var r=yn({},n()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,r)}}function YO(t){if(t!=null)try{return new URL(t),t}catch(e){throw new Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}function KO(t,e,n){var r,i,o,s;return yn(yn({},ox(t,e,n)),{headers:DO(JO(t.headers),e.headers,n.headers),url:(i=(r=YO(t.url))!==null&&r!==void 0?r:e.url)!==null&&i!==void 0?i:n.url,agentOptions:(s=(o=t.agentOptions)!==null&&o!==void 0?o:e.agentOptions)!==null&&s!==void 0?s:n.agentOptions})}function _O(t,e){return yn(yn({},sx()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function HO(t,e,n){return KO({url:t.url,timeoutMillis:t.timeoutMillis,headers:ix(t.headers),concurrencyLimit:t.concurrencyLimit},{},_O(n,e))}function My(t,e,n,r){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=HO(t,n,r);return i?PO(o,e):FO(o,e)}var zO=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),BO=(function(t){zO(e,t);function e(n){return n===void 0&&(n={}),t.call(this,My(n,TO,"v1/traces",{"Content-Type":"application/json"}))||this}return e})(hy),Xo;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(Xo||(Xo={}));var jO=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ql=function(){return ae.CUMULATIVE},Py=function(t){switch(t){case K.COUNTER:case K.OBSERVABLE_COUNTER:case K.GAUGE:case K.HISTOGRAM:case K.OBSERVABLE_GAUGE:return ae.DELTA;case K.UP_DOWN_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:return ae.CUMULATIVE}},Fy=function(t){switch(t){case K.COUNTER:case K.HISTOGRAM:return ae.DELTA;case K.GAUGE:case K.UP_DOWN_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:case K.OBSERVABLE_COUNTER:case K.OBSERVABLE_GAUGE:return ae.CUMULATIVE}};function QO(){var t=Yn(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?ql:e==="delta"?Py:e==="lowmemory"?Fy:(X.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),ql)}function $O(t){return t!=null?t===Xo.DELTA?Py:t===Xo.LOWMEMORY?Fy:ql:QO()}function qO(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return xe.Default()}}var tG=(function(t){jO(e,t);function e(n,r){var i=t.call(this,n)||this;return i.co=qO(r),i.uo=$O(r==null?void 0:r.temporalityPreference),i}return e.prototype.selectAggregation=function(n){return this.co(n)},e.prototype.selectAggregationTemporality=function(n){return this.uo(n)},e})(hy),eG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),nG=(function(t){eG(e,t);function e(n){return t.call(this,My(n!=null?n:{},IO,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return e})(tG);function rG(t,e){let n=t.spanContext();return{name:t.name,kind:t.kind,spanContext:()=>n,parentSpanId:t.parentSpanId,startTime:t.startTime,endTime:t.endTime,status:t.status,attributes:Fm(t.attributes,e),links:t.links,events:t.events,duration:t.duration,ended:t.ended,resource:t.resource,instrumentationLibrary:t.instrumentationLibrary,droppedAttributesCount:t.droppedAttributesCount,droppedEventsCount:t.droppedEventsCount,droppedLinksCount:t.droppedLinksCount}}function iG(t,e){if(!e.isSamplingEnabled())return t;let n=[],r={},i={};for(let o of t){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));let s=e.shouldSample(o);s.sample?s.attributes?r[o.spanContext().spanId]=rG(o,s.attributes):r[o.spanContext().spanId]=o:n.push(o.spanContext().spanId)}for(;n.length>0;){let o=n.shift(),s=i[o];if(s)for(let a of s)delete r[a],n.push(a)}return Object.values(r)}var tc=class extends BO{constructor(e,n){super(At(mt({},e),{headers:{}})),this.sampler=n}export(e,n){let r=iG(e,this.sampler);if(r.length===0)return;let i=0,o=s=>{var a;if(s.code===kt.SUCCESS)return n({code:kt.SUCCESS});if(i++,i>fc)return console.error(`[@launchdarkly/observability] failed to export OTeL traces: ${(a=s.error)==null?void 0:a.message}`,s.error),n({code:kt.FAILED,error:s.error});new Promise(c=>setTimeout(c,mc+yc*Math.pow(2,i))).then(()=>{var c;console.warn(`[@launchdarkly/observability] retry ${i}, failed to export OTeL traces: ${(c=s.error)==null?void 0:c.message}`,s.error),super.export(r,o)})};super.export(r,o)}},ec=class extends nG{constructor(e){super(At(mt({},e),{headers:{}}))}export(e,n){let r=0,i=o=>{var s;if(o.code===kt.SUCCESS)return n({code:kt.SUCCESS});if(r++,r>fc)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(s=o.error)==null?void 0:s.message}`,o.error),n({code:kt.FAILED,error:o.error});new Promise(a=>setTimeout(a,mc+yc*Math.pow(2,r))).then(()=>{var a;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),super.export(e,i)})};super.export(e,i)}},oG="OT_ZONE_CONTEXT",sG="Navigation:",aG=["click","input","submit"];function lG(){return!1}var nc=class rn extends jm{constructor(e={}){var n;super(rn.moduleName,rn.version,e),yt(this,"_spansData",new WeakMap),yt(this,"_zonePatched"),yt(this,"_wrappedListeners",new WeakMap),yt(this,"_eventsSpanMap",new WeakMap),yt(this,"_eventNames"),yt(this,"_shouldPreventSpanCreation"),this.qa=new Set((n=e==null?void 0:e.eventNames)!=null?n:aG),this.tl=typeof(e==null?void 0:e.shouldPreventSpanCreation)=="function"?e.shouldPreventSpanCreation:lG}init(){}el(e,n){let r=this.jn.get(n);r&&(e.source==="setTimeout"?r.hrTimeLastTimeout=fn():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}nl(e){return this.qa.has(e)}An(e,n){var r;let i=e==null?void 0:e.target,o=e==null?void 0:e.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this.nl(o))return;let s=ry(i,!0);try{let a=this.tracer.startSpan(o,{attributes:{"event.type":o,"event.tag":i.tagName,"event.xpath":s,"event.id":i.id,"event.text":(r=i.textContent)!=null?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?ut.setSpan(tt.active(),n):void 0);return e instanceof MouseEvent&&(a.setAttribute("event.x",e.clientX),a.setAttribute("event.y",e.clientY),a.setAttribute("event.relativeX",e.clientX/window.innerWidth),a.setAttribute("event.relativeY",e.clientY/window.innerHeight),o==="scroll"&&(a.setAttribute("event.scrollX",window.scrollX),a.setAttribute("event.scrollY",window.scrollY))),this.tl(o,i,a)===!0?void 0:(this.jn.set(a,{taskCount:0}),a)}catch(a){this.v.error("failed to start create new user interaction span",a)}}Io(e){let n=this.jn.get(e);n&&(n.taskCount--,n.taskCount===0&&this.rl(e,n.hrTimeLastTimeout))}Mr(e){let n=e.get(oG);return n&&ut.getSpan(n)}Os(e){let n=this.jn.get(e);n&&n.taskCount++}addPatchedListener(e,n,r,i){let o=this.To.get(r);o||(o=new Map,this.To.set(r,o));let s=o.get(n);return s||(s=new Map,o.set(n,s)),s.has(e)?!1:(s.set(e,i),!0)}removePatchedListener(e,n,r){let i=this.To.get(r);if(!i)return;let o=i.get(n);if(!o)return;let s=o.get(e);return s&&(o.delete(e),o.size===0&&(i.delete(n),i.size===0&&this.To.delete(r))),s}Pr(e,n,r){return typeof e=="function"?e.apply(n,r):e.handleEvent(r[0])}il(){let e=this,n=new Map;return r=>function(i,o,s){if(!o)return r.call(this,i,o,s);let a=s&&typeof s=="object"&&s.once,c=function(...l){var u;let h,p=l[0];if(!(p!=null&&p.type))return e.Pr(o,this,l);if(Date.now()-((u=n.get(p.type))!=null?u:0)<1e3/60)return e.Pr(o,this,l);n.set(p.type,Date.now()),p&&(h=e.ol.get(p)),a&&e.removePatchedListener(this,i,o);let f=e.An(p,h);return f?(p&&e.ol.set(p,f),tt.with(ut.setSpan(tt.active(),f),()=>{let m=e.Pr(o,this,l);return f.end(),m})):e.Pr(o,this,l)};if(e.addPatchedListener(this,i,o,c))return r.call(this,i,c,s)}}sl(){let e=this;return n=>function(r,i,o){let s=e.removePatchedListener(this,r,i);return s?n.call(this,r,s,o):n.call(this,r,i,o)}}Gs(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}al(){this.Ls(),this.ae(history,"replaceState",this.br()),this.ae(history,"pushState",this.br()),this.ae(history,"back",this.br()),this.ae(history,"forward",this.br()),this.ae(history,"go",this.br())}br(){let e=this;return n=>function(...r){let i=`${location.pathname}${location.hash}${location.search}`,o=n.apply(this,r),s=`${location.pathname}${location.hash}${location.search}`;return i!==s&&e.ll(s),o}}Ls(){Gt(history.replaceState)&&this.P(history,"replaceState"),Gt(history.pushState)&&this.P(history,"pushState"),Gt(history.back)&&this.P(history,"back"),Gt(history.forward)&&this.P(history,"forward"),Gt(history.go)&&this.P(history,"go")}ll(e){let n=ut.getSpan(tt.active());n&&typeof n.updateName=="function"&&n.updateName(`${sG} ${e}`)}cl(){let e=this;return n=>function(r){let i=Zone.current,o=e.Mr(i);return o&&e.Eo(r,i)&&e.Io(o),n.call(this,r)}}ul(){let e=this;return n=>function(r){let i=Zone.current,o=e.Mr(i);return o&&e.Eo(r,i)&&(e.Os(o),e.el(r,o)),n.call(this,r)}}hl(){let e=this;return n=>function(r,i,o){let s=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,a=s==null?void 0:s.target,c,l=this;if(a){if(c=e.An(s),c)return e.Os(c),l.run(()=>{try{return tt.with(ut.setSpan(tt.active(),c),()=>{let u=Zone.current;return r.Xs=u,n.call(u,r,i,o)})}finally{e.Io(c)}})}else c=e.Mr(l);try{return n.call(l,r,i,o)}finally{c&&e.Eo(r,l)&&e.Io(c)}}}Eo(e,n){if(e.Xs&&(n=e.Xs),!n||!e.data||e.data.isPeriodic)return!1;let r=this.Mr(n);return!r||!this.jn.get(r)?!1:e.type==="macroTask"||e.type==="microTask"}rl(e,n){e&&this.jn.get(e)&&(e.end(n),this.jn.delete(e))}enable(){let e=this.Ws();this.v.debug("applying patch to",rn.moduleName,rn.version,"zone:",!!e),e?(Gt(e.prototype.runTask)&&(this.P(e.prototype,"runTask"),this.v.debug("removing previous patch from method runTask")),Gt(e.prototype.scheduleTask)&&(this.P(e.prototype,"scheduleTask"),this.v.debug("removing previous patch from method scheduleTask")),Gt(e.prototype.cancelTask)&&(this.P(e.prototype,"cancelTask"),this.v.debug("removing previous patch from method cancelTask")),this.Us=!0,this.ae(e.prototype,"runTask",this.hl()),this.ae(e.prototype,"scheduleTask",this.ul()),this.ae(e.prototype,"cancelTask",this.cl())):(this.Us=!1,this.Gs().forEach(n=>{Gt(n.addEventListener)&&(this.P(n,"addEventListener"),this.v.debug("removing previous patch from method addEventListener")),Gt(n.removeEventListener)&&(this.P(n,"removeEventListener"),this.v.debug("removing previous patch from method removeEventListener")),this.ae(n,"addEventListener",this.il()),this.ae(n,"removeEventListener",this.sl())})),this.al()}disable(){let e=this.Ws();this.v.debug("removing patch from",rn.moduleName,rn.version,"zone:",!!e),e&&this.Us?(Gt(e.prototype.runTask)&&this.P(e.prototype,"runTask"),Gt(e.prototype.scheduleTask)&&this.P(e.prototype,"scheduleTask"),Gt(e.prototype.cancelTask)&&this.P(e.prototype,"cancelTask")):this.Gs().forEach(n=>{Gt(n.addEventListener)&&this.P(n,"addEventListener"),Gt(n.removeEventListener)&&this.P(n,"removeEventListener")}),this.Ls()}Ws(){return window.Zone}};yt(nc,"version","0.1.0"),yt(nc,"moduleName","user-interaction");var cG=nc,on={},Pe,Wo="highlight.record",uG="highlight.session_id",hG="launchdarkly.js.log",pG=(t,e)=>{var n,r,i,o,s,a,c,l,u;if(on.tracerProvider!==void 0){console.warn("OTEL already initialized. Skipping...");return}Pe=t;let h=t.backendUrl||void 0||"https://pub.highlight.io",p=[...(r=(n=t.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...KV],f=(i=t.environment)!=null?i:"production",m={url:t.otlpEndpoint+"/v1/traces",concurrencyLimit:100,timeoutMillis:5e3,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:5e3,keepAlive:!0}},d=new tc(m,e),b=new rc(d,{maxExportBatchSize:100,maxQueueSize:1e3,exportTimeoutMillis:m.timeoutMillis,scheduledDelayMillis:m.timeoutMillis}),v=new Ar({[d1]:(o=t.serviceName)!=null?o:"highlight-browser",[p1]:f,"highlight.project_id":t.projectId});on.tracerProvider=new Bk({resource:v,spanProcessors:[b]}),ut.setGlobalTracerProvider(on.tracerProvider);let I=new ec(At(mt({},m),{url:t.otlpEndpoint+"/v1/metrics"})),R=new vN({exporter:I,exportIntervalMillis:m.timeoutMillis,exportTimeoutMillis:m.timeoutMillis});on.meterProvider=new oO({resource:v,readers:[R]}),Ce.setGlobalMeterProvider(on.meterProvider);let E=[];((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&E.push(new I1({applyCustomAttributesOnSpan:{documentLoad:Rf,documentFetch:Rf,resourceFetch:fG}})),((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-user-interaction"])!==!1&&E.push(new cG({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled&&(((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1&&E.push(new lV({propagateTraceHeaderCorsUrls:Cf(t.tracingOrigins),applyCustomAttributesOnSpan:(V,N,U)=>Yo(void 0,null,function*(){var C,x,M;if(!V.attributes)return;let ot=V;if(ot.attributes[Wo]===!1)return;let lt=ot.attributes["http.url"],y=(C=N.method)!=null?C:"GET";if(V.updateName(Tf(lt,y,N.body)),!(U instanceof Response)){V.setAttributes({"http.response.error":U.message,"http.response.status":U.status});return}Ef(V,N.body,N.headers,t.networkRecordingOptions);let g=yield ex(U,(x=t.networkRecordingOptions)==null?void 0:x.bodyKeysToRecord,(M=t.networkRecordingOptions)==null?void 0:M.networkBodyKeysToRedact);V.setAttribute("http.response.body",g)})})),((u=t.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-xml-http-request"])!==!1&&E.push(new JV({propagateTraceHeaderCorsUrls:Cf(t.tracingOrigins),applyCustomAttributesOnSpan:(V,N)=>{var U,C;let x=N;if(!V.attributes||V.attributes[Wo]===!1)return;let M=Tf(x.Cl,x.Zl,N.responseText);V.updateName(M),Ef(V,x.pl,x.dl,t.networkRecordingOptions);let ot=uy(x.pl,(U=t.networkRecordingOptions)==null?void 0:U.networkBodyKeysToRedact,(C=t.networkRecordingOptions)==null?void 0:C.bodyKeysToRecord,x.dl);V.setAttribute("http.request.body",ot)}}))),hk({instrumentations:E});let T=new ty;T.enable(),on.tracerProvider.register({contextManager:T,propagator:new Lm({propagators:[new Zm,new ic({backendUrl:h,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:p})]})})},rc=class extends qm{onStart(e,n){e.setAttribute(uG,Fe()),super.onStart(e,n)}onEnd(e){e.attributes[Wo]!==!1&&super.onEnd(e)}},ic=class extends Xm{constructor(e){super(),yt(this,"highlightEndpoints"),yt(this,"tracingOrigins"),yt(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,n,r){var i;let o=ut.getSpan(e);if(!o||!o.attributes)return;let s=o.attributes["http.url"];typeof s=="string"&&(dG(s,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Wo,!1),!qV(s,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,n,r)}},Ay="highlight-browser",ao=Ay,If=()=>{var t;return(t=on.tracerProvider)==null?void 0:t.getTracer(Ay)},Tf=(t,e,n)=>{var r,i,o;let s,a=new URL(t),c=a.pathname,l=`${e.toUpperCase()} - ${c}`;try{if(s=typeof n=="string"?JSON.parse(n):n,s&&s.query){let u=cc(s.query),h=((r=u.definitions[0])==null?void 0:r.kind)==="OperationDefinition"?(o=(i=u.definitions[0])==null?void 0:i.name)==null?void 0:o.value:void 0;h&&(l=`${h} (GraphQL: ${a.host+a.pathname})`)}}catch(u){}return l},Ef=(t,e,n,r)=>{var i;let o=typeof e=="string"?e:String(e);if(!t.attributes)return;let s=t.attributes["http.url"],a=new URL(s),c;try{c=e?JSON.parse(o):void 0,c.operationName&&t.setAttribute("graphql.operation.name",c.operationName)}catch(u){}let l=DV((i=r==null?void 0:r.networkHeadersToRedact)!=null?i:[],n,r==null?void 0:r.headerKeysToRecord);t.setAttributes({"highlight.type":"http.request","http.request.headers":JSON.stringify(l),"http.request.body":o,[y1]:s,[g1]:a.pathname,[b1]:a.search}),a.searchParams.size>0&&t.setAttributes({"url.query_params":JSON.stringify(Object.fromEntries(a.searchParams))})},dG=(t,e,n,r)=>r!=null&&r.some(i=>t.toLowerCase().includes(i))?!1:$V(t,e),Rf=t=>{var e,n,r;if(!t.events)return;let i=t.events,o={unload:Bt("unloadEventStart","unloadEventEnd",i),dom_interactive:Bt("fetchStart","domInteractive",i),dom_content_loaded:Bt("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:Bt("fetchStart","domComplete",i),load_event:Bt("loadEventStart","loadEventEnd",i),document_load:Bt("fetchStart","loadEventEnd",i),first_paint:Bt("fetchStart","firstPaint",i),first_contentful_paint:Bt("fetchStart","firstContentfulPaint",i),domain_lookup:Bt("domainLookupStart","domainLookupEnd",i),connect:Bt("connectStart","connectEnd",i),request:Bt("requestStart","requestEnd",i),response:Bt("responseStart","responseEnd",i)},s=(n=(e=Pe==null?void 0:Pe.getIntegrations)==null?void 0:e.call(Pe))!=null?n:[];if(o.document_load!==void 0)for(let a of s)a.recordGauge((r=Pe==null?void 0:Pe.sessionSecureId)!=null?r:"",{name:dm,value:o.document_load/1e6});Object.entries(o).forEach(([a,c])=>{c!==void 0&&(t.setAttribute(`timings.${a}.ns`,c),t.setAttribute(`timings.${a}.readable`,Jy(c)))})};function Bt(t,e,n){let r=n.find(s=>s.name===t),i=n.find(s=>s.name===e);if(!r||!i)return;let o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}var fG=(t,e)=>{let n={domain_lookup:(e.domainLookupEnd-e.domainLookupStart)*1e9,connect:(e.connectEnd-e.connectStart)*1e9,request:(e.responseEnd-e.requestStart)*1e9,response:(e.responseEnd-e.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{t.setAttribute(`timings.${r}.ns`,i),t.setAttribute(`timings.${r}.readable`,Jy(i))})},Jy=t=>{if(t>=36e11){let e=t/36e11;return`${Number(e.toFixed(1))}h`}else if(t>=6e10){let e=t/6e10;return`${Number(e.toFixed(1))}m`}else if(t>=1e9){let e=t/1e9;return`${Number(e.toFixed(1))}s`}else if(t>=1e6){let e=t/1e6;return`${Number(e.toFixed(1))}ms`}else if(t>=1e3){let e=t/1e3;return`${Number(e.toFixed(1))}\xB5s`}else return`${Number(t.toFixed(1))}ns`},Cf=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,mG=30,yG=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(n=>t(n-e)))),gG=()=>Yo(void 0,null,function*(){let t=[];for(let e=0;e<mG;e++)t.push(yield yG());return t.reduce((e,n)=>e+n,0)/t.length}),bG=(t,e)=>{let n={},r=16.666666666666668;gG().then(c=>r=c);let i=c=>{var l;n!=null&&n.event||(n={event:c,location:window.location.href,timerStart:(l=window.performance)==null?void 0:l.now()},window.requestAnimationFrame(o))},o=()=>{if(!(n!=null&&n.timerStart))return;let c=window.performance.now()-n.timerStart-r;s(c),n={}},s=c=>{let l=(new Date().getTime()-e)/1e3;t({relativeTimestamp:l,jankAmount:c,querySelector:a(),newLocation:window.location.href!=n.location?window.location.href:void 0})},a=()=>{var c;return(c=n==null?void 0:n.event)!=null&&c.target?nR(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},vG=typeof window<"u",Zf=vG&&"performance"in window&&"memory"in performance?performance:{memory:{}},SG=(t,e)=>{let n=0,r=0,i=()=>{let l=(new Date().getTime()-e)/1e3,u=Zf.memory.jsHeapSizeLimit||0,h=Zf.memory.usedJSHeapSize||0;t({jsHeapSizeLimit:u,usedJSHeapSize:h,relativeTimestamp:l,fps:n})};i();let o;o=setInterval(()=>{i()},1e3);let s=0,a=Date.now(),c=function(){var l=Date.now();s++,l>1e3+a&&(n=Math.round(s*1e3/(l-a)),s=0,a=l),r=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(r)}},Je,Xr,Dy,Uo,oc,Yy=-1,wn=function(t){addEventListener("pageshow",function(e){e.persisted&&(Yy=e.timeStamp,t(e))},!0)},kc=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Qo=function(){var t=kc();return t&&t.activationStart||0},ee=function(t,e){var n=kc(),r="navigate";return Yy>=0?r="back-forward-cache":n&&(document.prerendering||Qo()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},zn=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(i){}},ne=function(t,e,n,r){var i,o;return function(s){e.value>=0&&(s||r)&&((o=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=o,e.rating=(function(a,c){return a>c[1]?"poor":a>c[0]?"needs-improvement":"good"})(e.value,n),t(e))}},Vc=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},$o=function(t){var e=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||t(n)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},xc=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},Fn=-1,kf=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Mo=function(t){document.visibilityState==="hidden"&&Fn>-1&&(Fn=t.type==="visibilitychange"?t.timeStamp:0,wG())},Vf=function(){addEventListener("visibilitychange",Mo,!0),addEventListener("prerenderingchange",Mo,!0)},wG=function(){removeEventListener("visibilitychange",Mo,!0),removeEventListener("prerenderingchange",Mo,!0)},Nc=function(){return Fn<0&&(Fn=kf(),Vf(),wn(function(){setTimeout(function(){Fn=kf(),Vf()},0)})),{get firstHiddenTime(){return Fn}}},zr=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},xf=[1800,3e3],Ky=function(t,e){e=e||{},zr(function(){var n,r=Nc(),i=ee("FCP"),o=zn("paint",function(s){s.forEach(function(a){a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<r.firstHiddenTime&&(i.value=Math.max(a.startTime-Qo(),0),i.entries.push(a),n(!0)))})});o&&(n=ne(t,i,xf,e.reportAllChanges),wn(function(s){i=ee("FCP"),n=ne(t,i,xf,e.reportAllChanges),Vc(function(){i.value=performance.now()-s.timeStamp,n(!0)})}))})},Nf=[.1,.25],IG=function(t,e){e=e||{},Ky(xc(function(){var n,r=ee("CLS",0),i=0,o=[],s=function(c){c.forEach(function(l){if(!l.hadRecentInput){var u=o[0],h=o[o.length-1];i&&l.startTime-h.startTime<1e3&&l.startTime-u.startTime<5e3?(i+=l.value,o.push(l)):(i=l.value,o=[l])}}),i>r.value&&(r.value=i,r.entries=o,n())},a=zn("layout-shift",s);a&&(n=ne(t,r,Nf,e.reportAllChanges),$o(function(){s(a.takeRecords()),n(!0)}),wn(function(){i=0,r=ee("CLS",0),n=ne(t,r,Nf,e.reportAllChanges),Vc(function(){return n()})}),setTimeout(n,0))}))},Vr={passive:!0,capture:!0},TG=new Date,Of=function(t,e){Je||(Je=e,Xr=t,Dy=new Date,Hy(removeEventListener),_y())},_y=function(){if(Xr>=0&&Xr<Dy-TG){var t={entryType:"first-input",name:Je.type,target:Je.target,cancelable:Je.cancelable,startTime:Je.timeStamp,processingStart:Je.timeStamp+Xr};Uo.forEach(function(e){e(t)}),Uo=[]}},EG=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?(function(n,r){var i=function(){Of(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,Vr),removeEventListener("pointercancel",o,Vr)};addEventListener("pointerup",i,Vr),addEventListener("pointercancel",o,Vr)})(e,t):Of(e,t)}},Hy=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,EG,Vr)})},Gf=[100,300],RG=function(t,e){e=e||{},zr(function(){var n,r=Nc(),i=ee("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),n(!0))},s=function(c){c.forEach(o)},a=zn("first-input",s);n=ne(t,i,Gf,e.reportAllChanges),a&&$o(xc(function(){s(a.takeRecords()),a.disconnect()})),a&&wn(function(){var c;i=ee("FID"),n=ne(t,i,Gf,e.reportAllChanges),Uo=[],Xr=-1,Je=null,Hy(addEventListener),c=o,Uo.push(c),_y()})})},zy=0,El=1/0,lo=0,CG=function(t){t.forEach(function(e){e.interactionId&&(El=Math.min(El,e.interactionId),lo=Math.max(lo,e.interactionId),zy=lo?(lo-El)/7+1:0)})},By=function(){return oc?zy:performance.interactionCount||0},ZG=function(){"interactionCount"in performance||oc||(oc=zn("event",CG,{type:"event",buffered:!0,durationThreshold:0}))},Lf=[200,500],jy=0,Xf=function(){return By()-jy},ge=[],Rl={},Wf=function(t){var e=ge[ge.length-1],n=Rl[t.interactionId];if(n||ge.length<10||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};Rl[r.id]=r,ge.push(r)}ge.sort(function(i,o){return o.latency-i.latency}),ge.splice(10).forEach(function(i){delete Rl[i.id]})}},kG=function(t,e){e=e||{},zr(function(){var n;ZG();var r,i=ee("INP"),o=function(a){a.forEach(function(u){u.interactionId&&Wf(u),u.entryType==="first-input"&&!ge.some(function(h){return h.entries.some(function(p){return u.duration===p.duration&&u.startTime===p.startTime})})&&Wf(u)});var c,l=(c=Math.min(ge.length-1,Math.floor(Xf()/50)),ge[c]);l&&l.latency!==i.value&&(i.value=l.latency,i.entries=l.entries,r())},s=zn("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=ne(t,i,Lf,e.reportAllChanges),s&&("interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),$o(function(){o(s.takeRecords()),i.value<0&&Xf()>0&&(i.value=0,i.entries=[]),r(!0)}),wn(function(){ge=[],jy=By(),i=ee("INP"),r=ne(t,i,Lf,e.reportAllChanges)}))})},Uf=[2500,4e3],Cl={},VG=function(t,e){e=e||{},zr(function(){var n,r=Nc(),i=ee("LCP"),o=function(c){var l=c[c.length-1];l&&l.startTime<r.firstHiddenTime&&(i.value=Math.max(l.startTime-Qo(),0),i.entries=[l],n())},s=zn("largest-contentful-paint",o);if(s){n=ne(t,i,Uf,e.reportAllChanges);var a=xc(function(){Cl[i.id]||(o(s.takeRecords()),s.disconnect(),Cl[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(a,0)},!0)}),$o(a),wn(function(c){i=ee("LCP"),n=ne(t,i,Uf,e.reportAllChanges),Vc(function(){i.value=performance.now()-c.timeStamp,Cl[i.id]=!0,n(!0)})})}})},Mf=[800,1800],xG=function t(e){document.prerendering?zr(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},NG=function(t,e){e=e||{};var n=ee("TTFB"),r=ne(t,n,Mf,e.reportAllChanges);xG(function(){var i=kc();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-Qo(),0),n.entries=[i],r(!0),wn(function(){n=ee("TTFB",0),(r=ne(t,n,Mf,e.reportAllChanges))(!0)})}})},OG=t=>(IG(t),Ky(t),RG(t),VG(t),NG(t),kG(t),()=>{}),Mn=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},GG=(t,e)=>{let n=()=>{let i=(new Date().getTime()-e)/1e3;t({relativeTimestamp:i,downlink:Mn.downlink,downlinkMax:Mn.downlinkMax,effectiveType:Mn.effectiveType,rtt:Mn.rtt,saveData:Mn.saveData,type:Mn.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},LG=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};let t=window.performance;return{getDeviceDetails:()=>({deviceMemory:XG(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{let e=Zl(t.memory.jsHeapSizeLimit),n=Zl(t.memory.totalJSHeapSize),r=Zl(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}},Zl=t=>t/Math.pow(1e3,2),XG=t=>1024*t,WG="launchdarkly.js.log",UG="log.severity",MG="log.message",Pf="launchdarkly.sampling.ratio";function PG(t){return"regexValue"in t}function FG(t){return"matchValue"in t}function AG(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}var sc=class{constructor(e=AG){yt(this,"regexCache",new Map),yt(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,n,r,i;return!!((n=(e=this.config)==null?void 0:e.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(e){var n,r;return e.name===WG?this.sampleLog((n=this.config)==null?void 0:n.logs,e):this.sampleSpan((r=this.config)==null?void 0:r.spans,e)}matchesValue(e,n){if(!e)return!1;if(FG(e))return e.matchValue===n;if(PG(e)){let r=e.regexValue;if(r===null)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));let i=this.regexCache.get(r);if(typeof n=="string")return i.test(n)}return!1}matchesAttributes(e,n){if(e)for(let r of e){let i=!1;for(let o of Object.keys(n))if(this.matchesValue(r.key,o)){let s=n[o];if(this.matchesValue(r.attribute,s)){i=!0;break}}if(!i)return!1}return!0}matchEvent(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||e.attributes&&(!n.attributes||!this.matchesAttributes(e.attributes,n.attributes)))}matchesEvents(e,n){if(e)for(let r of e){let i=!1;for(let o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||!this.matchesAttributes(e.attributes,n.attributes)||!this.matchesEvents(e.events,n.events))}matchesLogConfig(e,n){if(e.severityText){let r=n[UG];if(typeof r=="string"&&!this.matchesValue(e.severityText,r))return!1}if(e.message){let r=n[MG];if(typeof r=="string"&&!this.matchesValue(e.message,r))return!1}return!!this.matchesAttributes(e.attributes,n)}sampleSpan(e,n){if(e){for(let r of e)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[Pf]:r.samplingRatio}}}return{sample:!0}}sampleLog(e,n){if(e){for(let r of e)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[Pf]:r.samplingRatio}}}return{sample:!0}}},Ff=()=>{let t={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(e,n)=>t,setAttributes:e=>t,addEvent:(e,n,r)=>t,addLinks:e=>t,setStatus:e=>t,recordException:()=>{},addLink:()=>t,updateName:()=>t,isRecording:()=>!1};return t},ac=class{constructor(e){yt(this,"organizationID"),yt(this,"_integrations",[]),yt(this,"_gauges",new Map),yt(this,"_counters",new Map),yt(this,"_histograms",new Map),yt(this,"_up_down_counters",new Map),yt(this,"sampler",new sc),yt(this,"graphqlSDK"),typeof e.projectId=="string"?this.organizationID=e.projectId:this.organizationID=e.projectId.toString(),pG(At(mt({},e),{getIntegrations:()=>this.Gn}),this.sampler);let n=new rE(`${e.backendUrl}`,{headers:{}});this.graphqlSDK=RE(n,PE()),this.configureSampling(),this.setupListeners(e)}configureSampling(){return Yo(this,null,function*(){try{let e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){ke("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}recordLog(e,n,r){this.startSpan(hG,i=>{let o=typeof e=="string"?e:sn(e);i==null||i.addEvent("log",mt({"log.severity":n,"log.message":o},r)),n==="error"&&(i==null||i.recordException(new Error(o)),i==null||i.setStatus({code:Vo.ERROR,message:o}))})}recordError(e,n,r,i,o){var s,a,c,l;e.cause&&(r=At(mt({},r),{"exception.cause":JSON.stringify(e.cause)}));let u=n?n+":"+e.message:e.message;o==="React.ErrorBoundary"&&(u="ErrorBoundary: "+u);let h=Ko(e),p={error:e,event:u,type:o!=null?o:"custom",url:window.location.href,source:i!=null?i:"",lineNumber:(s=h[0])!=null&&s.lineNumber?(a=h[0])==null?void 0:a.lineNumber:0,columnNumber:(c=h[0])!=null&&c.columnNumber?(l=h[0])==null?void 0:l.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString()};this.startSpan("highlight.exception",f=>{f==null||f.recordException(e),f==null||f.setAttributes(mt({event:p.event,type:p.type,url:p.url,source:p.source,lineNumber:p.lineNumber,columnNumber:p.columnNumber},r))});for(let f of this.Gn)f.error(Fe(),p)}recordCount(e){let n=Ce.getMeter(ao),r=this.fl.get(e.name);r||(r=n.createCounter(e.name),this.fl.set(e.name,r)),r.add(e.value,At(mt({},e.attributes),{"highlight.session_id":Fe()}))}recordGauge(e){var n,r,i;let o=Ce.getMeter(ao),s=this.ml.get(e.name);s||(s=o.createGauge(e.name),this.ml.set(e.name,s)),s.record(e.value,At(mt({},e.attributes),{"highlight.session_id":Fe()}));let a={name:e.name,value:e.value,category:(n=e.attributes)==null?void 0:n.category,group:(i=(r=e.attributes)==null?void 0:r.group)==null?void 0:i.toString(),tags:e.attributes?Object.entries(e.attributes).map(([c,l])=>{var u;return{name:c!=null?c:"",value:(u=l==null?void 0:l.toString())!=null?u:""}}):[]};for(let c of this.Gn)c.recordGauge(Fe(),a)}recordIncr(e){this.recordCount(At(mt({},e),{value:1}))}recordHistogram(e){let n=Ce.getMeter(ao),r=this.yl.get(e.name);r||(r=n.createHistogram(e.name),this.yl.set(e.name,r)),r.record(e.value,At(mt({},e.attributes),{"highlight.session_id":Fe()}))}recordUpDownCounter(e){let n=Ce.getMeter(ao),r=this.gl.get(e.name);r||(r=n.createUpDownCounter(e.name),this.gl.set(e.name,r)),r.add(e.value,At(mt({},e.attributes),{"highlight.session_id":Fe()}))}startSpan(e,n,r,i){let o=If();if(!o){let a=Ff();return i===void 0&&r===void 0?n(a):i===void 0?r(a):i(a)}let s=(a,c)=>{let l=c(a);return l instanceof Promise?l.finally(()=>a.end()):(a.end(),l)};return i===void 0&&r===void 0?o.startActiveSpan(e,a=>s(a,n)):i===void 0?o.startActiveSpan(e,n,a=>s(a,r)):o.startActiveSpan(e,n,r,a=>s(a,i))}startManualSpan(e,n,r,i){let o=If();if(!o){let s=Ff();return i===void 0&&r===void 0?n(s):i===void 0?r(s):i(s)}return i===void 0&&r===void 0?o.startActiveSpan(e,n):i===void 0?o.startActiveSpan(e,n,r):o.startActiveSpan(e,n,r,i)}register(e,n){this.Gn.push(new eR(e,n))}getHooks(e){return this.Gn.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}submitViewportMetrics({height:e,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:nn.ViewportHeight,value:e,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:nn.ViewportWidth,value:n,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:nn.ScreenHeight,value:r,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:nn.ScreenWidth,value:i,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:nn.ViewportArea,value:e*n,attributes:{category:jt.Device,group:window.location.href}})}setupListeners(e){var n;e.disableConsoleRecording||fR(i=>{var o,s,a,c,l;let u=At(mt({},i.attributes?{attributes:i.attributes}:{}),{type:i.type});if(e.reportConsoleErrors&&(i.type==="Error"||i.type==="error")&&i.value&&i.trace){let h=sn(i.value);if(Sd.includes(h)||wd.some(f=>h.includes(f)))return;let p=new Error(h);p.stack=sn(i.trace.map(f=>f.toString())),u.url=window.location.href,u.source=(o=i.trace[0])==null?void 0:o.fileName,u.lineNumber=(a=(s=i.trace[0])==null?void 0:s.lineNumber)==null?void 0:a.toString(),u.columnNumber=(l=(c=i.trace[0])==null?void 0:c.columnNumber)==null?void 0:l.toString(),this.recordError(p,void 0,u,u.source,"console.error")}this.recordLog(sn(i.value),"error",{})},{level:(n=e.consoleMethodsToRecord)!=null?n:[],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),e.enablePerformanceRecording!==!1&&(SG(i=>{Object.entries(i).filter(([o])=>o!=="relativeTimestamp").forEach(([o,s])=>s&&this.recordGauge({name:o,value:s,attributes:{category:jt.Performance,group:window.location.href}}))},0),bG(i=>{this.recordGauge({name:"Jank",value:i.jankAmount,attributes:{category:jt.WebVital,group:i.querySelector}})},0)),yR(i=>{var o;if(Sd.includes(i.event)||wd.some(c=>i.event.includes(c)))return;let s=new Error(i.event);s.stack=sn(i.stackTrace.map(c=>c.toString()));let a={};try{i.payload&&(a=JSON.parse(i.payload))}catch(c){}this.recordError((o=i.error)!=null?o:s,i.event,At(mt({},a),{lineNumber:i.lineNumber.toString(),columnNumber:i.columnNumber.toString(),source:i.source,url:i.url}),i.source,i.type)},{enablePromisePatch:!!e.enablePromisePatch}),OG(i=>{let{name:o,value:s}=i;this.recordGauge({name:o,value:s,attributes:{group:window.location.href,category:jt.WebVital}})}),rR(i=>{this.submitViewportMetrics(i)}),GG(i=>{let o={category:jt.Performance,group:window.location.href};i.saveData!==void 0&&(o.saveData=i.saveData.toString()),i.effectiveType!==void 0&&(o.effectiveType=i.effectiveType.toString()),i.type!==void 0&&(o.type=i.type.toString()),Object.entries(i).filter(([s])=>s!=="relativeTimestamp").forEach(([s,a])=>a&&typeof a=="number"&&this.recordGauge({name:s,value:a,attributes:o}))},new Date().getTime());let{getDeviceDetails:r}=LG();r&&this.recordGauge({name:nn.DeviceMemory,value:r().deviceMemory,attributes:{category:jt.Device,group:window.location.href}})}},Po=class extends oR{constructor(e,n){var r=(...h)=>(super(...h),yt(this,"observe"),this),i,o,s,a,c,l,u;try{if(r(n),typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!e){console.warn("@launchdarkly/observability is not initializing because projectID was passed undefined.");return}let h={backendUrl:(i=n==null?void 0:n.backendUrl)!=null?i:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(s=(o=n==null?void 0:n.otel)==null?void 0:o.otlpEndpoint)!=null?s:"https://otel.observability.app.launchdarkly.com",projectId:e,sessionSecureId:this.sessionSecureID,environment:(a=n==null?void 0:n.environment)!=null?a:"production",networkRecordingOptions:typeof(n==null?void 0:n.networkRecording)=="object"?n.networkRecording:void 0,tracingOrigins:n==null?void 0:n.tracingOrigins,serviceName:(c=n==null?void 0:n.serviceName)!=null?c:"browser",instrumentations:(l=n==null?void 0:n.otel)==null?void 0:l.instrumentations,eventNames:(u=n==null?void 0:n.otel)==null?void 0:u.eventNames};this.observe=new ac(h),De.load(this.observe)}catch(h){ke("Error initializing @launchdarkly/observability SDK","error",h)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(e,n){var r;(r=this.observe)==null||r.register(e,n)}getHooks(e){var n,r;let i=mt(mt({[f1]:e.sdk.name,[m1]:e.sdk.version,[AE]:e.clientSideId,[_E]:"LaunchDarkly"},(n=e.application)!=null&&n.id?{[zE]:e.application.id}:{}),(r=e.application)!=null&&r.version?{[BE]:e.application.version}:{});return[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(o,s,a)=>{var c,l,u,h,p;for(let f of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=f.afterIdentify)==null||h.call(f,o,s,a);return(p=this.observe)==null||p.recordLog("LD.identify","info",At(mt({},i),{key:fd(o.context),context:JSON.stringify(md(o.context)),timeout:o.timeout,[qE]:a.status})),s},afterEvaluation:(o,s,a)=>{var c,l,u,h,p;for(let d of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=d.afterEvaluation)==null||h.call(d,o,s,a);let f=mt({[JE]:o.flagKey,[KE]:JSON.stringify(a.value)},a.variationIndex?{[HE]:a.variationIndex}:{});if(a.reason)for(let d in pd){let b=d,v=a.reason[b];v&&(f[pd[b]]=v)}o.context&&(f[DE]=JSON.stringify(md(o.context)),f[YE]=fd(o.context));let m=mt(mt({},i),f);return(p=this.observe)==null||p.startSpan(FE,d=>{d&&d.addEvent(Lt,m)}),s},afterTrack:o=>{var s,a,c,l,u;for(let h of(c=(a=(s=this.observe)==null?void 0:s.getHooks)==null?void 0:a.call(s,e))!=null?c:[])(l=h.afterTrack)==null||l.call(h,o);(u=this.observe)==null||u.recordLog("LD.track","info",mt(At(mt({},i),{key:o.key,value:o.metricValue}),typeof o.data=="object"?o.data:{}))}}]}};Oc();function _F(t,e,n){var i,o;let r=Jh(Ah({},n),{plugins:[...(n==null?void 0:n.plugins)||[],new Po((i=n==null?void 0:n.tmpProjectId)!=null?i:"1",n==null?void 0:n.observability),new Ci((o=n==null?void 0:n.tmpProjectId)!=null?o:"1",n==null?void 0:n.sessionReplay)]});return rd(t,e,r)}0&&(module.exports={LDObserve,LDRecord,basicLogger,createClient});
|
|
642
|
+
`,pf(l,e),`To resolve the conflict:
|
|
643
|
+
`,df(l,e))}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o},t})(),AN=(function(){function t(e){this.za=e}return t.prototype.record=function(e,n,r,i){this.za.forEach(function(o){o.record(e,n,r,i)})},t})(),JN=(function(){function t(e,n){this.Rs=e,this.Ba=n,this.Bn=new hn}return t.prototype.observe=function(e,n){if(n===void 0&&(n={}),typeof e!="number"){X.warn("non-number value provided to metric "+this.Rs+": "+e);return}this.Ba===Ye.INT&&!Number.isInteger(e)&&(X.warn("INT value type cannot accept a floating-point value for "+this.Rs+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this.Bn.set(n,e)},t})(),DN=(function(){function t(){this.Bn=new Map}return t.prototype.observe=function(e,n,r){if(r===void 0&&(r={}),!!$l(e)){var i=this.Bn.get(e);if(i==null&&(i=new hn,this.Bn.set(e,i)),typeof n!="number"){X.warn("non-number value provided to metric "+e.rn.name+": "+n);return}e.rn.valueType===Ye.INT&&!Number.isInteger(n)&&(X.warn("INT value type cannot accept a floating-point value for "+e.rn.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},t})(),Il=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},Tl=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},ff=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},mf=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},YN=(function(){function t(){this.Wr=[],this.Ur=[]}return t.prototype.addCallback=function(e,n){var r=this.Cs(e,n);r>=0||this.Wr.push({callback:e,instrument:n})},t.prototype.removeCallback=function(e,n){var r=this.Cs(e,n);r<0||this.Wr.splice(r,1)},t.prototype.addBatchCallback=function(e,n){var r=new Set(n.filter($l));if(r.size===0){X.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this.Zs(e,r);i>=0||this.Ur.push({callback:e,instruments:r})},t.prototype.removeBatchCallback=function(e,n){var r=new Set(n.filter($l)),i=this.Zs(e,r);i<0||this.Ur.splice(i,1)},t.prototype.observe=function(e,n){return Il(this,void 0,void 0,function(){var r,i,o,s;return Tl(this,function(a){switch(a.label){case 0:return r=this.ja(e,n),i=this.Qa(e,n),[4,kx(mf(mf([],ff(r),!1),ff(i),!1))];case 1:return o=a.sent(),s=o.filter(Vx).map(function(c){return c.reason}),[2,s]}})})},t.prototype.ja=function(e,n){var r=this;return this.Wr.map(function(i){var o=i.callback,s=i.instrument;return Il(r,void 0,void 0,function(){var a,c;return Tl(this,function(l){switch(l.label){case 0:return a=new JN(s.rn.name,s.rn.valueType),c=Promise.resolve(o(a)),n!=null&&(c=Jr(c,n)),[4,c];case 1:return l.sent(),s.ws.forEach(function(u){u.record(a.Bn,e)}),[2]}})})})},t.prototype.Qa=function(e,n){var r=this;return this.Ur.map(function(i){var o=i.callback,s=i.instruments;return Il(r,void 0,void 0,function(){var a,c;return Tl(this,function(l){switch(l.label){case 0:return a=new DN,c=Promise.resolve(o(a)),n!=null&&(c=Jr(c,n)),[4,c];case 1:return l.sent(),s.forEach(function(u){var h=a.Bn.get(u);h!=null&&u.ws.forEach(function(p){p.record(h,e)})}),[2]}})})})},t.prototype.Cs=function(e,n){return this.Wr.findIndex(function(r){return r.callback===e&&r.instrument===n})},t.prototype.Zs=function(e,n){return this.Ur.findIndex(function(r){return r.callback===e&&xx(r.instruments,n)})},t})(),KN=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),_N=(function(t){KN(e,t);function e(n,r,i,o,s){var a=t.call(this,n)||this;return a.yo=i,a.bo=s,a.yr=new Gy(r,a.bo),a.vo=new Ly(r,o),a}return e.prototype.record=function(n,r,i,o){r=this.yo.process(r,i),this.yr.record(n,r,i,o)},e.prototype.collect=function(n,r){var i=this.yr.collect();return this.vo.buildMetrics(n,this.hn,i,r)},e})(Oy),Xy=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Zc=(function(){function t(){}return t.Noop=function(){return zN},t})(),HN=(function(t){Xy(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(n,r){return n},e})(Zc);(function(t){Xy(e,t);function e(n){var r=t.call(this)||this;return r.$a=n,r}return e.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(s){return i.$a.includes(s)}).forEach(function(s){return o[s]=n[s]}),o},e})(Zc);var zN=new HN,BN=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},jN=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},QN=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},$N=(function(){function t(e,n){this.wo=e,this.ks=n,this.metricStorageRegistry=new FN,this.observableRegistry=new YN,this.meter=new kN(this)}return t.prototype.registerMetricStorage=function(e){var n=this.Vs(e,_N);return n.length===1?n[0]:new AN(n)},t.prototype.registerAsyncMetricStorage=function(e){var n=this.Vs(e,XN);return n},t.prototype.collect=function(e,n,r){return BN(this,void 0,void 0,function(){var i,o,s;return jN(this,function(a){switch(a.label){case 0:return[4,this.observableRegistry.observe(n,r==null?void 0:r.timeoutMillis)];case 1:return i=a.sent(),o=this.metricStorageRegistry.getStorages(e),o.length===0?[2,null]:(s=o.map(function(c){return c.collect(e,n)}).filter(Cx),s.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this.ks,metrics:s},errors:i}])}})})},t.prototype.Vs=function(e,n){var r=this,i=this.wo.viewRegistry.findViews(e,this.ks),o=i.map(function(c){var l=Lx(c,e),u=r.metricStorageRegistry.findOrUpdateCompatibleStorage(l);if(u!=null)return u;var h=c.aggregation.createAggregator(l),p=new n(l,h,c.attributesProcessor,r.wo.metricCollectors,c.aggregationCardinalityLimit);return r.metricStorageRegistry.register(p),p});if(o.length===0){var s=this.wo.selectAggregations(e.type),a=s.map(function(c){var l=QN(c,2),u=l[0],h=l[1],p=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(u,e);if(p!=null)return p;var f=h.createAggregator(e),m=u.selectCardinalityLimit(e.type),d=new n(e,f,Zc.Noop(),[u],m);return r.metricStorageRegistry.registerForCollector(u,d),d});o=o.concat(a)}return o},t})(),qN=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tO=(function(){function t(e){this.resource=e,this.viewRegistry=new SN,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var n=Zx(e),r=this.meterSharedStates.get(n);return r==null&&(r=new $N(this,e),this.meterSharedStates.set(n,r)),r},t.prototype.selectAggregations=function(e){var n,r,i=[];try{for(var o=qN(this.metricCollectors),s=o.next();!s.done;s=o.next()){var a=s.value;i.push([a,a.selectAggregation(e)])}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t})(),oo=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},so=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},eO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},nO=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},rO=(function(){function t(e,n){this.dn=e,this.gr=n}return t.prototype.collect=function(e){return oo(this,void 0,void 0,function(){var n,r,i,o,s=this;return so(this,function(a){switch(a.label){case 0:return n=$t(Date.now()),r=[],i=[],o=Array.from(this.dn.meterSharedStates.values()).map(function(c){return oo(s,void 0,void 0,function(){var l;return so(this,function(u){switch(u.label){case 0:return[4,c.collect(this,n,e)];case 1:return l=u.sent(),(l==null?void 0:l.scopeMetrics)!=null&&r.push(l.scopeMetrics),(l==null?void 0:l.errors)!=null&&i.push.apply(i,nO([],eO(l.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return a.sent(),[2,{resourceMetrics:{resource:this.dn.resource,scopeMetrics:r},errors:i}]}})})},t.prototype.forceFlush=function(e){return oo(this,void 0,void 0,function(){return so(this,function(n){switch(n.label){case 0:return[4,this.gr.forceFlush(e)];case 1:return n.sent(),[2]}})})},t.prototype.shutdown=function(e){return oo(this,void 0,void 0,function(){return so(this,function(n){switch(n.label){case 0:return[4,this.gr.shutdown(e)];case 1:return n.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this.gr.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this.gr.selectAggregation(e)},t.prototype.selectCardinalityLimit=function(e){var n,r,i;return(i=(r=(n=this.gr).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,e))!==null&&i!==void 0?i:2e3},t})(),yf=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},gf=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},bf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function iO(t,e){var n=e!=null?e:Ar.empty();return t?Ar.default().merge(n):n}var oO=(function(){function t(e){var n,r,i,o,s;if(this.nn=!1,this.dn=new tO(iO((s=e==null?void 0:e.mergeResourceWithDefaults)!==null&&s!==void 0?s:!0,e==null?void 0:e.resource)),(e==null?void 0:e.views)!=null&&e.views.length>0)try{for(var a=bf(e.views),c=a.next();!c.done;c=a.next()){var l=c.value;this.dn.viewRegistry.addView(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if((e==null?void 0:e.readers)!=null&&e.readers.length>0)try{for(var u=bf(e.readers),h=u.next();!h.done;h=u.next()){var p=h.value;this.addMetricReader(p)}}catch(f){i={error:f}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}return t.prototype.getMeter=function(e,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this.nn?(X.warn("A shutdown MeterProvider cannot provide a Meter"),$R()):this.dn.getMeterSharedState({name:e,version:n,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var n=new rO(this.dn,e);e.setMetricProducer(n),this.dn.metricCollectors.push(n)},t.prototype.shutdown=function(e){return yf(this,void 0,void 0,function(){return gf(this,function(n){switch(n.label){case 0:return this.nn?(X.warn("shutdown may only be called once per MeterProvider"),[2]):(this.nn=!0,[4,Promise.all(this.dn.metricCollectors.map(function(r){return r.shutdown(e)}))]);case 1:return n.sent(),[2]}})})},t.prototype.forceFlush=function(e){return yf(this,void 0,void 0,function(){return gf(this,function(n){switch(n.label){case 0:return this.nn?(X.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this.dn.metricCollectors.map(function(r){return r.forceFlush(e)}))];case 1:return n.sent(),[2]}})})},t})();function sO(t,e){var n=my(e);return{resource:yy(t.resource),schemaUrl:void 0,scopeMetrics:aO(t.scopeMetrics,n)}}function aO(t,e){return Array.from(t.map(function(n){return{scope:gy(n.scope),metrics:n.metrics.map(function(r){return lO(r,e)}),schemaUrl:n.scope.schemaUrl}}))}function lO(t,e){var n={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},r=pO(t.aggregationTemporality);switch(t.dataPointType){case be.SUM:n.sum={aggregationTemporality:r,isMonotonic:t.isMonotonic,dataPoints:vf(t,e)};break;case be.GAUGE:n.gauge={dataPoints:vf(t,e)};break;case be.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:uO(t,e)};break;case be.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:hO(t,e)};break}return n}function cO(t,e,n){var r={attributes:bn(t.attributes),startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)};switch(e){case Ye.INT:r.asInt=t.value;break;case Ye.DOUBLE:r.asDouble=t.value;break}return r}function vf(t,e){return t.dataPoints.map(function(n){return cO(n,t.descriptor.valueType,e)})}function uO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:bn(n.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function hO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:bn(n.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function pO(t){switch(t){case ae.DELTA:return 1;case ae.CUMULATIVE:return 2}}function dO(t,e){return{resourceMetrics:t.map(function(n){return sO(n,e)})}}var fO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function yO(t,e){var n,r=t.spanContext(),i=t.status;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:bn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return bO(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return gO(o,e)}),droppedLinksCount:t.droppedLinksCount}}function gO(t,e){var n;return{attributes:t.attributes?bn(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(n=t.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function bO(t,e){return{attributes:t.attributes?bn(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function vO(t,e){var n=my(e);return{resourceSpans:wO(t,n)}}function SO(t){var e,n,r=new Map;try{for(var i=fO(t),o=i.next();!o.done;o=i.next()){var s=o.value,a=r.get(s.resource);a||(a=new Map,r.set(s.resource,a));var c=s.instrumentationLibrary.name+"@"+(s.instrumentationLibrary.version||"")+":"+(s.instrumentationLibrary.schemaUrl||""),l=a.get(c);l||(l=[],a.set(c,l)),l.push(s)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function wO(t,e){for(var n=SO(t),r=[],i=n.entries(),o=i.next();!o.done;){for(var s=mO(o.value,2),a=s[0],c=s[1],l=[],u=c.values(),h=u.next();!h.done;){var p=h.value;if(p.length>0){var f=p.map(function(d){return yO(d,e)});l.push({scope:gy(p[0].instrumentationLibrary),spans:f,schemaUrl:p[0].instrumentationLibrary.schemaUrl})}h=u.next()}var m={resource:yy(a),scopeSpans:l,schemaUrl:void 0};r.push(m),o=i.next()}return r}var IO={serializeRequest:function(t){var e=dO([t],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},TO={serializeRequest:function(t){var e=vO(t,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},EO=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(h){s(h)}}function c(u){try{l(r.throw(u))}catch(h){s(h)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,[])).next())})},RO=function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},CO=5,ZO=1e3,kO=5e3,VO=1.5,Sf=.2;function xO(){return Math.random()*(2*Sf)-Sf}var NO=(function(){function t(e){this.Jn=e}return t.prototype.retry=function(e,n,r){var i=this;return new Promise(function(o,s){setTimeout(function(){i.Jn.send(e,n).then(o,s)},r)})},t.prototype.send=function(e,n){var r;return EO(this,void 0,void 0,function(){var i,o,s,a,c,l,u;return RO(this,function(h){switch(h.label){case 0:return i=Date.now()+n,[4,this.Jn.send(e,n)];case 1:o=h.sent(),s=CO,a=ZO,h.label=2;case 2:return o.status==="retryable"&&s>0?(s--,c=Math.max(Math.min(a,kO)+xO(),0),a=a*VO,l=(r=o.retryInMillis)!==null&&r!==void 0?r:c,u=i-Date.now(),l>u?[2,o]:[4,this.retry(e,u,l)]):[3,4];case 3:return o=h.sent(),[3,2];case 4:return[2,o]}})})},t.prototype.shutdown=function(){return this.Jn.shutdown()},t})();function Wy(t){return new NO(t.transport)}function OO(t){var e=[429,502,503,504];return e.includes(t)}function GO(t){if(t!=null){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var n=new Date(t).getTime()-Date.now();return n>=0?n:0}}var LO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},XO=(function(){function t(e){this.xs=e}return t.prototype.send=function(e,n){var r=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=n,o.open("POST",r.xs.url);var s=r.xs.headers();Object.entries(s).forEach(function(a){var c=LO(a,2),l=c[0],u=c[1];o.setRequestHeader(l,u)}),o.ontimeout=function(a){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(X.debug("XHR success"),i({status:"success"})):o.status&&OO(o.status)?i({status:"retryable",retryInMillis:GO(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(e)})},t.prototype.shutdown=function(){},t})();function WO(t){return new XO(t)}var UO=(function(){function t(e){this.Ns=e}return t.prototype.send=function(e){var n=this;return new Promise(function(r){navigator.sendBeacon(n.Ns.url,new Blob([e],{type:n.Ns.blobType}))?(X.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t})();function MO(t){return new UO(t)}function PO(t,e){return hy(t,e,Wy({transport:WO(t)}))}function FO(t,e){return hy(t,e,Wy({transport:MO({url:t.url,blobType:t.headers()["Content-Type"]})}))}var AO=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function JO(t){return function(){var e,n={};return Object.entries((e=t==null?void 0:t())!==null&&e!==void 0?e:{}).forEach(function(r){var i=AO(r,2),o=i[0],s=i[1];typeof s<"u"?n[o]=String(s):X.warn('Header "'+o+'" has invalid value ('+s+") and will be ignored")}),n}}var yn=function(){return yn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},yn.apply(this,arguments)};function DO(t,e,n){var r=yn({},n()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,r)}}function YO(t){if(t!=null)try{return new URL(t),t}catch(e){throw new Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}function KO(t,e,n){var r,i,o,s;return yn(yn({},ox(t,e,n)),{headers:DO(JO(t.headers),e.headers,n.headers),url:(i=(r=YO(t.url))!==null&&r!==void 0?r:e.url)!==null&&i!==void 0?i:n.url,agentOptions:(s=(o=t.agentOptions)!==null&&o!==void 0?o:e.agentOptions)!==null&&s!==void 0?s:n.agentOptions})}function _O(t,e){return yn(yn({},sx()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function HO(t,e,n){return KO({url:t.url,timeoutMillis:t.timeoutMillis,headers:ix(t.headers),concurrencyLimit:t.concurrencyLimit},{},_O(n,e))}function Uy(t,e,n,r){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=HO(t,n,r);return i?PO(o,e):FO(o,e)}var zO=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),BO=(function(t){zO(e,t);function e(n){return n===void 0&&(n={}),t.call(this,Uy(n,TO,"v1/traces",{"Content-Type":"application/json"}))||this}return e})(uy),Xo;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(Xo||(Xo={}));var jO=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ql=function(){return ae.CUMULATIVE},My=function(t){switch(t){case K.COUNTER:case K.OBSERVABLE_COUNTER:case K.GAUGE:case K.HISTOGRAM:case K.OBSERVABLE_GAUGE:return ae.DELTA;case K.UP_DOWN_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:return ae.CUMULATIVE}},Py=function(t){switch(t){case K.COUNTER:case K.HISTOGRAM:return ae.DELTA;case K.GAUGE:case K.UP_DOWN_COUNTER:case K.OBSERVABLE_UP_DOWN_COUNTER:case K.OBSERVABLE_COUNTER:case K.OBSERVABLE_GAUGE:return ae.CUMULATIVE}};function QO(){var t=Yn(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?ql:e==="delta"?My:e==="lowmemory"?Py:(X.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),ql)}function $O(t){return t!=null?t===Xo.DELTA?My:t===Xo.LOWMEMORY?Py:ql:QO()}function qO(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return xe.Default()}}var tG=(function(t){jO(e,t);function e(n,r){var i=t.call(this,n)||this;return i.co=qO(r),i.uo=$O(r==null?void 0:r.temporalityPreference),i}return e.prototype.selectAggregation=function(n){return this.co(n)},e.prototype.selectAggregationTemporality=function(n){return this.uo(n)},e})(uy),eG=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),nG=(function(t){eG(e,t);function e(n){return t.call(this,Uy(n!=null?n:{},IO,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return e})(tG);function rG(t,e){let n=t.spanContext();return{name:t.name,kind:t.kind,spanContext:()=>n,parentSpanId:t.parentSpanId,startTime:t.startTime,endTime:t.endTime,status:t.status,attributes:Pm(t.attributes,e),links:t.links,events:t.events,duration:t.duration,ended:t.ended,resource:t.resource,instrumentationLibrary:t.instrumentationLibrary,droppedAttributesCount:t.droppedAttributesCount,droppedEventsCount:t.droppedEventsCount,droppedLinksCount:t.droppedLinksCount}}function iG(t,e){if(!e.isSamplingEnabled())return t;let n=[],r={},i={};for(let o of t){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));let s=e.shouldSample(o);s.sample?s.attributes?r[o.spanContext().spanId]=rG(o,s.attributes):r[o.spanContext().spanId]=o:n.push(o.spanContext().spanId)}for(;n.length>0;){let o=n.shift(),s=i[o];if(s)for(let a of s)delete r[a],n.push(a)}return Object.values(r)}var tc=class extends BO{constructor(e,n){super(At(mt({},e),{headers:{}})),this.sampler=n}export(e,n){let r=iG(e,this.sampler);if(r.length===0)return;let i=0,o=s=>{var a;if(s.code===kt.SUCCESS)return n({code:kt.SUCCESS});if(i++,i>fc)return console.error(`[@launchdarkly/observability] failed to export OTeL traces: ${(a=s.error)==null?void 0:a.message}`,s.error),n({code:kt.FAILED,error:s.error});new Promise(c=>setTimeout(c,mc+yc*Math.pow(2,i))).then(()=>{var c;console.warn(`[@launchdarkly/observability] retry ${i}, failed to export OTeL traces: ${(c=s.error)==null?void 0:c.message}`,s.error),super.export(r,o)})};super.export(r,o)}},ec=class extends nG{constructor(e){super(At(mt({},e),{headers:{}}))}export(e,n){let r=0,i=o=>{var s;if(o.code===kt.SUCCESS)return n({code:kt.SUCCESS});if(r++,r>fc)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(s=o.error)==null?void 0:s.message}`,o.error),n({code:kt.FAILED,error:o.error});new Promise(a=>setTimeout(a,mc+yc*Math.pow(2,r))).then(()=>{var a;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),super.export(e,i)})};super.export(e,i)}},oG="OT_ZONE_CONTEXT",sG="Navigation:",aG=["click","input","submit"];function lG(){return!1}var nc=class rn extends Bm{constructor(e={}){var n;super(rn.moduleName,rn.version,e),yt(this,"_spansData",new WeakMap),yt(this,"_zonePatched"),yt(this,"_wrappedListeners",new WeakMap),yt(this,"_eventsSpanMap",new WeakMap),yt(this,"_eventNames"),yt(this,"_shouldPreventSpanCreation"),this.qa=new Set((n=e==null?void 0:e.eventNames)!=null?n:aG),this.tl=typeof(e==null?void 0:e.shouldPreventSpanCreation)=="function"?e.shouldPreventSpanCreation:lG}init(){}el(e,n){let r=this.jn.get(n);r&&(e.source==="setTimeout"?r.hrTimeLastTimeout=fn():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}nl(e){return this.qa.has(e)}An(e,n){var r;let i=e==null?void 0:e.target,o=e==null?void 0:e.type;if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this.nl(o))return;let s=ny(i,!0);try{let a=this.tracer.startSpan(o,{attributes:{"event.type":o,"event.tag":i.tagName,"event.xpath":s,"event.id":i.id,"event.text":(r=i.textContent)!=null?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?ut.setSpan(tt.active(),n):void 0);return e instanceof MouseEvent&&(a.setAttribute("event.x",e.clientX),a.setAttribute("event.y",e.clientY),a.setAttribute("event.relativeX",e.clientX/window.innerWidth),a.setAttribute("event.relativeY",e.clientY/window.innerHeight),o==="scroll"&&(a.setAttribute("event.scrollX",window.scrollX),a.setAttribute("event.scrollY",window.scrollY))),this.tl(o,i,a)===!0?void 0:(this.jn.set(a,{taskCount:0}),a)}catch(a){this.v.error("failed to start create new user interaction span",a)}}Io(e){let n=this.jn.get(e);n&&(n.taskCount--,n.taskCount===0&&this.rl(e,n.hrTimeLastTimeout))}Mr(e){let n=e.get(oG);return n&&ut.getSpan(n)}Os(e){let n=this.jn.get(e);n&&n.taskCount++}addPatchedListener(e,n,r,i){let o=this.To.get(r);o||(o=new Map,this.To.set(r,o));let s=o.get(n);return s||(s=new Map,o.set(n,s)),s.has(e)?!1:(s.set(e,i),!0)}removePatchedListener(e,n,r){let i=this.To.get(r);if(!i)return;let o=i.get(n);if(!o)return;let s=o.get(e);return s&&(o.delete(e),o.size===0&&(i.delete(n),i.size===0&&this.To.delete(r))),s}Pr(e,n,r){return typeof e=="function"?e.apply(n,r):e.handleEvent(r[0])}il(){let e=this,n=new Map;return r=>function(i,o,s){if(!o)return r.call(this,i,o,s);let a=s&&typeof s=="object"&&s.once,c=function(...l){var u;let h,p=l[0];if(!(p!=null&&p.type))return e.Pr(o,this,l);if(Date.now()-((u=n.get(p.type))!=null?u:0)<1e3/60)return e.Pr(o,this,l);n.set(p.type,Date.now()),p&&(h=e.ol.get(p)),a&&e.removePatchedListener(this,i,o);let f=e.An(p,h);return f?(p&&e.ol.set(p,f),tt.with(ut.setSpan(tt.active(),f),()=>{let m=e.Pr(o,this,l);return f.end(),m})):e.Pr(o,this,l)};if(e.addPatchedListener(this,i,o,c))return r.call(this,i,c,s)}}sl(){let e=this;return n=>function(r,i,o){let s=e.removePatchedListener(this,r,i);return s?n.call(this,r,s,o):n.call(this,r,i,o)}}Gs(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}al(){this.Ls(),this.ae(history,"replaceState",this.br()),this.ae(history,"pushState",this.br()),this.ae(history,"back",this.br()),this.ae(history,"forward",this.br()),this.ae(history,"go",this.br())}br(){let e=this;return n=>function(...r){let i=`${location.pathname}${location.hash}${location.search}`,o=n.apply(this,r),s=`${location.pathname}${location.hash}${location.search}`;return i!==s&&e.ll(s),o}}Ls(){Gt(history.replaceState)&&this.P(history,"replaceState"),Gt(history.pushState)&&this.P(history,"pushState"),Gt(history.back)&&this.P(history,"back"),Gt(history.forward)&&this.P(history,"forward"),Gt(history.go)&&this.P(history,"go")}ll(e){let n=ut.getSpan(tt.active());n&&typeof n.updateName=="function"&&n.updateName(`${sG} ${e}`)}cl(){let e=this;return n=>function(r){let i=Zone.current,o=e.Mr(i);return o&&e.Eo(r,i)&&e.Io(o),n.call(this,r)}}ul(){let e=this;return n=>function(r){let i=Zone.current,o=e.Mr(i);return o&&e.Eo(r,i)&&(e.Os(o),e.el(r,o)),n.call(this,r)}}hl(){let e=this;return n=>function(r,i,o){let s=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,a=s==null?void 0:s.target,c,l=this;if(a){if(c=e.An(s),c)return e.Os(c),l.run(()=>{try{return tt.with(ut.setSpan(tt.active(),c),()=>{let u=Zone.current;return r.Xs=u,n.call(u,r,i,o)})}finally{e.Io(c)}})}else c=e.Mr(l);try{return n.call(l,r,i,o)}finally{c&&e.Eo(r,l)&&e.Io(c)}}}Eo(e,n){if(e.Xs&&(n=e.Xs),!n||!e.data||e.data.isPeriodic)return!1;let r=this.Mr(n);return!r||!this.jn.get(r)?!1:e.type==="macroTask"||e.type==="microTask"}rl(e,n){e&&this.jn.get(e)&&(e.end(n),this.jn.delete(e))}enable(){let e=this.Ws();this.v.debug("applying patch to",rn.moduleName,rn.version,"zone:",!!e),e?(Gt(e.prototype.runTask)&&(this.P(e.prototype,"runTask"),this.v.debug("removing previous patch from method runTask")),Gt(e.prototype.scheduleTask)&&(this.P(e.prototype,"scheduleTask"),this.v.debug("removing previous patch from method scheduleTask")),Gt(e.prototype.cancelTask)&&(this.P(e.prototype,"cancelTask"),this.v.debug("removing previous patch from method cancelTask")),this.Us=!0,this.ae(e.prototype,"runTask",this.hl()),this.ae(e.prototype,"scheduleTask",this.ul()),this.ae(e.prototype,"cancelTask",this.cl())):(this.Us=!1,this.Gs().forEach(n=>{Gt(n.addEventListener)&&(this.P(n,"addEventListener"),this.v.debug("removing previous patch from method addEventListener")),Gt(n.removeEventListener)&&(this.P(n,"removeEventListener"),this.v.debug("removing previous patch from method removeEventListener")),this.ae(n,"addEventListener",this.il()),this.ae(n,"removeEventListener",this.sl())})),this.al()}disable(){let e=this.Ws();this.v.debug("removing patch from",rn.moduleName,rn.version,"zone:",!!e),e&&this.Us?(Gt(e.prototype.runTask)&&this.P(e.prototype,"runTask"),Gt(e.prototype.scheduleTask)&&this.P(e.prototype,"scheduleTask"),Gt(e.prototype.cancelTask)&&this.P(e.prototype,"cancelTask")):this.Gs().forEach(n=>{Gt(n.addEventListener)&&this.P(n,"addEventListener"),Gt(n.removeEventListener)&&this.P(n,"removeEventListener")}),this.Ls()}Ws(){return window.Zone}};yt(nc,"version","0.1.0"),yt(nc,"moduleName","user-interaction");var cG=nc,on={},Pe,Wo="highlight.record",uG="highlight.session_id",hG="launchdarkly.js.log",pG=(t,e)=>{var n,r,i,o,s,a,c,l,u;if(on.tracerProvider!==void 0){console.warn("OTEL already initialized. Skipping...");return}Pe=t;let h=t.backendUrl||void 0||"https://pub.highlight.io",p=[...(r=(n=t.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...KV],f=(i=t.environment)!=null?i:"production",m={url:t.otlpEndpoint+"/v1/traces",concurrencyLimit:100,timeoutMillis:5e3,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:5e3,keepAlive:!0}},d=new tc(m,e),b=new rc(d,{maxExportBatchSize:100,maxQueueSize:1e3,exportTimeoutMillis:m.timeoutMillis,scheduledDelayMillis:m.timeoutMillis}),v=new Ar({[d1]:(o=t.serviceName)!=null?o:"highlight-browser",[p1]:f,"highlight.project_id":t.projectId});on.tracerProvider=new Bk({resource:v,spanProcessors:[b]}),ut.setGlobalTracerProvider(on.tracerProvider);let I=new ec(At(mt({},m),{url:t.otlpEndpoint+"/v1/metrics"})),R=new vN({exporter:I,exportIntervalMillis:m.timeoutMillis,exportTimeoutMillis:m.timeoutMillis});on.meterProvider=new oO({resource:v,readers:[R]}),Ce.setGlobalMeterProvider(on.meterProvider);let E=[];((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&E.push(new I1({applyCustomAttributesOnSpan:{documentLoad:Ef,documentFetch:Ef,resourceFetch:fG}})),((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-user-interaction"])!==!1&&E.push(new cG({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled&&(((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1&&E.push(new lV({propagateTraceHeaderCorsUrls:Rf(t.tracingOrigins),applyCustomAttributesOnSpan:(V,N,U)=>Yo(void 0,null,function*(){var C,x,M;if(!V.attributes)return;let ot=V;if(ot.attributes[Wo]===!1)return;let lt=ot.attributes["http.url"],y=(C=N.method)!=null?C:"GET";if(V.updateName(If(lt,y,N.body)),!(U instanceof Response)){V.setAttributes({"http.response.error":U.message,"http.response.status":U.status});return}Tf(V,N.body,N.headers,t.networkRecordingOptions);let g=yield ex(U,(x=t.networkRecordingOptions)==null?void 0:x.bodyKeysToRecord,(M=t.networkRecordingOptions)==null?void 0:M.networkBodyKeysToRedact);V.setAttribute("http.response.body",g)})})),((u=t.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-xml-http-request"])!==!1&&E.push(new JV({propagateTraceHeaderCorsUrls:Rf(t.tracingOrigins),applyCustomAttributesOnSpan:(V,N)=>{var U,C;let x=N;if(!V.attributes||V.attributes[Wo]===!1)return;let M=If(x.Cl,x.Zl,N.responseText);V.updateName(M),Tf(V,x.pl,x.dl,t.networkRecordingOptions);let ot=cy(x.pl,(U=t.networkRecordingOptions)==null?void 0:U.networkBodyKeysToRedact,(C=t.networkRecordingOptions)==null?void 0:C.bodyKeysToRecord,x.dl);V.setAttribute("http.request.body",ot)}}))),hk({instrumentations:E});let T=new qm;T.enable(),on.tracerProvider.register({contextManager:T,propagator:new Gm({propagators:[new Cm,new ic({backendUrl:h,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:p})]})})},rc=class extends $m{onStart(e,n){e.setAttribute(uG,Fe()),super.onStart(e,n)}onEnd(e){e.attributes[Wo]!==!1&&super.onEnd(e)}},ic=class extends Lm{constructor(e){super(),yt(this,"highlightEndpoints"),yt(this,"tracingOrigins"),yt(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,n,r){var i;let o=ut.getSpan(e);if(!o||!o.attributes)return;let s=o.attributes["http.url"];typeof s=="string"&&(dG(s,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Wo,!1),!qV(s,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,n,r)}},Fy="highlight-browser",ao=Fy,wf=()=>{var t;return(t=on.tracerProvider)==null?void 0:t.getTracer(Fy)},If=(t,e,n)=>{var r,i,o;let s,a=new URL(t),c=a.pathname,l=`${e.toUpperCase()} - ${c}`;try{if(s=typeof n=="string"?JSON.parse(n):n,s&&s.query){let u=cc(s.query),h=((r=u.definitions[0])==null?void 0:r.kind)==="OperationDefinition"?(o=(i=u.definitions[0])==null?void 0:i.name)==null?void 0:o.value:void 0;h&&(l=`${h} (GraphQL: ${a.host+a.pathname})`)}}catch(u){}return l},Tf=(t,e,n,r)=>{var i;let o=typeof e=="string"?e:String(e);if(!t.attributes)return;let s=t.attributes["http.url"],a=new URL(s),c;try{c=e?JSON.parse(o):void 0,c.operationName&&t.setAttribute("graphql.operation.name",c.operationName)}catch(u){}let l=DV((i=r==null?void 0:r.networkHeadersToRedact)!=null?i:[],n,r==null?void 0:r.headerKeysToRecord);t.setAttributes({"highlight.type":"http.request","http.request.headers":JSON.stringify(l),"http.request.body":o,[y1]:s,[g1]:a.pathname,[b1]:a.search}),a.searchParams.size>0&&t.setAttributes({"url.query_params":JSON.stringify(Object.fromEntries(a.searchParams))})},dG=(t,e,n,r)=>r!=null&&r.some(i=>t.toLowerCase().includes(i))?!1:$V(t,e),Ef=t=>{var e,n,r;if(!t.events)return;let i=t.events,o={unload:Bt("unloadEventStart","unloadEventEnd",i),dom_interactive:Bt("fetchStart","domInteractive",i),dom_content_loaded:Bt("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:Bt("fetchStart","domComplete",i),load_event:Bt("loadEventStart","loadEventEnd",i),document_load:Bt("fetchStart","loadEventEnd",i),first_paint:Bt("fetchStart","firstPaint",i),first_contentful_paint:Bt("fetchStart","firstContentfulPaint",i),domain_lookup:Bt("domainLookupStart","domainLookupEnd",i),connect:Bt("connectStart","connectEnd",i),request:Bt("requestStart","requestEnd",i),response:Bt("responseStart","responseEnd",i)},s=(n=(e=Pe==null?void 0:Pe.getIntegrations)==null?void 0:e.call(Pe))!=null?n:[];if(o.document_load!==void 0)for(let a of s)a.recordGauge((r=Pe==null?void 0:Pe.sessionSecureId)!=null?r:"",{name:pm,value:o.document_load/1e6});Object.entries(o).forEach(([a,c])=>{c!==void 0&&(t.setAttribute(`timings.${a}.ns`,c),t.setAttribute(`timings.${a}.readable`,Ay(c)))})};function Bt(t,e,n){let r=n.find(s=>s.name===t),i=n.find(s=>s.name===e);if(!r||!i)return;let o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}var fG=(t,e)=>{let n={domain_lookup:(e.domainLookupEnd-e.domainLookupStart)*1e9,connect:(e.connectEnd-e.connectStart)*1e9,request:(e.responseEnd-e.requestStart)*1e9,response:(e.responseEnd-e.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{t.setAttribute(`timings.${r}.ns`,i),t.setAttribute(`timings.${r}.readable`,Ay(i))})},Ay=t=>{if(t>=36e11){let e=t/36e11;return`${Number(e.toFixed(1))}h`}else if(t>=6e10){let e=t/6e10;return`${Number(e.toFixed(1))}m`}else if(t>=1e9){let e=t/1e9;return`${Number(e.toFixed(1))}s`}else if(t>=1e6){let e=t/1e6;return`${Number(e.toFixed(1))}ms`}else if(t>=1e3){let e=t/1e3;return`${Number(e.toFixed(1))}\xB5s`}else return`${Number(t.toFixed(1))}ns`},Rf=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,mG=30,yG=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(n=>t(n-e)))),gG=()=>Yo(void 0,null,function*(){let t=[];for(let e=0;e<mG;e++)t.push(yield yG());return t.reduce((e,n)=>e+n,0)/t.length}),bG=(t,e)=>{let n={},r=16.666666666666668;gG().then(c=>r=c);let i=c=>{var l;n!=null&&n.event||(n={event:c,location:window.location.href,timerStart:(l=window.performance)==null?void 0:l.now()},window.requestAnimationFrame(o))},o=()=>{if(!(n!=null&&n.timerStart))return;let c=window.performance.now()-n.timerStart-r;s(c),n={}},s=c=>{let l=(new Date().getTime()-e)/1e3;t({relativeTimestamp:l,jankAmount:c,querySelector:a(),newLocation:window.location.href!=n.location?window.location.href:void 0})},a=()=>{var c;return(c=n==null?void 0:n.event)!=null&&c.target?nR(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},vG=typeof window<"u",Cf=vG&&"performance"in window&&"memory"in performance?performance:{memory:{}},SG=(t,e)=>{let n=0,r=0,i=()=>{let l=(new Date().getTime()-e)/1e3,u=Cf.memory.jsHeapSizeLimit||0,h=Cf.memory.usedJSHeapSize||0;t({jsHeapSizeLimit:u,usedJSHeapSize:h,relativeTimestamp:l,fps:n})};i();let o;o=setInterval(()=>{i()},1e3);let s=0,a=Date.now(),c=function(){var l=Date.now();s++,l>1e3+a&&(n=Math.round(s*1e3/(l-a)),s=0,a=l),r=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(r)}},Je,Xr,Jy,Uo,oc,Dy=-1,wn=function(t){addEventListener("pageshow",function(e){e.persisted&&(Dy=e.timeStamp,t(e))},!0)},kc=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Qo=function(){var t=kc();return t&&t.activationStart||0},ee=function(t,e){var n=kc(),r="navigate";return Dy>=0?r="back-forward-cache":n&&(document.prerendering||Qo()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},zn=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(i){}},ne=function(t,e,n,r){var i,o;return function(s){e.value>=0&&(s||r)&&((o=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=o,e.rating=(function(a,c){return a>c[1]?"poor":a>c[0]?"needs-improvement":"good"})(e.value,n),t(e))}},Vc=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},$o=function(t){var e=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||t(n)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},xc=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},Fn=-1,Zf=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Mo=function(t){document.visibilityState==="hidden"&&Fn>-1&&(Fn=t.type==="visibilitychange"?t.timeStamp:0,wG())},kf=function(){addEventListener("visibilitychange",Mo,!0),addEventListener("prerenderingchange",Mo,!0)},wG=function(){removeEventListener("visibilitychange",Mo,!0),removeEventListener("prerenderingchange",Mo,!0)},Nc=function(){return Fn<0&&(Fn=Zf(),kf(),wn(function(){setTimeout(function(){Fn=Zf(),kf()},0)})),{get firstHiddenTime(){return Fn}}},zr=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},Vf=[1800,3e3],Yy=function(t,e){e=e||{},zr(function(){var n,r=Nc(),i=ee("FCP"),o=zn("paint",function(s){s.forEach(function(a){a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<r.firstHiddenTime&&(i.value=Math.max(a.startTime-Qo(),0),i.entries.push(a),n(!0)))})});o&&(n=ne(t,i,Vf,e.reportAllChanges),wn(function(s){i=ee("FCP"),n=ne(t,i,Vf,e.reportAllChanges),Vc(function(){i.value=performance.now()-s.timeStamp,n(!0)})}))})},xf=[.1,.25],IG=function(t,e){e=e||{},Yy(xc(function(){var n,r=ee("CLS",0),i=0,o=[],s=function(c){c.forEach(function(l){if(!l.hadRecentInput){var u=o[0],h=o[o.length-1];i&&l.startTime-h.startTime<1e3&&l.startTime-u.startTime<5e3?(i+=l.value,o.push(l)):(i=l.value,o=[l])}}),i>r.value&&(r.value=i,r.entries=o,n())},a=zn("layout-shift",s);a&&(n=ne(t,r,xf,e.reportAllChanges),$o(function(){s(a.takeRecords()),n(!0)}),wn(function(){i=0,r=ee("CLS",0),n=ne(t,r,xf,e.reportAllChanges),Vc(function(){return n()})}),setTimeout(n,0))}))},Vr={passive:!0,capture:!0},TG=new Date,Nf=function(t,e){Je||(Je=e,Xr=t,Jy=new Date,_y(removeEventListener),Ky())},Ky=function(){if(Xr>=0&&Xr<Jy-TG){var t={entryType:"first-input",name:Je.type,target:Je.target,cancelable:Je.cancelable,startTime:Je.timeStamp,processingStart:Je.timeStamp+Xr};Uo.forEach(function(e){e(t)}),Uo=[]}},EG=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?(function(n,r){var i=function(){Nf(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,Vr),removeEventListener("pointercancel",o,Vr)};addEventListener("pointerup",i,Vr),addEventListener("pointercancel",o,Vr)})(e,t):Nf(e,t)}},_y=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,EG,Vr)})},Of=[100,300],RG=function(t,e){e=e||{},zr(function(){var n,r=Nc(),i=ee("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),n(!0))},s=function(c){c.forEach(o)},a=zn("first-input",s);n=ne(t,i,Of,e.reportAllChanges),a&&$o(xc(function(){s(a.takeRecords()),a.disconnect()})),a&&wn(function(){var c;i=ee("FID"),n=ne(t,i,Of,e.reportAllChanges),Uo=[],Xr=-1,Je=null,_y(addEventListener),c=o,Uo.push(c),Ky()})})},Hy=0,El=1/0,lo=0,CG=function(t){t.forEach(function(e){e.interactionId&&(El=Math.min(El,e.interactionId),lo=Math.max(lo,e.interactionId),Hy=lo?(lo-El)/7+1:0)})},zy=function(){return oc?Hy:performance.interactionCount||0},ZG=function(){"interactionCount"in performance||oc||(oc=zn("event",CG,{type:"event",buffered:!0,durationThreshold:0}))},Gf=[200,500],By=0,Lf=function(){return zy()-By},ge=[],Rl={},Xf=function(t){var e=ge[ge.length-1],n=Rl[t.interactionId];if(n||ge.length<10||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};Rl[r.id]=r,ge.push(r)}ge.sort(function(i,o){return o.latency-i.latency}),ge.splice(10).forEach(function(i){delete Rl[i.id]})}},kG=function(t,e){e=e||{},zr(function(){var n;ZG();var r,i=ee("INP"),o=function(a){a.forEach(function(u){u.interactionId&&Xf(u),u.entryType==="first-input"&&!ge.some(function(h){return h.entries.some(function(p){return u.duration===p.duration&&u.startTime===p.startTime})})&&Xf(u)});var c,l=(c=Math.min(ge.length-1,Math.floor(Lf()/50)),ge[c]);l&&l.latency!==i.value&&(i.value=l.latency,i.entries=l.entries,r())},s=zn("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=ne(t,i,Gf,e.reportAllChanges),s&&("interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),$o(function(){o(s.takeRecords()),i.value<0&&Lf()>0&&(i.value=0,i.entries=[]),r(!0)}),wn(function(){ge=[],By=zy(),i=ee("INP"),r=ne(t,i,Gf,e.reportAllChanges)}))})},Wf=[2500,4e3],Cl={},VG=function(t,e){e=e||{},zr(function(){var n,r=Nc(),i=ee("LCP"),o=function(c){var l=c[c.length-1];l&&l.startTime<r.firstHiddenTime&&(i.value=Math.max(l.startTime-Qo(),0),i.entries=[l],n())},s=zn("largest-contentful-paint",o);if(s){n=ne(t,i,Wf,e.reportAllChanges);var a=xc(function(){Cl[i.id]||(o(s.takeRecords()),s.disconnect(),Cl[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(a,0)},!0)}),$o(a),wn(function(c){i=ee("LCP"),n=ne(t,i,Wf,e.reportAllChanges),Vc(function(){i.value=performance.now()-c.timeStamp,Cl[i.id]=!0,n(!0)})})}})},Uf=[800,1800],xG=function t(e){document.prerendering?zr(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},NG=function(t,e){e=e||{};var n=ee("TTFB"),r=ne(t,n,Uf,e.reportAllChanges);xG(function(){var i=kc();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-Qo(),0),n.entries=[i],r(!0),wn(function(){n=ee("TTFB",0),(r=ne(t,n,Uf,e.reportAllChanges))(!0)})}})},OG=t=>(IG(t),Yy(t),RG(t),VG(t),NG(t),kG(t),()=>{}),Mn=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},GG=(t,e)=>{let n=()=>{let i=(new Date().getTime()-e)/1e3;t({relativeTimestamp:i,downlink:Mn.downlink,downlinkMax:Mn.downlinkMax,effectiveType:Mn.effectiveType,rtt:Mn.rtt,saveData:Mn.saveData,type:Mn.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},LG=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};let t=window.performance;return{getDeviceDetails:()=>({deviceMemory:XG(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{let e=Zl(t.memory.jsHeapSizeLimit),n=Zl(t.memory.totalJSHeapSize),r=Zl(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}},Zl=t=>t/Math.pow(1e3,2),XG=t=>1024*t,WG="launchdarkly.js.log",UG="log.severity",MG="log.message",Mf="launchdarkly.sampling.ratio";function PG(t){return"regexValue"in t}function FG(t){return"matchValue"in t}function AG(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}var sc=class{constructor(e=AG){yt(this,"regexCache",new Map),yt(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,n,r,i;return!!((n=(e=this.config)==null?void 0:e.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(e){var n,r;return e.name===WG?this.sampleLog((n=this.config)==null?void 0:n.logs,e):this.sampleSpan((r=this.config)==null?void 0:r.spans,e)}matchesValue(e,n){if(!e)return!1;if(FG(e))return e.matchValue===n;if(PG(e)){let r=e.regexValue;if(r===null)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));let i=this.regexCache.get(r);if(typeof n=="string")return i.test(n)}return!1}matchesAttributes(e,n){if(e)for(let r of e){let i=!1;for(let o of Object.keys(n))if(this.matchesValue(r.key,o)){let s=n[o];if(this.matchesValue(r.attribute,s)){i=!0;break}}if(!i)return!1}return!0}matchEvent(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||e.attributes&&(!n.attributes||!this.matchesAttributes(e.attributes,n.attributes)))}matchesEvents(e,n){if(e)for(let r of e){let i=!1;for(let o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||!this.matchesAttributes(e.attributes,n.attributes)||!this.matchesEvents(e.events,n.events))}matchesLogConfig(e,n){if(e.severityText){let r=n[UG];if(typeof r=="string"&&!this.matchesValue(e.severityText,r))return!1}if(e.message){let r=n[MG];if(typeof r=="string"&&!this.matchesValue(e.message,r))return!1}return!!this.matchesAttributes(e.attributes,n)}sampleSpan(e,n){if(e){for(let r of e)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[Mf]:r.samplingRatio}}}return{sample:!0}}sampleLog(e,n){if(e){for(let r of e)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[Mf]:r.samplingRatio}}}return{sample:!0}}},Pf=()=>{let t={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(e,n)=>t,setAttributes:e=>t,addEvent:(e,n,r)=>t,addLinks:e=>t,setStatus:e=>t,recordException:()=>{},addLink:()=>t,updateName:()=>t,isRecording:()=>!1};return t},ac=class{constructor(e){yt(this,"organizationID"),yt(this,"_integrations",[]),yt(this,"_gauges",new Map),yt(this,"_counters",new Map),yt(this,"_histograms",new Map),yt(this,"_up_down_counters",new Map),yt(this,"sampler",new sc),yt(this,"graphqlSDK"),typeof e.projectId=="string"?this.organizationID=e.projectId:this.organizationID=e.projectId.toString(),pG(At(mt({},e),{getIntegrations:()=>this.Gn}),this.sampler);let n=new rE(`${e.backendUrl}`,{headers:{}});this.graphqlSDK=RE(n,PE()),this.configureSampling(),this.setupListeners(e)}configureSampling(){return Yo(this,null,function*(){try{let e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){ke("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}recordLog(e,n,r){this.startSpan(hG,i=>{let o=typeof e=="string"?e:sn(e);i==null||i.addEvent("log",mt({"log.severity":n,"log.message":o},r)),n==="error"&&(i==null||i.recordException(new Error(o)),i==null||i.setStatus({code:Vo.ERROR,message:o}))})}recordError(e,n,r,i,o){var s,a,c,l;e.cause&&(r=At(mt({},r),{"exception.cause":JSON.stringify(e.cause)}));let u=n?n+":"+e.message:e.message;o==="React.ErrorBoundary"&&(u="ErrorBoundary: "+u);let h=Ko(e),p={error:e,event:u,type:o!=null?o:"custom",url:window.location.href,source:i!=null?i:"",lineNumber:(s=h[0])!=null&&s.lineNumber?(a=h[0])==null?void 0:a.lineNumber:0,columnNumber:(c=h[0])!=null&&c.columnNumber?(l=h[0])==null?void 0:l.columnNumber:0,stackTrace:h,timestamp:new Date().toISOString()};this.startSpan("highlight.exception",f=>{f==null||f.recordException(e),f==null||f.setAttributes(mt({event:p.event,type:p.type,url:p.url,source:p.source,lineNumber:p.lineNumber,columnNumber:p.columnNumber},r))});for(let f of this.Gn)f.error(Fe(),p)}recordCount(e){let n=Ce.getMeter(ao),r=this.fl.get(e.name);r||(r=n.createCounter(e.name),this.fl.set(e.name,r)),r.add(e.value,At(mt({},e.attributes),{"highlight.session_id":Fe()}))}recordGauge(e){var n,r,i;let o=Ce.getMeter(ao),s=this.ml.get(e.name);s||(s=o.createGauge(e.name),this.ml.set(e.name,s)),s.record(e.value,At(mt({},e.attributes),{"highlight.session_id":Fe()}));let a={name:e.name,value:e.value,category:(n=e.attributes)==null?void 0:n.category,group:(i=(r=e.attributes)==null?void 0:r.group)==null?void 0:i.toString(),tags:e.attributes?Object.entries(e.attributes).map(([c,l])=>{var u;return{name:c!=null?c:"",value:(u=l==null?void 0:l.toString())!=null?u:""}}):[]};for(let c of this.Gn)c.recordGauge(Fe(),a)}recordIncr(e){this.recordCount(At(mt({},e),{value:1}))}recordHistogram(e){let n=Ce.getMeter(ao),r=this.yl.get(e.name);r||(r=n.createHistogram(e.name),this.yl.set(e.name,r)),r.record(e.value,At(mt({},e.attributes),{"highlight.session_id":Fe()}))}recordUpDownCounter(e){let n=Ce.getMeter(ao),r=this.gl.get(e.name);r||(r=n.createUpDownCounter(e.name),this.gl.set(e.name,r)),r.add(e.value,At(mt({},e.attributes),{"highlight.session_id":Fe()}))}startSpan(e,n,r,i){let o=wf();if(!o){let a=Pf();return i===void 0&&r===void 0?n(a):i===void 0?r(a):i(a)}let s=(a,c)=>{let l=c(a);return l instanceof Promise?l.finally(()=>a.end()):(a.end(),l)};return i===void 0&&r===void 0?o.startActiveSpan(e,a=>s(a,n)):i===void 0?o.startActiveSpan(e,n,a=>s(a,r)):o.startActiveSpan(e,n,r,a=>s(a,i))}startManualSpan(e,n,r,i){let o=wf();if(!o){let s=Pf();return i===void 0&&r===void 0?n(s):i===void 0?r(s):i(s)}return i===void 0&&r===void 0?o.startActiveSpan(e,n):i===void 0?o.startActiveSpan(e,n,r):o.startActiveSpan(e,n,r,i)}register(e,n){this.Gn.push(new eR(e,n))}getHooks(e){return this.Gn.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}submitViewportMetrics({height:e,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:nn.ViewportHeight,value:e,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:nn.ViewportWidth,value:n,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:nn.ScreenHeight,value:r,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:nn.ScreenWidth,value:i,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:nn.ViewportArea,value:e*n,attributes:{category:jt.Device,group:window.location.href}})}setupListeners(e){var n;e.disableConsoleRecording||fR(i=>{var o,s,a,c,l;let u=At(mt({},i.attributes?{attributes:i.attributes}:{}),{type:i.type});if(e.reportConsoleErrors&&(i.type==="Error"||i.type==="error")&&i.value&&i.trace){let h=sn(i.value);if(vd.includes(h)||Sd.some(f=>h.includes(f)))return;let p=new Error(h);p.stack=sn(i.trace.map(f=>f.toString())),u.url=window.location.href,u.source=(o=i.trace[0])==null?void 0:o.fileName,u.lineNumber=(a=(s=i.trace[0])==null?void 0:s.lineNumber)==null?void 0:a.toString(),u.columnNumber=(l=(c=i.trace[0])==null?void 0:c.columnNumber)==null?void 0:l.toString(),this.recordError(p,void 0,u,u.source,"console.error")}this.recordLog(sn(i.value),"error",{})},{level:(n=e.consoleMethodsToRecord)!=null?n:[],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),e.enablePerformanceRecording!==!1&&(SG(i=>{Object.entries(i).filter(([o])=>o!=="relativeTimestamp").forEach(([o,s])=>s&&this.recordGauge({name:o,value:s,attributes:{category:jt.Performance,group:window.location.href}}))},0),bG(i=>{this.recordGauge({name:"Jank",value:i.jankAmount,attributes:{category:jt.WebVital,group:i.querySelector}})},0)),yR(i=>{var o;if(vd.includes(i.event)||Sd.some(c=>i.event.includes(c)))return;let s=new Error(i.event);s.stack=sn(i.stackTrace.map(c=>c.toString()));let a={};try{i.payload&&(a=JSON.parse(i.payload))}catch(c){}this.recordError((o=i.error)!=null?o:s,i.event,At(mt({},a),{lineNumber:i.lineNumber.toString(),columnNumber:i.columnNumber.toString(),source:i.source,url:i.url}),i.source,i.type)},{enablePromisePatch:!!e.enablePromisePatch}),OG(i=>{let{name:o,value:s}=i;this.recordGauge({name:o,value:s,attributes:{group:window.location.href,category:jt.WebVital}})}),rR(i=>{this.submitViewportMetrics(i)}),GG(i=>{let o={category:jt.Performance,group:window.location.href};i.saveData!==void 0&&(o.saveData=i.saveData.toString()),i.effectiveType!==void 0&&(o.effectiveType=i.effectiveType.toString()),i.type!==void 0&&(o.type=i.type.toString()),Object.entries(i).filter(([s])=>s!=="relativeTimestamp").forEach(([s,a])=>a&&typeof a=="number"&&this.recordGauge({name:s,value:a,attributes:o}))},new Date().getTime());let{getDeviceDetails:r}=LG();r&&this.recordGauge({name:nn.DeviceMemory,value:r().deviceMemory,attributes:{category:jt.Device,group:window.location.href}})}},Po=class extends oR{constructor(e,n){var r=(...h)=>(super(...h),yt(this,"observe"),this),i,o,s,a,c,l,u;try{if(r(n),typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!e){console.warn("@launchdarkly/observability is not initializing because projectID was passed undefined.");return}let h={backendUrl:(i=n==null?void 0:n.backendUrl)!=null?i:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(s=(o=n==null?void 0:n.otel)==null?void 0:o.otlpEndpoint)!=null?s:"https://otel.observability.app.launchdarkly.com",projectId:e,sessionSecureId:this.sessionSecureID,environment:(a=n==null?void 0:n.environment)!=null?a:"production",networkRecordingOptions:typeof(n==null?void 0:n.networkRecording)=="object"?n.networkRecording:void 0,tracingOrigins:n==null?void 0:n.tracingOrigins,serviceName:(c=n==null?void 0:n.serviceName)!=null?c:"browser",instrumentations:(l=n==null?void 0:n.otel)==null?void 0:l.instrumentations,eventNames:(u=n==null?void 0:n.otel)==null?void 0:u.eventNames};this.observe=new ac(h),De.load(this.observe)}catch(h){ke("Error initializing @launchdarkly/observability SDK","error",h)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(e,n){var r;(r=this.observe)==null||r.register(e,n)}getHooks(e){var n,r;let i=mt(mt({[f1]:e.sdk.name,[m1]:e.sdk.version,[AE]:e.clientSideId,[_E]:"LaunchDarkly"},(n=e.application)!=null&&n.id?{[zE]:e.application.id}:{}),(r=e.application)!=null&&r.version?{[BE]:e.application.version}:{});return[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(o,s,a)=>{var c,l,u,h,p;for(let f of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=f.afterIdentify)==null||h.call(f,o,s,a);return(p=this.observe)==null||p.recordLog("LD.identify","info",At(mt({},i),{key:dd(o.context),context:JSON.stringify(fd(o.context)),timeout:o.timeout,[qE]:a.status})),s},afterEvaluation:(o,s,a)=>{var c,l,u,h,p;for(let d of(u=(l=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:l.call(c,e))!=null?u:[])(h=d.afterEvaluation)==null||h.call(d,o,s,a);let f=mt({[JE]:o.flagKey,[KE]:JSON.stringify(a.value)},a.variationIndex?{[HE]:a.variationIndex}:{});if(a.reason)for(let d in hd){let b=d,v=a.reason[b];v&&(f[hd[b]]=v)}o.context&&(f[DE]=JSON.stringify(fd(o.context)),f[YE]=dd(o.context));let m=mt(mt({},i),f);return(p=this.observe)==null||p.startSpan(FE,d=>{d&&d.addEvent(Lt,m)}),s},afterTrack:o=>{var s,a,c,l,u;for(let h of(c=(a=(s=this.observe)==null?void 0:s.getHooks)==null?void 0:a.call(s,e))!=null?c:[])(l=h.afterTrack)==null||l.call(h,o);(u=this.observe)==null||u.recordLog("LD.track","info",mt(At(mt({},i),{key:o.key,value:o.metricValue}),typeof o.data=="object"?o.data:{}))}}]}};Oc();function _F(t,e,n){var i,o;let r=Jh(Ah({},n),{plugins:[...(n==null?void 0:n.plugins)||[],new Po((i=n==null?void 0:n.tmpProjectId)!=null?i:"1",n==null?void 0:n.observability),new Ci((o=n==null?void 0:n.tmpProjectId)!=null?o:"1",n==null?void 0:n.sessionReplay)]});return nd(t,e,r)}0&&(module.exports={LDObserve,LDRecord,basicLogger,createClient});
|
|
644
644
|
/*! Bundled license information:
|
|
645
645
|
|
|
646
646
|
@launchdarkly/session-replay/dist/index-B27CYB0H.js:
|