@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/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
- var Ph=Object.defineProperty,z0=Object.defineProperties;var B0=Object.getOwnPropertyDescriptors;var Uh=Object.getOwnPropertySymbols;var j0=Object.prototype.hasOwnProperty,Q0=Object.prototype.propertyIsEnumerable;var Mh=(t,e,n)=>e in t?Ph(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fh=(t,e)=>{for(var n in e||(e={}))j0.call(e,n)&&Mh(t,n,e[n]);if(Uh)for(var n of Uh(e))Q0.call(e,n)&&Mh(t,n,e[n]);return t},Ah=(t,e)=>z0(t,B0(e));var Jh=(t,e)=>()=>(t&&(e=t(t=0)),e);var $0=(t,e)=>{for(var n in e)Ph(t,n,{get:e[n],enumerable:!0})};var By={};$0(By,{LDObserve:()=>Br});var $o,Br,jy=Jh(()=>{"use strict";Nc();$o=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 $o,globalThis.LDObserve=Br):Br=new $o});function YG(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 Is(t,e){throw new Error(e)}function KG(t){return typeof t=="object"&&t!==null}function _G(t,e){throw new Error("Unexpected invariant triggered.")}function qc(t,e){let n=0,r=1;for(let i of t.body.matchAll(HG)){if(typeof i.index=="number"||_G(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function zG(t){return Sb(t.source,qc(t.source,t.start))}function Sb(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+Qy([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+Qy([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function Qy(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 BG(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 $y(t){return t===void 0||t.length===0?void 0:t}function Zt(t,e,n){return new tu(`Syntax Error: ${n}`,{source:t,positions:[e]})}function qy(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&QG.has(e)}function nu(t){return t===9||t===32}function fi(t){return t>=48&&t<=57}function Tb(t){return t>=97&&t<=122||t>=65&&t<=90}function Eb(t){return Tb(t)||t===95}function $G(t){return Tb(t)||fi(t)||t===95}function qG(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=tL(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 tL(t){let e=0;for(;e<t.length&&nu(t.charCodeAt(e));)++e;return e}function eL(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||nu(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&&nu(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
1
+ var Ph=Object.defineProperty,H0=Object.defineProperties;var z0=Object.getOwnPropertyDescriptors;var Uh=Object.getOwnPropertySymbols;var B0=Object.prototype.hasOwnProperty,j0=Object.prototype.propertyIsEnumerable;var Mh=(t,e,n)=>e in t?Ph(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fh=(t,e)=>{for(var n in e||(e={}))B0.call(e,n)&&Mh(t,n,e[n]);if(Uh)for(var n of Uh(e))j0.call(e,n)&&Mh(t,n,e[n]);return t},Ah=(t,e)=>H0(t,z0(e));var Jh=(t,e)=>()=>(t&&(e=t(t=0)),e);var Q0=(t,e)=>{for(var n in e)Ph(t,n,{get:e[n],enumerable:!0})};var zy={};Q0(zy,{LDObserve:()=>Br});var $o,Br,By=Jh(()=>{"use strict";Nc();$o=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 $o,globalThis.LDObserve=Br):Br=new $o});function YG(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 Is(t,e){throw new Error(e)}function KG(t){return typeof t=="object"&&t!==null}function _G(t,e){throw new Error("Unexpected invariant triggered.")}function qc(t,e){let n=0,r=1;for(let i of t.body.matchAll(HG)){if(typeof i.index=="number"||_G(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function zG(t){return vb(t.source,qc(t.source,t.start))}function vb(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+jy([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+jy([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function jy(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 BG(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 tu(`Syntax Error: ${n}`,{source:t,positions:[e]})}function $y(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&QG.has(e)}function nu(t){return t===9||t===32}function fi(t){return t>=48&&t<=57}function Ib(t){return t>=97&&t<=122||t>=65&&t<=90}function Tb(t){return Ib(t)||t===95}function $G(t){return Ib(t)||fi(t)||t===95}function qG(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=tL(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 tL(t){let e=0;for(;e<t.length&&nu(t.charCodeAt(e));)++e;return e}function eL(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||nu(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&&nu(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
4
4
  `),h+=n,(u||l)&&(h+=`
5
- `),'"""'+h+'"""'}function rL(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 oa(t,e){return Rb(t.charCodeAt(e))&&Cb(t.charCodeAt(e+1))}function Rb(t){return t>=55296&&t<=56319}function Cb(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 wb(e,n,r,o,s,i)}function iL(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 oL(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?hL(t,i):aL(t,i)}if(fi(o)||o===45)return sL(t,i,o);if(Eb(o))return pL(t,i);throw Zt(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:fr(o)||oa(n,i)?`Unexpected character: ${En(t,i)}.`:`Invalid character: ${En(t,i)}.`)}return Tt(t,w.EOF,r,r)}function oL(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(oa(n,i))i+=2;else break}return Tt(t,w.COMMENT,e,i,n.slice(e+1,i))}function sL(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=Oc(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Oc(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=Oc(t,i,o),o=r.charCodeAt(i)),o===46||Eb(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 Oc(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 aL(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?lL(t,i):cL(t,i):uL(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(fr(a))++i;else if(oa(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 lL(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 cL(t,e){let n=t.source.body,r=tg(n,e+2);if(fr(r))return{value:String.fromCodePoint(r),size:6};if(Rb(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=tg(n,e+8);if(Cb(i))return{value:String.fromCodePoint(r,i),size:12}}throw Zt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function tg(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 uL(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:`
5
+ `),'"""'+h+'"""'}function rL(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 oa(t,e){return Eb(t.charCodeAt(e))&&Rb(t.charCodeAt(e+1))}function Eb(t){return t>=55296&&t<=56319}function Rb(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 Sb(e,n,r,o,s,i)}function iL(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 oL(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?hL(t,i):aL(t,i)}if(fi(o)||o===45)return sL(t,i,o);if(Tb(o))return pL(t,i);throw Zt(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:fr(o)||oa(n,i)?`Unexpected character: ${En(t,i)}.`:`Invalid character: ${En(t,i)}.`)}return Tt(t,w.EOF,r,r)}function oL(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(oa(n,i))i+=2;else break}return Tt(t,w.COMMENT,e,i,n.slice(e+1,i))}function sL(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=Oc(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Oc(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=Oc(t,i,o),o=r.charCodeAt(i)),o===46||Tb(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 Oc(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 aL(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?lL(t,i):cL(t,i):uL(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(fr(a))++i;else if(oa(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 lL(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 cL(t,e){let n=t.source.body,r=qy(n,e+2);if(fr(r))return{value:String.fromCodePoint(r),size:6};if(Eb(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=qy(n,e+8);if(Rb(i))return{value:String.fromCodePoint(r,i),size:12}}throw Zt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function qy(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 uL(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 hL(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,qG(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(oa(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 pL(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if($G(o))++i;else break}return Tt(t,w.NAME,e,i,n.slice(e,i))}function oh(t){return sa(t,[])}function sa(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return fL(t,e);default:return String(t)}}function fL(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(mL(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:sa(r,n)}else if(Array.isArray(t))return gL(t,n);return yL(t,n)}function mL(t){return typeof t.toJSON=="function"}function yL(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>Zb?"["+bL(t)+"]":"{ "+n.map(([r,i])=>r+": "+sa(i,e)).join(", ")+" }"}function gL(t,e){if(t.length===0)return"[]";if(e.length>Zb)return"[Array]";let n=Math.min(dL,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(sa(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function bL(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 SL(t){return vL(t,kb)}function Vb(t,e){return new wL(t,e).parseDocument()}function qo(t){let e=t.value;return xb(t.kind)+(e!=null?` "${e}"`:"")}function xb(t){return rL(t)?`"${t}"`:t}function IL(t){return`"${t.replace(TL,EL)}"`}function EL(t){return RL[t.charCodeAt(0)]}function ZL(t,e,n=Ib){let r=new Map;for(let v of Object.values(A))r.set(v,kL(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;qy(l)||Is(!1,`Invalid AST Node: ${oh(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===CL)break;if(R===!1){if(!v){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!v))if(qy(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 kL(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 Nb(t){return ZL(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(`{
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(oa(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 pL(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if($G(o))++i;else break}return Tt(t,w.NAME,e,i,n.slice(e,i))}function oh(t){return sa(t,[])}function sa(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return fL(t,e);default:return String(t)}}function fL(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(mL(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:sa(r,n)}else if(Array.isArray(t))return gL(t,n);return yL(t,n)}function mL(t){return typeof t.toJSON=="function"}function yL(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>Cb?"["+bL(t)+"]":"{ "+n.map(([r,i])=>r+": "+sa(i,e)).join(", ")+" }"}function gL(t,e){if(t.length===0)return"[]";if(e.length>Cb)return"[Array]";let n=Math.min(dL,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(sa(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function bL(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 SL(t){return vL(t,Zb)}function kb(t,e){return new wL(t,e).parseDocument()}function qo(t){let e=t.value;return Vb(t.kind)+(e!=null?` "${e}"`:"")}function Vb(t){return rL(t)?`"${t}"`:t}function IL(t){return`"${t.replace(TL,EL)}"`}function EL(t){return RL[t.charCodeAt(0)]}function ZL(t,e,n=wb){let r=new Map;for(let v of Object.values(A))r.set(v,kL(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;$y(l)||Is(!1,`Invalid AST Node: ${oh(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===CL)break;if(R===!1){if(!v){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!v))if($y(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 kL(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 xb(t){return ZL(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
  `,Ts(W(t,`
9
9
  `)),`
10
10
  }`)}function Q(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function Ts(t){return Q(" ",t.replace(/\n/g,`
11
- `))}function eg(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
12
- `)))!==null&&e!==void 0?e:!1}function Gb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Xb(t){return t.replace(/[\s,]+/g," ").trim()}function KL(t){return Xb(t.source.body.substring(t.start,t.end))}function _L(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=KL(r.loc),s=ou.get(i);s&&!s.has(o)?Lb&&console.warn("Warning: fragment with name "+i+` already exists.
11
+ `))}function tg(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
12
+ `)))!==null&&e!==void 0?e:!1}function Ob(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Lb(t){return t.replace(/[\s,]+/g," ").trim()}function KL(t){return Lb(t.source.body.substring(t.start,t.end))}function _L(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=KL(r.loc),s=ou.get(i);s&&!s.has(o)?Gb&&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||ou.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),Ws(Ws({},t),{definitions:n})}function HL(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 zL(t){var e=Xb(t);if(!Cs.has(e)){var n=Vb(t,{experimentalFragmentVariables:Us,allowLegacyFragmentVariables:Us});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Cs.set(e,HL(_L(n)))}return Cs.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]}),zL(r)}function BL(){Cs.clear(),ou.clear()}function jL(){Lb=!1}function QL(){Us=!0}function $L(){Us=!1}function lX(t,e=aX){return{PushPayload(n,r){return e(i=>t.request(Ub,n,$($({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(qL,n,$($({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(tX,n,$($({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(eX,n,$($({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(nX,n,$($({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(rX,n,$($({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(iX,n,$($({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(oX,n,$($({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(sX,n,$($({},r),i)),"GetSamplingConfig","query",n)}}}function cX(){var t=document.createElement("canvas");return t.getContext&&t.getContext("2d")?t.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function uX(){return cX()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}function ts(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 su(t,e){function n(i,o,s){if(typeof document<"u"){s=ts({},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,"",ts({},o,{expires:-1}))},withAttributes:function(i){return su(this.converter,ts({},this.attributes,i))},withConverter:function(i){return su(ts({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}function Jb(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Db(t){return t.kind==="multi"}function WX(t){return Db(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Jb(t[e].key)}`).join(":"):t.key}function UX(t){return Db(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:Jb(t[e].key)})).reduce((e,n)=>$($({},e),n),{}):t.key}function Yb(t,e){return FX(t)}function PX(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 ch(t){if(es[t])return es[t];let e=globalThis[t],n=e.prototype,r=t in pg?pg[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 dg?dg[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&&!tW())return es[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?es[t]=l:n}catch(a){return n}}function Be(t,e,n){var r;let i=`${t}.${String(n)}`;if(Uc[i])return Uc[i].call(e);let o=ch(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Uc[i]=s,s.call(e)):e[n]}function Hb(t,e,n){let r=`${t}.${String(n)}`;if(Mc[r])return Mc[r].bind(e);let i=ch(t)[n];return typeof i!="function"?e[n]:(Mc[r]=i,i.bind(e))}function eW(t){return Be("Node",t,"childNodes")}function nW(t){return Be("Node",t,"parentNode")}function rW(t){return Be("Node",t,"parentElement")}function iW(t){return Be("Node",t,"textContent")}function oW(t,e){return Hb("Node",t,"contains")(e)}function sW(t){return Hb("Node",t,"getRootNode")()}function aW(t){return!t||!("host"in t)?null:Be("ShadowRoot",t,"host")}function lW(t){return t.styleSheets}function cW(t){return!t||!("shadowRoot"in t)?null:Be("Element",t,"shadowRoot")}function uW(t,e){return Be("Element",t,"querySelector")(e)}function hW(t,e){return Be("Element",t,"querySelectorAll")(e)}function pW(){return ch("MutationObserver").constructor}function dW(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 zb(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 fW(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 mW(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 fu(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=>Bb(i,n)).join("");return fW(r)}catch(e){return null}}function Bb(t,e){if(gW(t)){let n;try{n=fu(t.styleSheet)||mW(t)}catch(r){n=t.cssText}return t.styleSheet.href?Ys(n,t.styleSheet.href):n}else{let n=t.cssText;return bW(t)&&t.selectorText.includes(":")&&(n=yW(n)),e?Ys(n,e):n}}function yW(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function gW(t){return"styleSheet"in t}function bW(t){return"selectorText"in t}function vW(){return new As}function Js({element:t,maskInputOptions:e,tagName:n,type:r,value:i,overwriteRecord:o,maskInputFn:s}){let a=i||"";return $b({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 SW(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=fg in o?o[fg]: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 Ds(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?sr(e):null}function jb(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 wW(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}function Ys(t,e){return(t||"").replace(IW,(n,r,i,o,s,a)=>{let c=i||s||a,l=r||o||"";if(!c)return n;if(TW.test(c)||EW.test(c))return`url(${l}${c}${l})`;if(RW.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${wW(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 ns(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function CW(t,e,n=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&t&&typeof t=="string"){let s=ns(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=ns(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=ns(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=ns(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 ZW(t,e){return CW(t,e).join("/* rr_split */")}function uh(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 mu(t){return t==="img"||t==="video"||t==="audio"||t==="source"}function Qb(t){return t?XW.some(e=>e.test(t)):!1}function qb(){return WW++}function MW(t){if(t instanceof HTMLFormElement)return"form";let e=sr(t.tagName);return UW.test(e)?"div":e}function AW(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(FW),!(n>=e.length);){let o=r(PW);if(o.slice(-1)===",")o=Ks(t,o.substring(0,o.length-1)),i.push(o);else{let s="";o=Ks(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 Ks(t,e){return!e||e.trim()===""?e:hh(t,e)}function JW(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function hh(t,e){let n=yg.get(t);if(n||(n=t.createElement("a"),yg.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function tv(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")?Ks(t,r):n==="srcset"?AW(t,r):n==="style"?Ys(r,hh(t)):e==="object"&&n==="data"?Ks(t,r):r)}function ev(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function gg(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 _s(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?_s(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?_s(xt.parentNode(t),e,n):!1}function nv(t,e,n,r){let i;if(zb(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(_s(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 DW(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 YW(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 KW(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=_W(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 zW(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 HW(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 _W(t,e){if(!e.hasNode(t))return;let n=e.getId(t);return n===1?void 0:n}function HW(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=Ys(u,hh(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=uh(u)),{type:Et.Text,textContent:u||"",rootId:s}}function zW(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=gg(t,r,i),I=gg(t,c,null),R=d==="strict",E=MW(t),T={},V=t.attributes.length;for(let C=0;C<V;C++){let x=t.attributes[C];ev(E,x.name)||(T[x.name]=tv(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=fu(C)),x&&(delete T.rel,delete T.href,T.Ro=x)}if(E==="style"&&t.sheet){let C=fu(t.sheet);C&&(t.childNodes.length>1&&(C=ZW(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=Js({element:t,type:Ds(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")SW(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"),mg=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,mg.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&&mu(E)){let{width:C,height:x}=t.getBoundingClientRect();T={class:T.class,rr_width:`${C}px`,rr_height:`${x}px`}}R&&mu(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:JW(t)||void 0,needBlock:v,needMask:I,rootId:b,isCustom:N}}function ft(t){return t==null?"":t.toLowerCase()}function BW(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"&&jb(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=nv(t,s,a,M===void 0));let lt=KW(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):BW(lt,f)||!ot&&lt.type===Et.Text&&!lt.textContent.replace(/^\s+|\s+$/gm,"").length?y=mi:y=qb();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&&mu(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(zb(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"&&DW(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"&&jb(g.attributes.href)==="css")&&YW(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 jW(t,e){let{mirror:n=new As,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 QW(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 e2(t){return t[0].toUpperCase()+t.slice(1)}function bu(t,e){new n2(e).stringify(t)}function vu(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=>vu(s,n)):(o==="object"&&i!==null&&(i=vu(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 pv(t){return t.map(e=>(e.nodes&&(e.nodes=pv(e.nodes)),delete e.source,e))}function dv(t){if(t[lv]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)dv(e)}function g2(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__:Z2.prototype});s.map&&(s.map=Yt(z({},s.map),{__proto__:k2.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 V2(i);if(i.type==="decl")return new C2(i);if(i.type==="rule")return new x2(i);if(i.type==="comment")return new R2(i);if(i.type==="atrule")return new E2(i);throw new Error("Unknown node type: "+t.type)}function q2(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function js(t,e){let n=new rU(t,e),r=new iU(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+=`
14
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||ou.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),Ws(Ws({},t),{definitions:n})}function HL(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 zL(t){var e=Lb(t);if(!Cs.has(e)){var n=kb(t,{experimentalFragmentVariables:Us,allowLegacyFragmentVariables:Us});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Cs.set(e,HL(_L(n)))}return Cs.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]}),zL(r)}function BL(){Cs.clear(),ou.clear()}function jL(){Gb=!1}function QL(){Us=!0}function $L(){Us=!1}function lX(t,e=aX){return{PushPayload(n,r){return e(i=>t.request(Wb,n,$($({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(qL,n,$($({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(tX,n,$($({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(eX,n,$($({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(nX,n,$($({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(rX,n,$($({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(iX,n,$($({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(oX,n,$($({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(sX,n,$($({},r),i)),"GetSamplingConfig","query",n)}}}function cX(){var t=document.createElement("canvas");return t.getContext&&t.getContext("2d")?t.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function uX(){return cX()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}function ts(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 su(t,e){function n(i,o,s){if(typeof document<"u"){s=ts({},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,"",ts({},o,{expires:-1}))},withAttributes:function(i){return su(this.converter,ts({},this.attributes,i))},withConverter:function(i){return su(ts({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}function Ab(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function Jb(t){return t.kind==="multi"}function WX(t){return Jb(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${Ab(t[e].key)}`).join(":"):t.key}function UX(t){return Jb(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:Ab(t[e].key)})).reduce((e,n)=>$($({},e),n),{}):t.key}function Db(t,e){return FX(t)}function PX(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 ch(t){if(es[t])return es[t];let e=globalThis[t],n=e.prototype,r=t in hg?hg[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 pg?pg[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&&!tW())return es[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?es[t]=l:n}catch(a){return n}}function Be(t,e,n){var r;let i=`${t}.${String(n)}`;if(Uc[i])return Uc[i].call(e);let o=ch(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Uc[i]=s,s.call(e)):e[n]}function _b(t,e,n){let r=`${t}.${String(n)}`;if(Mc[r])return Mc[r].bind(e);let i=ch(t)[n];return typeof i!="function"?e[n]:(Mc[r]=i,i.bind(e))}function eW(t){return Be("Node",t,"childNodes")}function nW(t){return Be("Node",t,"parentNode")}function rW(t){return Be("Node",t,"parentElement")}function iW(t){return Be("Node",t,"textContent")}function oW(t,e){return _b("Node",t,"contains")(e)}function sW(t){return _b("Node",t,"getRootNode")()}function aW(t){return!t||!("host"in t)?null:Be("ShadowRoot",t,"host")}function lW(t){return t.styleSheets}function cW(t){return!t||!("shadowRoot"in t)?null:Be("Element",t,"shadowRoot")}function uW(t,e){return Be("Element",t,"querySelector")(e)}function hW(t,e){return Be("Element",t,"querySelectorAll")(e)}function pW(){return ch("MutationObserver").constructor}function dW(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 Hb(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 fW(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 mW(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 fu(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=>zb(i,n)).join("");return fW(r)}catch(e){return null}}function zb(t,e){if(gW(t)){let n;try{n=fu(t.styleSheet)||mW(t)}catch(r){n=t.cssText}return t.styleSheet.href?Ys(n,t.styleSheet.href):n}else{let n=t.cssText;return bW(t)&&t.selectorText.includes(":")&&(n=yW(n)),e?Ys(n,e):n}}function yW(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function gW(t){return"styleSheet"in t}function bW(t){return"selectorText"in t}function vW(){return new As}function Js({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 SW(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=dg in o?o[dg]: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 Ds(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?sr(e):null}function Bb(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 wW(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}function Ys(t,e){return(t||"").replace(IW,(n,r,i,o,s,a)=>{let c=i||s||a,l=r||o||"";if(!c)return n;if(TW.test(c)||EW.test(c))return`url(${l}${c}${l})`;if(RW.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${wW(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 ns(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function CW(t,e,n=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&t&&typeof t=="string"){let s=ns(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=ns(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=ns(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=ns(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 ZW(t,e){return CW(t,e).join("/* rr_split */")}function uh(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 mu(t){return t==="img"||t==="video"||t==="audio"||t==="source"}function jb(t){return t?XW.some(e=>e.test(t)):!1}function $b(){return WW++}function MW(t){if(t instanceof HTMLFormElement)return"form";let e=sr(t.tagName);return UW.test(e)?"div":e}function AW(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(FW),!(n>=e.length);){let o=r(PW);if(o.slice(-1)===",")o=Ks(t,o.substring(0,o.length-1)),i.push(o);else{let s="";o=Ks(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 Ks(t,e){return!e||e.trim()===""?e:hh(t,e)}function JW(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function hh(t,e){let n=mg.get(t);if(n||(n=t.createElement("a"),mg.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function qb(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")?Ks(t,r):n==="srcset"?AW(t,r):n==="style"?Ys(r,hh(t)):e==="object"&&n==="data"?Ks(t,r):r)}function tv(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function yg(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 _s(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?_s(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?_s(xt.parentNode(t),e,n):!1}function ev(t,e,n,r){let i;if(Hb(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(_s(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 DW(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 YW(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 KW(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=_W(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 zW(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 HW(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 _W(t,e){if(!e.hasNode(t))return;let n=e.getId(t);return n===1?void 0:n}function HW(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=Ys(u,hh(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"&&jb(u);return(f||d)&&!m&&l&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(l)&&u&&(u=uh(u)),{type:Et.Text,textContent:u||"",rootId:s}}function zW(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=yg(t,r,i),I=yg(t,c,null),R=d==="strict",E=MW(t),T={},V=t.attributes.length;for(let C=0;C<V;C++){let x=t.attributes[C];tv(E,x.name)||(T[x.name]=qb(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=fu(C)),x&&(delete T.rel,delete T.href,T.Ro=x)}if(E==="style"&&t.sheet){let C=fu(t.sheet);C&&(t.childNodes.length>1&&(C=ZW(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=Js({element:t,type:Ds(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")SW(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"),fg=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,fg.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&&mu(E)){let{width:C,height:x}=t.getBoundingClientRect();T={class:T.class,rr_width:`${C}px`,rr_height:`${x}px`}}R&&mu(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:JW(t)||void 0,needBlock:v,needMask:I,rootId:b,isCustom:N}}function ft(t){return t==null?"":t.toLowerCase()}function BW(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"&&Bb(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=ev(t,s,a,M===void 0));let lt=KW(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):BW(lt,f)||!ot&&lt.type===Et.Text&&!lt.textContent.replace(/^\s+|\s+$/gm,"").length?y=mi:y=$b();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&&mu(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(Hb(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"&&DW(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"&&Bb(g.attributes.href)==="css")&&YW(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 jW(t,e){let{mirror:n=new As,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 QW(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 e2(t){return t[0].toUpperCase()+t.slice(1)}function bu(t,e){new n2(e).stringify(t)}function vu(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=>vu(s,n)):(o==="object"&&i!==null&&(i=vu(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 hv(t){return t.map(e=>(e.nodes&&(e.nodes=hv(e.nodes)),delete e.source,e))}function pv(t){if(t[av]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)pv(e)}function g2(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__:Z2.prototype});s.map&&(s.map=Yt(z({},s.map),{__proto__:k2.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 V2(i);if(i.type==="decl")return new C2(i);if(i.type==="rule")return new x2(i);if(i.type==="comment")return new R2(i);if(i.type==="atrule")return new E2(i);throw new Error("Unknown node type: "+t.type)}function q2(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function js(t,e){let n=new rU(t,e),r=new iU(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 Nv(t){let e=!1,n=fU[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 Lg(t){let e;return t.type==="document"?e=["Document",lr,"DocumentExit"]:t.type==="root"?e=["Root",lr,"RootExit"]:e=Nv(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function ku(t){return t[Se]=!1,t.nodes&&t.nodes.forEach(e=>ku(e)),t}function ht(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new wh(t)}function AU(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 KU(t){return t[0].toUpperCase()+t.slice(1)}function Gu(t,e){new _U(e).stringify(t)}function Lu(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=>Lu(s,n)):(o==="object"&&i!==null&&(i=Lu(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 Bv(t){return t.map(e=>(e.nodes&&(e.nodes=Bv(e.nodes)),delete e.source,e))}function jv(t){if(t[Kv]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)jv(e)}function aM(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__:gM.prototype});s.map&&(s.map=Yt(z({},s.map),{__proto__:bM.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 vM(i);if(i.type==="decl")return new yM(i);if(i.type==="rule")return new SM(i);if(i.type==="comment")return new mM(i);if(i.type==="atrule")return new fM(i);throw new Error("Unknown node type: "+t.type)}function DM(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function ta(t,e){let n=new HM(t,e),r=new zM(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+=`
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 xv(t){let e=!1,n=fU[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 Gg(t){let e;return t.type==="document"?e=["Document",lr,"DocumentExit"]:t.type==="root"?e=["Root",lr,"RootExit"]:e=xv(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function ku(t){return t[Se]=!1,t.nodes&&t.nodes.forEach(e=>ku(e)),t}function ht(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new wh(t)}function AU(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 KU(t){return t[0].toUpperCase()+t.slice(1)}function Gu(t,e){new _U(e).stringify(t)}function Lu(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=>Lu(s,n)):(o==="object"&&i!==null&&(i=Lu(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 zv(t){return t.map(e=>(e.nodes&&(e.nodes=zv(e.nodes)),delete e.source,e))}function Bv(t){if(t[Yv]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Bv(e)}function aM(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__:gM.prototype});s.map&&(s.map=Yt(z({},s.map),{__proto__:bM.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 vM(i);if(i.type==="decl")return new yM(i);if(i.type==="rule")return new SM(i);if(i.type==="comment")return new mM(i);if(i.type==="atrule")return new fM(i);throw new Error("Unknown node type: "+t.type)}function DM(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}function ta(t,e){let n=new HM(t,e),r=new zM(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 f0(t){let e=!1,n=iP[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=f0(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Du(t){return t[we]=!1,t.nodes&&t.nodes.forEach(e=>Du(e)),t}function pt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Nh(t)}function Oh(t){if(vs[t])return vs[t];let e=globalThis[t],n=e.prototype,r=t in $g?$g[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 qg?qg[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&&!VP())return vs[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?vs[t]=l:n}catch(a){return n}}function je(t,e,n){var r;let i=`${t}.${String(n)}`;if(Hc[i])return Hc[i].call(e);let o=Oh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Hc[i]=s,s.call(e)):e[n]}function T0(t,e,n){let r=`${t}.${String(n)}`;if(zc[r])return zc[r].bind(e);let i=Oh(t)[n];return typeof i!="function"?e[n]:(zc[r]=i,i.bind(e))}function xP(t){return je("Node",t,"childNodes")}function NP(t){return je("Node",t,"parentNode")}function OP(t){return je("Node",t,"parentElement")}function GP(t){return je("Node",t,"textContent")}function LP(t,e){return T0("Node",t,"contains")(e)}function XP(t){return T0("Node",t,"getRootNode")()}function WP(t){return!t||!("host"in t)?null:je("ShadowRoot",t,"host")}function UP(t){return t.styleSheets}function MP(t){return!t||!("shadowRoot"in t)?null:je("Element",t,"shadowRoot")}function PP(t,e){return je("Element",t,"querySelector")(e)}function FP(t,e){return je("Element",t,"querySelectorAll")(e)}function E0(){return Oh("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 va(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)}}),()=>va(t,e,o||{},!0)}function R0(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 C0(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Z0(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function k0(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=k0(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(_s(i,e,r))return!0}catch(o){}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function JP(t,e){return e.getId(t)!==-1}function Bc(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===mi}function V0(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?V0(r,e):!0}function Hu(t){return!!t.changedTouches}function DP(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 x0(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function N0(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function zu(t){return t?t instanceof _u&&"shadowRoot"in t?!!t.shadowRoot:!!q.shadowRoot(t):!1}function O0(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 YP(t){let e=t,n;for(;n=O0(e);)e=n;return e}function KP(t){let e=t.ownerDocument;if(!e)return!1;let n=YP(t);return q.contains(e,n)}function G0(t){let e=t.ownerDocument;return e?q.contains(e,t)||KP(t):!1}function eb(t){return"__ln"in t}function $u(t,e){t.delete(e),q.childNodes(e).forEach(n=>$u(t,n))}function _P(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 rb(t,e,n){return t.size===0?!1:HP(t,e)}function HP(t,e,n){let r=q.parentNode(e);return r?t.has(r):!1}function ib(t,e){return t.size===0?!1:X0(t,e)}function X0(t,e){let n=q.parentNode(e);return n?t.has(n)?!0:X0(t,n):!1}function zP(t){hi=t}function BP(){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 W0(t,e){let n=new Qu;Tn.push(n),n.init(t);let r=new(E0())(nt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function jP({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}=Hu(h)?h.changedTouches[0]:h;a||(a=ea()),s.push({x:f,y:m,id:r.getId(p),timeOffset:ea()-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 QP({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)||AP(p))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=_e.Mouse;break;case"touch":f=_e.Touch;break;case"pen":f=_e.Pen;break}f===_e.Touch&&(Jt[u]===Jt.MouseDown?m="TouchStart":Jt[u]===Jt.MouseUp&&(m="TouchEnd"))}else Hu(h)&&(f=_e.Touch);f!==null?(c=f,(m.startsWith("Touch")&&f===_e.Touch||m.startsWith("Mouse")&&f===_e.Mouse)&&(f=null)):Jt[u]===Jt.Click&&(f=c,c=null);let d=Hu(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 U0({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=R0(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 $P({viewportResizeCb:t},{win:e}){let n=-1,r=-1,i=nt(Ei(nt(()=>{let o=C0(),s=Z0();(n!==o||r!==s)&&(t({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return Pt("resize",i,e)}function tF({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||qP.indexOf(E)<0||Nt(I,r,i,!0)||I.classList.contains(o)||s&&I.matches(s))return;let T=I.value,V=!1,N=Ds(I)||"",U=I.getAttribute("data-hl-record");N==="radio"||N==="checkbox"?V=I.checked:$b({maskInputOptions:a,type:N,tagName:E,overwriteRecord:U})&&(T=Js({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=ob.get(v);if(!R||R.text!==I.text||R.isChecked!==I.isChecked){ob.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=>va(v[0],v[1],{set(){nt(h)({target:this,isTrusted:!1})}},!1,m))),nt(()=>{f.forEach(v=>v())})}function na(t){let e=[];function n(r,i){if(Ss("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ss("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ss("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ss("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 He(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function eF({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}=He(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}=He(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}=He(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}=He(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replaceSync:f}),u.apply(h,p)})}));let c={};ws("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(ws("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),ws("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),ws("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}=He(f.parentStyleSheet,e,n.styleMirror);return(v&&v!==-1||I&&I!==-1)&&t({id:v,styleId:I,adds:[{rule:d,index:[...na(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}=He(f.parentStyleSheet,e,n.styleMirror);return(b&&b!==-1||v&&v!==-1)&&t({id:b,styleId:v,removes:[{index:[...na(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 M0({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 nF({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}=He((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:na(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}=He((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:na(c.parentRule)}),a.apply(c,l)})}),nt(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function rF({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 iF({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 oF(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 sF({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 aF(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 lF(t,e={}){let n=t.doc.defaultView;if(!n)return()=>{};aF(t,e);let r;t.recordDOM&&(r=W0(t,t.doc));let i=jP(t),o=QP(t),s=U0(t),a=$P(t,{win:n}),c=tF(t),l=rF(t),u=()=>{},h=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(u=eF(t,{win:n}),h=M0(t,t.doc),p=nF(t,{win:n}),t.collectFonts&&(f=iF(t)));let m=oF(t),d=sF(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 Ss(t){return typeof window[t]<"u"}function ws(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}function hF(t,e){let n=sb.get(t);return n||(n=new Map,sb.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}function Os(t,e,n){if(t instanceof Array)return t.map(r=>Os(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=uF(t);return{rr_type:r,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Os(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:[Os(t.data,e,n),t.width,t.height]};if(A0(t,e)||typeof t=="object"){let r=t.constructor.name,i=P0(t,e,n);return{rr_type:r,index:i}}}}return t}function pF(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=F0(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=va(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 dF(t){return t==="experimental-webgl"?"webgl":t}function ab(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=dF(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 lb(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(P0(p,o,this),"tagName"in this.canvas&&!Nt(this.canvas,r,i,!0)){let f=F0(h,o,this),m={type:e,property:c,args:f};n(this.canvas,m)}return p}});s.push(l)}catch(l){let u=va(t,c,{set(h){n(this.canvas,{type:e,property:c,args:[h],setter:!0})}});s.push(u)}return s}function fF(t,e,n,r){let i=[];return i.push(...lb(e.WebGLRenderingContext.prototype,dr.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...lb(e.WebGL2RenderingContext.prototype,dr.WebGL2,t,n,r,e)),()=>{i.forEach(o=>o())}}function yF(t){let e;try{if(e=cb&&(self.URL||self.webkitURL).createObjectURL(cb),!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,"+J0,{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=uh,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:K0,logger:_0}=t,Oi=z(z({},t.dataURLOptions),(n=(e=t.sampling)==null?void 0:e.canvas)==null?void 0:n.dataURLOptions);zP(K0);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 Sa=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},wa=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||{};DP();let Gh,Ia=0,Lh=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=ea(),(gt=Tn[0])!=null&&gt.isFrozen()&&bt.type!==rt.FullSnapshot&&!(bt.type===rt.IncrementalSnapshot&&bt.data.source===et.Mutation)&&Tn.forEach(pe=>pe.unfreeze()),Gi)l==null||l(Lh(bt),oe);else if(mr){let pe={type:"rrweb",event:Lh(bt),origin:window.location.origin,isCheckout:oe};window.parent.postMessage(pe,"*")}if(bt.type===rt.FullSnapshot)Gh=bt,Ia=0;else if(bt.type===rt.IncrementalSnapshot){if(bt.data.source===et.Mutation&&bt.data.isAttachIframe)return;Ia++;let pe=h&&Ia>=h,dt=u&&bt.timestamp-Gh.timestamp>u;(pe||dt)&&Gs(!0)}};let Li=st=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Mutation},st)})},Xh=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Scroll},st)}),Wh=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.CanvasMutation},st)}),H0=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.AdoptedStyleSheet},st)}),Qe=new nh({mutationCb:Li,adoptedStyleSheetCb:H0}),$e=new qu({mirror:ce,mutationCb:Li,stylesheetManager:Qe,recordCrossOriginIframes:y,wrappedEmit:vt});for(let st of it||[])st.getMirror&&st.getMirror({nodeMirror:ce,crossOriginIframeMirror:$e.crossOriginIframeMirror,crossOriginIframeStyleMirror:$e.crossOriginIframeStyleMirror});let Ta=new rh;pi=new eh({recordCanvas:lt,recordLocalVideos:P,recordRemoteVideos:O,mutationCb:Wh,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:_0});let Xi=new th({mutationCb:Li,scrollCb:Xh,bypassOptions:{blockClass:p,blockSelector:f,maskTextClass:b,maskTextSelector:v,inlineStylesheet:I,maskInputOptions:Sa,dataURLOptions:Oi,maskTextFn:N,maskInputFn:V,recordCanvas:lt,inlineImages:P,inlineVideos:O,privacySetting:Ot,sampling:x,slimDOMOptions:wa,iframeManager:$e,stylesheetManager:Qe,canvasManager:pi,keepIframeSrcFn:ct,processedNodeManager:Ta},mirror:ce});Gs=(st=!1)=>{if(!ot)return;vt({type:rt.Meta,data:{href:window.location.href,width:Z0(),height:C0()}},st),Qe.reset(),Xi.init(),Tn.forEach(gt=>gt.lock());let oe=jW(document,{mirror:ce,blockClass:p,blockSelector:f,maskTextClass:b,maskTextSelector:v,inlineStylesheet:I,maskAllInputs:Sa,maskTextFn:N,maskInputFn:V,slimDOM:wa,dataURLOptions:Oi,recordCanvas:lt,inlineImages:P,inlineVideos:O,privacySetting:Ot,onSerialize:gt=>{x0(gt,ce)&&$e.addIframe(gt),N0(gt,ce)&&Qe.trackLinkElement(gt),zu(gt)&&Xi.addShadowRoot(q.shadowRoot(gt),document)},onIframeLoad:(gt,bt)=>{$e.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:R0(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(lF)({mutationCb:Li,mousemoveCb:(dt,Ea)=>vt({type:rt.IncrementalSnapshot,data:{source:Ea,positions:dt}}),mouseInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MouseInteraction},dt)}),scrollCb:Xh,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:Wh,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:Sa,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:wa,dataURLOptions:Oi,mirror:ce,iframeManager:$e,stylesheetManager:Qe,shadowDomManager:Xi,processedNodeManager:Ta,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:Ea=>vt({type:rt.Plugin,data:{plugin:dt.name,payload:Ea}})})))||[]},U)};$e.addLoadListener(bt=>{try{st.push(oe(bt.contentDocument))}catch(pe){console.warn(pe)}});let gt=()=>{Gs(),st.push(oe(document)),ia=!0};return document.readyState==="interactive"||document.readyState==="complete"?gt():(st.push(Pt("DOMContentLoaded",()=>{vt({type:rt.DomContentLoaded,data:{}}),g==="DOMContentLoaded"&&gt()})),st.push(Pt("load",()=>{vt({type:rt.Load,data:{}}),g==="load"&&gt()},window))),()=>{st.forEach(bt=>bt()),Ta.destroy(),ia=!1,BP()}}catch(st){console.warn(st)}}function RF(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 kF(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 VF(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 NF(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=db[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[db[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 WF(t){let e;try{if(e=yb&&(self.URL||self.webkitURL).createObjectURL(yb),!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)}}var UG,MG,Oe,PG,zt,FG,gb,Bn,AG,JG,DG,Ls,bb,vb,$c,$,rr,ai,di,ir,HG,tu,jG,wb,Ib,QG,tr,eu,A,w,nL,dL,Zb,vL,kb,wL,TL,RL,CL,VL,xL,sh,NL,OL,GL,LL,XL,ng,Gc,Ob,WL,ru,Xs,Rs,UL,jn,rg,ML,PL,FL,Lc,AL,JL,Xc,iu,DL,YL,Ws,Cs,ou,Lb,Us,jr,Wb,Ub,qL,tX,eX,nX,rX,iX,oX,sX,aX,Mb,ig,hX,pX,Pb,og,dX,sg,fX,mX,yX,gX,bX,Wc,au,ah,lu,vX,cu,aa,Ms,lh,SX,ag,ie,ze,uu,wX,Ht,la,IX,TX,Fb,li,EX,Zs,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...n)=>{let r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),FG(r,...n)},FG=(t,...e)=>PG(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>(jy(),By));n.recordLog(`${t}${e}`,"warn")}catch(n){}}),gb=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 gb)}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=[]}},AG=Object.defineProperty,JG=Object.defineProperties,DG=Object.getOwnPropertyDescriptors,Ls=Object.getOwnPropertySymbols,bb=Object.prototype.hasOwnProperty,vb=Object.prototype.propertyIsEnumerable,$c=(t,e,n)=>e in t?AG(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))bb.call(e,n)&&$c(t,n,e[n]);if(Ls)for(var n of Ls(e))vb.call(e,n)&&$c(t,n,e[n]);return t},rr=(t,e)=>JG(t,DG(e)),ai=(t,e)=>{var n={};for(var r in t)bb.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ls)for(var r of Ls(t))e.indexOf(r)<0&&vb.call(t,r)&&(n[r]=t[r]);return n},di=(t,e,n)=>$c(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())});HG=/\r\n|[\n\r]/g;tu=class t extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=BG(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=$y(Array.isArray(s)?s:s?[s]:void 0);let p=$y((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=>qc(a,m)):p==null?void 0:p.map(m=>qc(m.source,m.start));let f=KG(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 d0(t){let e=!1,n=iP[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 jg(t){let e;return t.type==="document"?e=["Document",hr,"DocumentExit"]:t.type==="root"?e=["Root",hr,"RootExit"]:e=d0(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Du(t){return t[we]=!1,t.nodes&&t.nodes.forEach(e=>Du(e)),t}function pt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Nh(t)}function Oh(t){if(vs[t])return vs[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 $g?$g[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&&!VP())return vs[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?vs[t]=l:n}catch(a){return n}}function je(t,e,n){var r;let i=`${t}.${String(n)}`;if(Hc[i])return Hc[i].call(e);let o=Oh(t),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Hc[i]=s,s.call(e)):e[n]}function I0(t,e,n){let r=`${t}.${String(n)}`;if(zc[r])return zc[r].bind(e);let i=Oh(t)[n];return typeof i!="function"?e[n]:(zc[r]=i,i.bind(e))}function xP(t){return je("Node",t,"childNodes")}function NP(t){return je("Node",t,"parentNode")}function OP(t){return je("Node",t,"parentElement")}function GP(t){return je("Node",t,"textContent")}function LP(t,e){return I0("Node",t,"contains")(e)}function XP(t){return I0("Node",t,"getRootNode")()}function WP(t){return!t||!("host"in t)?null:je("ShadowRoot",t,"host")}function UP(t){return t.styleSheets}function MP(t){return!t||!("shadowRoot"in t)?null:je("Element",t,"shadowRoot")}function PP(t,e){return je("Element",t,"querySelector")(e)}function FP(t,e){return je("Element",t,"querySelectorAll")(e)}function T0(){return Oh("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 va(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)}}),()=>va(t,e,o||{},!0)}function E0(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 R0(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function C0(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Z0(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=Z0(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(_s(i,e,r))return!0}catch(o){}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function JP(t,e){return e.getId(t)!==-1}function Bc(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===mi}function k0(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?k0(r,e):!0}function Hu(t){return!!t.changedTouches}function DP(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 V0(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function x0(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function zu(t){return t?t instanceof _u&&"shadowRoot"in t?!!t.shadowRoot:!!q.shadowRoot(t):!1}function N0(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 YP(t){let e=t,n;for(;n=N0(e);)e=n;return e}function KP(t){let e=t.ownerDocument;if(!e)return!1;let n=YP(t);return q.contains(e,n)}function O0(t){let e=t.ownerDocument;return e?q.contains(e,t)||KP(t):!1}function tb(t){return"__ln"in t}function $u(t,e){t.delete(e),q.childNodes(e).forEach(n=>$u(t,n))}function _P(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 nb(t,e,n){return t.size===0?!1:HP(t,e)}function HP(t,e,n){let r=q.parentNode(e);return r?t.has(r):!1}function rb(t,e){return t.size===0?!1:L0(t,e)}function L0(t,e){let n=q.parentNode(e);return n?t.has(n)?!0:L0(t,n):!1}function zP(t){hi=t}function BP(){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 X0(t,e){let n=new Qu;Tn.push(n),n.init(t);let r=new(T0())(nt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function jP({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}=Hu(h)?h.changedTouches[0]:h;a||(a=ea()),s.push({x:f,y:m,id:r.getId(p),timeOffset:ea()-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 QP({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)||AP(p))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=_e.Mouse;break;case"touch":f=_e.Touch;break;case"pen":f=_e.Pen;break}f===_e.Touch&&(Jt[u]===Jt.MouseDown?m="TouchStart":Jt[u]===Jt.MouseUp&&(m="TouchEnd"))}else Hu(h)&&(f=_e.Touch);f!==null?(c=f,(m.startsWith("Touch")&&f===_e.Touch||m.startsWith("Mouse")&&f===_e.Mouse)&&(f=null)):Jt[u]===Jt.Click&&(f=c,c=null);let d=Hu(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 W0({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=E0(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 $P({viewportResizeCb:t},{win:e}){let n=-1,r=-1,i=nt(Ei(nt(()=>{let o=R0(),s=C0();(n!==o||r!==s)&&(t({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return Pt("resize",i,e)}function tF({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||qP.indexOf(E)<0||Nt(I,r,i,!0)||I.classList.contains(o)||s&&I.matches(s))return;let T=I.value,V=!1,N=Ds(I)||"",U=I.getAttribute("data-hl-record");N==="radio"||N==="checkbox"?V=I.checked:Qb({maskInputOptions:a,type:N,tagName:E,overwriteRecord:U})&&(T=Js({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=ib.get(v);if(!R||R.text!==I.text||R.isChecked!==I.isChecked){ib.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=>va(v[0],v[1],{set(){nt(h)({target:this,isTrusted:!1})}},!1,m))),nt(()=>{f.forEach(v=>v())})}function na(t){let e=[];function n(r,i){if(Ss("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ss("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ss("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ss("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 He(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function eF({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}=He(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}=He(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}=He(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}=He(h,e,n.styleMirror);return(m&&m!==-1||d&&d!==-1)&&t({id:m,styleId:d,replaceSync:f}),u.apply(h,p)})}));let c={};ws("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(ws("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),ws("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),ws("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}=He(f.parentStyleSheet,e,n.styleMirror);return(v&&v!==-1||I&&I!==-1)&&t({id:v,styleId:I,adds:[{rule:d,index:[...na(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}=He(f.parentStyleSheet,e,n.styleMirror);return(b&&b!==-1||v&&v!==-1)&&t({id:b,styleId:v,removes:[{index:[...na(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 U0({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 nF({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}=He((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:na(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}=He((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:na(c.parentRule)}),a.apply(c,l)})}),nt(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function rF({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 iF({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 oF(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 sF({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 aF(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 lF(t,e={}){let n=t.doc.defaultView;if(!n)return()=>{};aF(t,e);let r;t.recordDOM&&(r=X0(t,t.doc));let i=jP(t),o=QP(t),s=W0(t),a=$P(t,{win:n}),c=tF(t),l=rF(t),u=()=>{},h=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(u=eF(t,{win:n}),h=U0(t,t.doc),p=nF(t,{win:n}),t.collectFonts&&(f=iF(t)));let m=oF(t),d=sF(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 Ss(t){return typeof window[t]<"u"}function ws(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}function hF(t,e){let n=ob.get(t);return n||(n=new Map,ob.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}function Os(t,e,n){if(t instanceof Array)return t.map(r=>Os(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=uF(t);return{rr_type:r,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Os(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:[Os(t.data,e,n),t.width,t.height]};if(F0(t,e)||typeof t=="object"){let r=t.constructor.name,i=M0(t,e,n);return{rr_type:r,index:i}}}}return t}function pF(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=P0(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=va(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 dF(t){return t==="experimental-webgl"?"webgl":t}function sb(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=dF(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 ab(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(M0(p,o,this),"tagName"in this.canvas&&!Nt(this.canvas,r,i,!0)){let f=P0(h,o,this),m={type:e,property:c,args:f};n(this.canvas,m)}return p}});s.push(l)}catch(l){let u=va(t,c,{set(h){n(this.canvas,{type:e,property:c,args:[h],setter:!0})}});s.push(u)}return s}function fF(t,e,n,r){let i=[];return i.push(...ab(e.WebGLRenderingContext.prototype,dr.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...ab(e.WebGL2RenderingContext.prototype,dr.WebGL2,t,n,r,e)),()=>{i.forEach(o=>o())}}function yF(t){let e;try{if(e=lb&&(self.URL||self.webkitURL).createObjectURL(lb),!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,"+A0,{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=uh,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:Y0,logger:K0}=t,Oi=z(z({},t.dataURLOptions),(n=(e=t.sampling)==null?void 0:e.canvas)==null?void 0:n.dataURLOptions);zP(Y0);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 Sa=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},wa=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||{};DP();let Gh,Ia=0,Lh=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=ea(),(gt=Tn[0])!=null&&gt.isFrozen()&&bt.type!==rt.FullSnapshot&&!(bt.type===rt.IncrementalSnapshot&&bt.data.source===et.Mutation)&&Tn.forEach(pe=>pe.unfreeze()),Gi)l==null||l(Lh(bt),oe);else if(mr){let pe={type:"rrweb",event:Lh(bt),origin:window.location.origin,isCheckout:oe};window.parent.postMessage(pe,"*")}if(bt.type===rt.FullSnapshot)Gh=bt,Ia=0;else if(bt.type===rt.IncrementalSnapshot){if(bt.data.source===et.Mutation&&bt.data.isAttachIframe)return;Ia++;let pe=h&&Ia>=h,dt=u&&bt.timestamp-Gh.timestamp>u;(pe||dt)&&Gs(!0)}};let Li=st=>{vt({type:rt.IncrementalSnapshot,data:z({source:et.Mutation},st)})},Xh=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.Scroll},st)}),Wh=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.CanvasMutation},st)}),_0=st=>vt({type:rt.IncrementalSnapshot,data:z({source:et.AdoptedStyleSheet},st)}),Qe=new nh({mutationCb:Li,adoptedStyleSheetCb:_0}),$e=new qu({mirror:ce,mutationCb:Li,stylesheetManager:Qe,recordCrossOriginIframes:y,wrappedEmit:vt});for(let st of it||[])st.getMirror&&st.getMirror({nodeMirror:ce,crossOriginIframeMirror:$e.crossOriginIframeMirror,crossOriginIframeStyleMirror:$e.crossOriginIframeStyleMirror});let Ta=new rh;pi=new eh({recordCanvas:lt,recordLocalVideos:P,recordRemoteVideos:O,mutationCb:Wh,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:K0});let Xi=new th({mutationCb:Li,scrollCb:Xh,bypassOptions:{blockClass:p,blockSelector:f,maskTextClass:b,maskTextSelector:v,inlineStylesheet:I,maskInputOptions:Sa,dataURLOptions:Oi,maskTextFn:N,maskInputFn:V,recordCanvas:lt,inlineImages:P,inlineVideos:O,privacySetting:Ot,sampling:x,slimDOMOptions:wa,iframeManager:$e,stylesheetManager:Qe,canvasManager:pi,keepIframeSrcFn:ct,processedNodeManager:Ta},mirror:ce});Gs=(st=!1)=>{if(!ot)return;vt({type:rt.Meta,data:{href:window.location.href,width:C0(),height:R0()}},st),Qe.reset(),Xi.init(),Tn.forEach(gt=>gt.lock());let oe=jW(document,{mirror:ce,blockClass:p,blockSelector:f,maskTextClass:b,maskTextSelector:v,inlineStylesheet:I,maskAllInputs:Sa,maskTextFn:N,maskInputFn:V,slimDOM:wa,dataURLOptions:Oi,recordCanvas:lt,inlineImages:P,inlineVideos:O,privacySetting:Ot,onSerialize:gt=>{V0(gt,ce)&&$e.addIframe(gt),x0(gt,ce)&&Qe.trackLinkElement(gt),zu(gt)&&Xi.addShadowRoot(q.shadowRoot(gt),document)},onIframeLoad:(gt,bt)=>{$e.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:E0(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(lF)({mutationCb:Li,mousemoveCb:(dt,Ea)=>vt({type:rt.IncrementalSnapshot,data:{source:Ea,positions:dt}}),mouseInteractionCb:dt=>vt({type:rt.IncrementalSnapshot,data:z({source:et.MouseInteraction},dt)}),scrollCb:Xh,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:Wh,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:Sa,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:wa,dataURLOptions:Oi,mirror:ce,iframeManager:$e,stylesheetManager:Qe,shadowDomManager:Xi,processedNodeManager:Ta,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:Ea=>vt({type:rt.Plugin,data:{plugin:dt.name,payload:Ea}})})))||[]},U)};$e.addLoadListener(bt=>{try{st.push(oe(bt.contentDocument))}catch(pe){console.warn(pe)}});let gt=()=>{Gs(),st.push(oe(document)),ia=!0};return document.readyState==="interactive"||document.readyState==="complete"?gt():(st.push(Pt("DOMContentLoaded",()=>{vt({type:rt.DomContentLoaded,data:{}}),g==="DOMContentLoaded"&&gt()})),st.push(Pt("load",()=>{vt({type:rt.Load,data:{}}),g==="load"&&gt()},window))),()=>{st.forEach(bt=>bt()),Ta.destroy(),ia=!1,BP()}}catch(st){console.warn(st)}}function RF(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 kF(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 VF(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 NF(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=pb[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[pb[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 WF(t){let e;try{if(e=mb&&(self.URL||self.webkitURL).createObjectURL(mb),!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)}}var UG,MG,Oe,PG,zt,FG,yb,Bn,AG,JG,DG,Ls,gb,bb,$c,$,rr,ai,di,ir,HG,tu,jG,Sb,wb,QG,tr,eu,A,w,nL,dL,Cb,vL,Zb,wL,TL,RL,CL,VL,xL,sh,NL,OL,GL,LL,XL,eg,Gc,Nb,WL,ru,Xs,Rs,UL,jn,ng,ML,PL,FL,Lc,AL,JL,Xc,iu,DL,YL,Ws,Cs,ou,Gb,Us,jr,Xb,Wb,qL,tX,eX,nX,rX,iX,oX,sX,aX,Ub,rg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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]),FG(r,...n)},FG=(t,...e)=>PG(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>(By(),zy));n.recordLog(`${t}${e}`,"warn")}catch(n){}}),yb=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 yb)}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=[]}},AG=Object.defineProperty,JG=Object.defineProperties,DG=Object.getOwnPropertyDescriptors,Ls=Object.getOwnPropertySymbols,gb=Object.prototype.hasOwnProperty,bb=Object.prototype.propertyIsEnumerable,$c=(t,e,n)=>e in t?AG(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))gb.call(e,n)&&$c(t,n,e[n]);if(Ls)for(var n of Ls(e))bb.call(e,n)&&$c(t,n,e[n]);return t},rr=(t,e)=>JG(t,DG(e)),ai=(t,e)=>{var n={};for(var r in t)gb.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ls)for(var r of Ls(t))e.indexOf(r)<0&&bb.call(t,r)&&(n[r]=t[r]);return n},di=(t,e,n)=>$c(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())});HG=/\r\n|[\n\r]/g;tu=class t extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=BG(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=>qc(a,m)):p==null?void 0:p.map(m=>qc(m.source,m.start));let f=KG(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
  `+zG(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
25
25
 
26
- `+Sb(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}};jG=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}}},wb=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}}},Ib={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"]},QG=new Set(Object.keys(Ib));(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"})(eu||(eu={}));(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={}));nL=class{constructor(t){let e=new wb(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=iL(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===w.COMMENT);return t}};dL=10,Zb=2;vL=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=oh(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
26
+ `+vb(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}};jG=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}}},Sb=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}}},wb={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"]},QG=new Set(Object.keys(wb));(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"})(eu||(eu={}));(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={}));nL=class{constructor(t){let e=new Sb(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=iL(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===w.COMMENT);return t}};dL=10,Cb=2;vL=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=oh(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},kb=class{constructor(t,e="GraphQL request",n={line:1,column:1}){typeof t=="string"||Is(!1,`Body must be a string. Received: ${oh(t)}.`),this.body=t,this.name=e,this.locationOffset=n,this.locationOffset.line>0||Is(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Is(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};wL=class{constructor(t,e={}){let n=SL(t)?t:new kb(t);this.l=new nL(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,`${qo(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(eu,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Rn.noLocation!==!0&&(e.loc=new jG(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 ${xb(t)}, found ${qo(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 ${qo(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 ${qo(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.`)}};TL=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;RL=["\\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"],CL=Object.freeze({});VL=80,xL={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>W(t.definitions,`
37
+ spurious results.`)}}return!1},Zb=class{constructor(t,e="GraphQL request",n={line:1,column:1}){typeof t=="string"||Is(!1,`Body must be a string. Received: ${oh(t)}.`),this.body=t,this.name=e,this.locationOffset=n,this.locationOffset.line>0||Is(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Is(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};wL=class{constructor(t,e={}){let n=SL(t)?t:new Zb(t);this.l=new nL(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,`${qo(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(eu,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Rn.noLocation!==!0&&(e.loc=new jG(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 ${Vb(t)}, found ${qo(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 ${qo(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 ${qo(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.`)}};TL=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;RL=["\\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"],CL=Object.freeze({});VL=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>VL&&(s=o+Q(`(
40
40
  `,Ts(W(n,`
@@ -43,7 +43,7 @@ spurious results.`)}}return!1},kb=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+(eg(n)?Q(`(
46
+ `)+e+(tg(n)?Q(`(
47
47
  `,Ts(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},kb=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+(eg(n)?Q(`(
56
+ `)+"directive @"+e+(tg(n)?Q(`(
57
57
  `,Ts(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)]," ")}};sh=JSON,NL=t=>t.toUpperCase(),OL=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},GL=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},LL=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},XL=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},ng=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},Gc=t=>{if(typeof t=="string"){let n;try{let r=Vb(t);n=ng(r)}catch(r){}return{query:t,operationName:n}}let e=ng(t);return{query:Nb(t),operationName:e}},Ob=class Es extends Error{constructor(e,n){let r=`${Es.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Es.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Es)}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})`}},WL=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};ru={exports:{}};(function(t,e){var n=typeof self<"u"?self:WL,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})(ru,ru.exports);Xs=ru.exports,Rs=Gb(Xs),UL=YG({__proto__:null,default:Rs},[Xs]),jn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||UL&&Xs.Headers&&t instanceof Xs.Headers?e=OL(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},rg=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),ML=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(rg(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:rg(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},PL=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=AL(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=ML({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:sh});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)}),FL=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>ir(this,null,function*(){let[r,i,o]=n,s=LL(r,i,o),a=this.requestConfig,{headers:c,fetch:l=Rs,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}=Gc(s.query);return Lc({url:m,query:s.query,variables:s.variables,headers:$($({},jn(Xc(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=GL(t,n,r),o=this.requestConfig,{headers:s,fetch:a=Rs,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}=Gc(i.document);return Lc({url:p,query:f,variables:i.variables,headers:$($({},jn(Xc(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=XL(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})=>Gc(l).query),c=r.documents.map(({variables:l})=>l);return Lc({url:this.url,query:a,variables:c,headers:$($({},jn(Xc(o))),jn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:Rs,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}},Lc=t=>ir(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=PL(NL((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield JL(c,(n=o.jsonSerializer)!=null?n:sh),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 Ob(rr($({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),AL=(t,e,n,r)=>{let i=r!=null?r:sh;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)},JL=(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()}),Xc=t=>typeof t=="function"?t():t,iu={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)}}})(iu,iu.exports);DL=iu.exports,YL=Gb(DL),Ws=function(){return Ws=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},Ws.apply(this,arguments)},Cs=new Map,ou=new Map,Lb=!0,Us=!1;jr={gql:Ft,resetCaches:BL,disableFragmentWarnings:jL,enableExperimentalFragmentVariables:QL,disableExperimentalFragmentVariables:$L};(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;Wb=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)]," ")}};sh=JSON,NL=t=>t.toUpperCase(),OL=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},GL=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},LL=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},XL=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},eg=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},Gc=t=>{if(typeof t=="string"){let n;try{let r=kb(t);n=eg(r)}catch(r){}return{query:t,operationName:n}}let e=eg(t);return{query:xb(t),operationName:e}},Nb=class Es extends Error{constructor(e,n){let r=`${Es.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Es.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Es)}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})`}},WL=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};ru={exports:{}};(function(t,e){var n=typeof self<"u"?self:WL,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})(ru,ru.exports);Xs=ru.exports,Rs=Ob(Xs),UL=YG({__proto__:null,default:Rs},[Xs]),jn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||UL&&Xs.Headers&&t instanceof Xs.Headers?e=OL(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},ng=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),ML=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(ng(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:ng(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},PL=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=AL(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=ML({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:sh});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)}),FL=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>ir(this,null,function*(){let[r,i,o]=n,s=LL(r,i,o),a=this.requestConfig,{headers:c,fetch:l=Rs,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}=Gc(s.query);return Lc({url:m,query:s.query,variables:s.variables,headers:$($({},jn(Xc(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=GL(t,n,r),o=this.requestConfig,{headers:s,fetch:a=Rs,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}=Gc(i.document);return Lc({url:p,query:f,variables:i.variables,headers:$($({},jn(Xc(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=XL(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})=>Gc(l).query),c=r.documents.map(({variables:l})=>l);return Lc({url:this.url,query:a,variables:c,headers:$($({},jn(Xc(o))),jn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:Rs,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}},Lc=t=>ir(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=PL(NL((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield JL(c,(n=o.jsonSerializer)!=null?n:sh),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 Nb(rr($({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),AL=(t,e,n,r)=>{let i=r!=null?r:sh;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)},JL=(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()}),Xc=t=>typeof t=="function"?t():t,iu={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)}}})(iu,iu.exports);DL=iu.exports,YL=Ob(DL),Ws=function(){return Ws=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},Ws.apply(this,arguments)},Cs=new Map,ou=new Map,Gb=!0,Us=!1;jr={gql:Ft,resetCaches:BL,disableFragmentWarnings:jL,enableExperimentalFragmentVariables:QL,disableExperimentalFragmentVariables:$L};(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;Xb=Ft`
60
60
  fragment MatchParts on MatchConfig {
61
61
  regexValue
62
62
  matchValue
63
63
  }
64
- `,Ub=Ft`
64
+ `,Wb=Ft`
65
65
  mutation PushPayload(
66
66
  $session_secure_id: String!
67
67
  $payload_id: ID!
@@ -226,7 +226,7 @@ spurious results.`)}}return!1},kb=class{constructor(t,e="GraphQL request",n={lin
226
226
  }
227
227
  }
228
228
  }
229
- ${Wb}
229
+ ${Xb}
230
230
  `,oX=Ft`
231
231
  query Ignore($id: ID!) {
232
232
  ignore(id: $id)
@@ -280,82 +280,82 @@ spurious results.`)}}return!1},kb=class{constructor(t,e="GraphQL request",n={lin
280
280
  }
281
281
  }
282
282
  }
283
- ${Wb}
284
- `,aX=(t,e,n,r)=>t();Mb=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Mb||{});ig=1e3,hX=1e3*2,pX=14400*1e3,Pb=900*1e3,og={normal:{bytes:1e7,time:240*1e3},canvas:{bytes:16e6,time:5e3}},dX=100,sg="app.highlight.io",fX="app.launchdarkly.com",mX={"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"},yX="/projects/default",gX=new RegExp("pub\\.(?<domain>.+)");bX={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)}};Wc=su(bX,{path:"/"}),au=(t=>(t.CLIENT_ID="highlightClientID",t))(au||{}),ah="localStorage",lu=!0,vX=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]}},cu=class{getItem(e){var n;return(n=Wc.get(e))!=null?n:""}setItem(e,n){if(!lu)return;let r=new Date;r.setTime(r.getTime()+Pb),Wc.set(e,n,{expires:r})}removeItem(e){lu&&Wc.remove(e)}},aa=new vX,Ms=new cu,lh=()=>{try{switch(ah){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return aa}},SX=t=>{ah=t},ag=t=>{lu=t},ie=t=>{try{return lh().getItem(t)}catch(e){return zt("storage","debug",`failed to get item ${t}; using global storage`,e),aa.getItem(t)}},ze=(t,e)=>{Ms.setItem(t,e);try{return lh().setItem(t,e)}catch(n){return zt("storage","debug",`failed to set item ${t}; using global storage`,n),aa.setItem(t,e)}},uu=t=>{Ms.removeItem(t);try{return lh().removeItem(t)}catch(e){return zt("storage","debug",`failed to remove item ${t}; using global storage`,e),aa.removeItem(t)}},wX=t=>{if(ah==="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||{}),la=t=>`${Ht.SESSION_DATA}_${t}`,IX=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Fb()},TX=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Fb=()=>{var t;return(t=ie(Ht.SESSION_ID))!=null?t:""},li=t=>{ze(Ht.SESSION_ID,t)},EX=t=>{let e=la(t);return JSON.parse(ie(e)||"{}")},Zs=t=>{t||(t=Fb());let e=EX(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<Pb)return e;uu(la(t))},wn=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;TX(e),ze(la(e),JSON.stringify(t))},RX=function(){let t=Ms.getItem(Ht.SESSION_ID);li(t);let e=la(t),n=Ms.getItem(e);try{wn(JSON.parse(n))}catch(r){}},Ab=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Ab||{}),CX=10,ZX=1e3,kX=500,VX=[Ab.BillingQuotaExceeded.toString()],xX=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>VX.includes(n.message)))===void 0},NX=()=>{let t=(e,n,r,i,o=0)=>ir(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof Ob&&!xX(s))throw s;if(o<CX)return yield new Promise(a=>setTimeout(a,ZX+kX*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},OX="$ld:telemetry:session:init",GX="$ld:telemetry:error",lg="$ld:telemetry:track",LX="$ld:telemetry:metric",XX="document_load";MX=class{constructor(t,e){di(this,"client"),di(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(OX,{sessionID:t})}recordGauge(t,e){var n;e.category!==Mb.WebVital&&e.name!==XX||e.name!=="Jank"&&this.client.track(`${LX}:${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(GX,rr($({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${lg}:${n}`:lg,rr($({},e),{sessionID:t}))}},hu=class extends Bn{constructor(e,n){super(),di(this,"client"),this.client=new MX(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])}};FX=t=>{let e="",n=t.getAttribute("class"),r=t.getAttribute("id");return r&&(e=e.concat(cg(r,"#"))),n&&(e=e.concat(cg(n,"."))),e===""&&(e=e.concat(t.tagName.toLowerCase())),e},cg=(t,e)=>`${e}${t.trim().split(" ").join(e)}`,AX=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)},pu=()=>{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},JX=class{constructor(t){di(this,"sessionSecureID");try{t!=null&&t.storageMode&&SX(t==null?void 0:t.storageMode),ag(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?RX():ag(!1);let e=IX(),n=Zs(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=pu(),li(this.sessionSecureID),wn({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){zt("Error initializing @launchdarkly observability plugin","error",e)}}},DX=(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())}),Ps=class extends Bn{getSession(){return this.Ln?this.h("getSession",[]):null}start(e){return DX(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?In=globalThis.LDRecord:(In=new Ps,globalThis.LDRecord=In):In=new Ps;YX=Object.defineProperty,KX=Object.defineProperties,_X=Object.getOwnPropertyDescriptors,Fs=Object.getOwnPropertySymbols,Kb=Object.prototype.hasOwnProperty,_b=Object.prototype.propertyIsEnumerable,du=(t,e,n)=>e in t?YX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,z=(t,e)=>{for(var n in e||(e={}))Kb.call(e,n)&&du(t,n,e[n]);if(Fs)for(var n of Fs(e))_b.call(e,n)&&du(t,n,e[n]);return t},Yt=(t,e)=>KX(t,_X(e)),or=(t,e)=>{var n={};for(var r in t)Kb.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fs)for(var r of Fs(t))e.indexOf(r)<0&&_b.call(t,r)&&(n[r]=t[r]);return n},Y=(t,e,n)=>du(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())}),HX={key:"_sid"},zX="rrweb/sequential-id@1",BX=t=>{let e=HX,n=0;return{name:zX,eventProcessor(r){return Object.assign(r,{[e.key]:++n}),r},options:e}},jX=Object.defineProperty,QX=(t,e,n)=>e in t?jX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k=(t,e,n)=>QX(t,typeof e!="symbol"?e+"":e,n),$X=Object.defineProperty,qX=(t,e,n)=>e in t?$X(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hg=(t,e,n)=>qX(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||{}),pg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},dg={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},es={},tW=()=>!!globalThis.Zone;Uc={};Mc={};xt={childNodes:eW,parentNode:nW,parentElement:rW,textContent:iW,contains:oW,getRootNode:sW,host:aW,styleSheets:lW,shadowRoot:cW,querySelector:uW,querySelectorAll:hW,mutationObserver:pW,patch:dW};As=class{constructor(){hg(this,"idNodeMap",new Map),hg(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}};fg="__rrweb_original__";IW=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,TW=/^(?:[a-z+]+:)?\/\//i,EW=/^www\..*/i,RW=/^(data:)([^,]*),(.*)/i;kW=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),VW=new RegExp(/[0-9]{9,16}/),xW=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),NW=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),OW=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),GW=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),LW=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),XW=[kW,VW,xW,NW,OW,GW,LW];$b=({maskInputOptions:t,tagName:e,type:n,overwriteRecord:r})=>{let i=n&&n.toLowerCase();return r!=="true"&&(!!t[e.toLowerCase()]||!!(i&&t[i]))},WW=1,UW=new RegExp("[^a-z0-9-_:]"),mi=-2;PW=/^[^ \t\n\r\u000c]+/,FW=/^[, \t\n\r\u000c]+/;yg=new WeakMap;ph={exports:{}},_=String,rv=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:_}};ph.exports=rv();ph.exports.createColors=rv;$W=ph.exports,qW={},t2=Object.freeze(Object.defineProperty({__proto__:null,default:qW},Symbol.toStringTag,{value:"Module"})),ue=QW(t2),bg=$W,vg=ue,yu=class iv 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,iv)}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=bg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=bg.createColors(!0);i=f=>u(p(f)),r=f=>h(f),vg&&(o=f=>vg(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
+ ${Xb}
284
+ `,aX=(t,e,n,r)=>t();Ub=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(Ub||{});rg=1e3,hX=1e3*2,pX=14400*1e3,Mb=900*1e3,ig={normal:{bytes:1e7,time:240*1e3},canvas:{bytes:16e6,time:5e3}},dX=100,og="app.highlight.io",fX="app.launchdarkly.com",mX={"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"},yX="/projects/default",gX=new RegExp("pub\\.(?<domain>.+)");bX={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)}};Wc=su(bX,{path:"/"}),au=(t=>(t.CLIENT_ID="highlightClientID",t))(au||{}),ah="localStorage",lu=!0,vX=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]}},cu=class{getItem(e){var n;return(n=Wc.get(e))!=null?n:""}setItem(e,n){if(!lu)return;let r=new Date;r.setTime(r.getTime()+Mb),Wc.set(e,n,{expires:r})}removeItem(e){lu&&Wc.remove(e)}},aa=new vX,Ms=new cu,lh=()=>{try{switch(ah){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return aa}},SX=t=>{ah=t},sg=t=>{lu=t},ie=t=>{try{return lh().getItem(t)}catch(e){return zt("storage","debug",`failed to get item ${t}; using global storage`,e),aa.getItem(t)}},ze=(t,e)=>{Ms.setItem(t,e);try{return lh().setItem(t,e)}catch(n){return zt("storage","debug",`failed to set item ${t}; using global storage`,n),aa.setItem(t,e)}},uu=t=>{Ms.removeItem(t);try{return lh().removeItem(t)}catch(e){return zt("storage","debug",`failed to remove item ${t}; using global storage`,e),aa.removeItem(t)}},wX=t=>{if(ah==="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||{}),la=t=>`${Ht.SESSION_DATA}_${t}`,IX=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Pb()},TX=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Pb=()=>{var t;return(t=ie(Ht.SESSION_ID))!=null?t:""},li=t=>{ze(Ht.SESSION_ID,t)},EX=t=>{let e=la(t);return JSON.parse(ie(e)||"{}")},Zs=t=>{t||(t=Pb());let e=EX(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<Mb)return e;uu(la(t))},wn=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;TX(e),ze(la(e),JSON.stringify(t))},RX=function(){let t=Ms.getItem(Ht.SESSION_ID);li(t);let e=la(t),n=Ms.getItem(e);try{wn(JSON.parse(n))}catch(r){}},Fb=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Fb||{}),CX=10,ZX=1e3,kX=500,VX=[Fb.BillingQuotaExceeded.toString()],xX=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>VX.includes(n.message)))===void 0},NX=()=>{let t=(e,n,r,i,o=0)=>ir(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof Nb&&!xX(s))throw s;if(o<CX)return yield new Promise(a=>setTimeout(a,ZX+kX*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},OX="$ld:telemetry:session:init",GX="$ld:telemetry:error",ag="$ld:telemetry:track",LX="$ld:telemetry:metric",XX="document_load";MX=class{constructor(t,e){di(this,"client"),di(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(OX,{sessionID:t})}recordGauge(t,e){var n;e.category!==Ub.WebVital&&e.name!==XX||e.name!=="Jank"&&this.client.track(`${LX}:${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(GX,rr($({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${ag}:${n}`:ag,rr($({},e),{sessionID:t}))}},hu=class extends Bn{constructor(e,n){super(),di(this,"client"),this.client=new MX(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])}};FX=t=>{let e="",n=t.getAttribute("class"),r=t.getAttribute("id");return r&&(e=e.concat(lg(r,"#"))),n&&(e=e.concat(lg(n,"."))),e===""&&(e=e.concat(t.tagName.toLowerCase())),e},lg=(t,e)=>`${e}${t.trim().split(" ").join(e)}`,AX=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)},pu=()=>{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},JX=class{constructor(t){di(this,"sessionSecureID");try{t!=null&&t.storageMode&&SX(t==null?void 0:t.storageMode),sg(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?RX():sg(!1);let e=IX(),n=Zs(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=pu(),li(this.sessionSecureID),wn({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){zt("Error initializing @launchdarkly observability plugin","error",e)}}},DX=(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())}),Ps=class extends Bn{getSession(){return this.Ln?this.h("getSession",[]):null}start(e){return DX(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?In=globalThis.LDRecord:(In=new Ps,globalThis.LDRecord=In):In=new Ps;YX=Object.defineProperty,KX=Object.defineProperties,_X=Object.getOwnPropertyDescriptors,Fs=Object.getOwnPropertySymbols,Yb=Object.prototype.hasOwnProperty,Kb=Object.prototype.propertyIsEnumerable,du=(t,e,n)=>e in t?YX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,z=(t,e)=>{for(var n in e||(e={}))Yb.call(e,n)&&du(t,n,e[n]);if(Fs)for(var n of Fs(e))Kb.call(e,n)&&du(t,n,e[n]);return t},Yt=(t,e)=>KX(t,_X(e)),or=(t,e)=>{var n={};for(var r in t)Yb.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fs)for(var r of Fs(t))e.indexOf(r)<0&&Kb.call(t,r)&&(n[r]=t[r]);return n},Y=(t,e,n)=>du(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())}),HX={key:"_sid"},zX="rrweb/sequential-id@1",BX=t=>{let e=HX,n=0;return{name:zX,eventProcessor(r){return Object.assign(r,{[e.key]:++n}),r},options:e}},jX=Object.defineProperty,QX=(t,e,n)=>e in t?jX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k=(t,e,n)=>QX(t,typeof e!="symbol"?e+"":e,n),$X=Object.defineProperty,qX=(t,e,n)=>e in t?$X(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ug=(t,e,n)=>qX(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||{}),hg={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},pg={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},es={},tW=()=>!!globalThis.Zone;Uc={};Mc={};xt={childNodes:eW,parentNode:nW,parentElement:rW,textContent:iW,contains:oW,getRootNode:sW,host:aW,styleSheets:lW,shadowRoot:cW,querySelector:uW,querySelectorAll:hW,mutationObserver:pW,patch:dW};As=class{constructor(){ug(this,"idNodeMap",new Map),ug(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}};dg="__rrweb_original__";IW=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,TW=/^(?:[a-z+]+:)?\/\//i,EW=/^www\..*/i,RW=/^(data:)([^,]*),(.*)/i;kW=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),VW=new RegExp(/[0-9]{9,16}/),xW=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),NW=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),OW=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),GW=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),LW=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),XW=[kW,VW,xW,NW,OW,GW,LW];Qb=({maskInputOptions:t,tagName:e,type:n,overwriteRecord:r})=>{let i=n&&n.toLowerCase();return r!=="true"&&(!!t[e.toLowerCase()]||!!(i&&t[i]))},WW=1,UW=new RegExp("[^a-z0-9-_:]"),mi=-2;PW=/^[^ \t\n\r\u000c]+/,FW=/^[, \t\n\r\u000c]+/;mg=new WeakMap;ph={exports:{}},_=String,nv=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:_}};ph.exports=nv();ph.exports.createColors=nv;$W=ph.exports,qW={},t2=Object.freeze(Object.defineProperty({__proto__:null,default:qW},Symbol.toStringTag,{value:"Module"})),ue=QW(t2),gg=$W,bg=ue,yu=class rv 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,rv)}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=gg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=gg.createColors(!0);i=f=>u(p(f)),r=f=>h(f),bg&&(o=f=>bg(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}},dh=yu;yu.default=yu;Sg={after:`
290
+ `),this.name+": "+this.message+e}},dh=yu;yu.default=yu;vg={after:`
291
291
  `,beforeClose:`
292
292
  `,beforeComment:`
293
293
  `,beforeDecl:`
294
294
  `,beforeOpen:" ",beforeRule:`
295
295
  `,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(`
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 Sg[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"+e2(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=Sg[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(`
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 vg[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"+e2(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=vg[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)}},ov=gu;gu.default=gu;n2=ov;ca=bu;bu.default=bu;Zi={};Zi.isClean=Symbol("isClean");Zi.my=Symbol("my");r2=dh,i2=ov,o2=ca,{isClean:Qr,my:s2}=Zi;Su=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Qr]=!1,this[s2]=!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=vu(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 r2(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 i2().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=o2){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)}},ua=Su;Su.default=Su;a2=ua,wu=class extends a2{constructor(t){super(t),this.type="comment"}},ha=wu;wu.default=wu;l2=ua,Iu=class extends l2{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"}},pa=Iu;Iu.default=Iu;sv=ha,av=pa,c2=ua,{isClean:lv,my:cv}=Zi;Le=class fv extends c2{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=pv(uv(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 av(e)]}else if(e.selector||e.selectors)e=[new mh(e)];else if(e.name)e=[new fh(e)];else if(e.text)e=[new sv(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[cv]||fv.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[lv]&&dv(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=>{uv=t};Le.registerRule=t=>{mh=t};Le.registerAtRule=t=>{fh=t};Le.registerRoot=t=>{hv=t};Rn=Le;Le.default=Le;Le.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,fh.prototype):t.type==="rule"?Object.setPrototypeOf(t,mh.prototype):t.type==="decl"?Object.setPrototypeOf(t,av.prototype):t.type==="comment"?Object.setPrototypeOf(t,sv.prototype):t.type==="root"&&Object.setPrototypeOf(t,hv.prototype),t[cv]=!0,t.nodes&&t.nodes.forEach(e=>{Le.rebuild(e)})};mv=Rn,Hs=class extends mv{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)}},yh=Hs;Hs.default=Hs;mv.registerAtRule(Hs);u2=Rn,yi=class extends u2{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new yv(new gv,this,t).stringify()}};yi.registerLazyResult=t=>{yv=t};yi.registerProcessor=t=>{gv=t};gh=yi;yi.default=yi;h2="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",p2=(t=21)=>{let e="",n=t|0;for(;n--;)e+=h2[Math.random()*64|0];return e},d2={nanoid:p2},{existsSync:f2,readFileSync:m2}=ue,{dirname:Pc,join:y2}=ue,{SourceMapConsumer:wg,SourceMapGenerator:Ig}=ue;Tu=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=Pc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new wg(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 g2(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=Pc(t),f2(t))return this.mapFile=t,m2(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 wg)return Ig.fromSourceMap(e).toString();if(e instanceof Ig)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=y2(Pc(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)}},bv=Tu;Tu.default=Tu;({nanoid:b2}=d2),{isAbsolute:Eu,resolve:Ru}=ue,{SourceMapConsumer:v2,SourceMapGenerator:S2}=ue,{fileURLToPath:Tg,pathToFileURL:rs}=ue,Eg=dh,w2=bv,Fc=ue,Ac=Symbol("fromOffsetCache"),I2=!!(v2&&S2),Rg=!!(Ru&&Eu),zs=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&&(!Rg||/^\w+:\/\//.test(e.from)||Eu(e.from)?this.file=e.from:this.file=Ru(e.from)),Rg&&I2){let n=new w2(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 "+b2(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 Eg(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 Eg(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&&(rs&&(s.input.url=rs(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Ac])n=this[Ac];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[Ac]=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:Ru(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;Eu(o.source)?a=rs(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||rs(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(Tg)c.file=Tg(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}},da=zs;zs.default=zs;Fc&&Fc.registerInput&&Fc.registerInput(zs);vv=Rn,ar=class extends vv{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 Sv(new wv,this,t).stringify()}};ar.registerLazyResult=t=>{Sv=t};ar.registerProcessor=t=>{wv=t};ki=ar;ar.default=ar;vv.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}},Iv=gi;gi.default=gi;Tv=Rn,T2=Iv,Bs=class extends Tv{get selectors(){return T2.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=[])}},bh=Bs;Bs.default=Bs;Tv.registerRule(Bs);E2=yh,R2=ha,C2=pa,Z2=da,k2=bv,V2=ki,x2=bh;N2=bi;bi.default=bi;({dirname:ks,relative:Ev,resolve:Rv,sep:Cv}=ue),{SourceMapConsumer:Zv,SourceMapGenerator:Vs}=ue,{pathToFileURL:Cg}=ue,O2=da,G2=!!(Zv&&Vs),L2=!!(ks&&Rv&&Ev&&Cv),X2=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=`
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)}},iv=gu;gu.default=gu;n2=iv;ca=bu;bu.default=bu;Zi={};Zi.isClean=Symbol("isClean");Zi.my=Symbol("my");r2=dh,i2=iv,o2=ca,{isClean:Qr,my:s2}=Zi;Su=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Qr]=!1,this[s2]=!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=vu(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 r2(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 i2().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=o2){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)}},ua=Su;Su.default=Su;a2=ua,wu=class extends a2{constructor(t){super(t),this.type="comment"}},ha=wu;wu.default=wu;l2=ua,Iu=class extends l2{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"}},pa=Iu;Iu.default=Iu;ov=ha,sv=pa,c2=ua,{isClean:av,my:lv}=Zi;Le=class dv extends c2{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=hv(cv(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 sv(e)]}else if(e.selector||e.selectors)e=[new mh(e)];else if(e.name)e=[new fh(e)];else if(e.text)e=[new ov(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[lv]||dv.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[av]&&pv(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=>{cv=t};Le.registerRule=t=>{mh=t};Le.registerAtRule=t=>{fh=t};Le.registerRoot=t=>{uv=t};Rn=Le;Le.default=Le;Le.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,fh.prototype):t.type==="rule"?Object.setPrototypeOf(t,mh.prototype):t.type==="decl"?Object.setPrototypeOf(t,sv.prototype):t.type==="comment"?Object.setPrototypeOf(t,ov.prototype):t.type==="root"&&Object.setPrototypeOf(t,uv.prototype),t[lv]=!0,t.nodes&&t.nodes.forEach(e=>{Le.rebuild(e)})};fv=Rn,Hs=class extends fv{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)}},yh=Hs;Hs.default=Hs;fv.registerAtRule(Hs);u2=Rn,yi=class extends u2{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new mv(new yv,this,t).stringify()}};yi.registerLazyResult=t=>{mv=t};yi.registerProcessor=t=>{yv=t};gh=yi;yi.default=yi;h2="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",p2=(t=21)=>{let e="",n=t|0;for(;n--;)e+=h2[Math.random()*64|0];return e},d2={nanoid:p2},{existsSync:f2,readFileSync:m2}=ue,{dirname:Pc,join:y2}=ue,{SourceMapConsumer:Sg,SourceMapGenerator:wg}=ue;Tu=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=Pc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Sg(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 g2(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=Pc(t),f2(t))return this.mapFile=t,m2(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 Sg)return wg.fromSourceMap(e).toString();if(e instanceof wg)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=y2(Pc(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)}},gv=Tu;Tu.default=Tu;({nanoid:b2}=d2),{isAbsolute:Eu,resolve:Ru}=ue,{SourceMapConsumer:v2,SourceMapGenerator:S2}=ue,{fileURLToPath:Ig,pathToFileURL:rs}=ue,Tg=dh,w2=gv,Fc=ue,Ac=Symbol("fromOffsetCache"),I2=!!(v2&&S2),Eg=!!(Ru&&Eu),zs=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&&(!Eg||/^\w+:\/\//.test(e.from)||Eu(e.from)?this.file=e.from:this.file=Ru(e.from)),Eg&&I2){let n=new w2(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 "+b2(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 Tg(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 Tg(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&&(rs&&(s.input.url=rs(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Ac])n=this[Ac];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[Ac]=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:Ru(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;Eu(o.source)?a=rs(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||rs(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(Ig)c.file=Ig(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}},da=zs;zs.default=zs;Fc&&Fc.registerInput&&Fc.registerInput(zs);bv=Rn,ar=class extends bv{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 vv(new Sv,this,t).stringify()}};ar.registerLazyResult=t=>{vv=t};ar.registerProcessor=t=>{Sv=t};ki=ar;ar.default=ar;bv.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}},wv=gi;gi.default=gi;Iv=Rn,T2=wv,Bs=class extends Iv{get selectors(){return T2.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=[])}},bh=Bs;Bs.default=Bs;Iv.registerRule(Bs);E2=yh,R2=ha,C2=pa,Z2=da,k2=gv,V2=ki,x2=bh;N2=bi;bi.default=bi;({dirname:ks,relative:Tv,resolve:Ev,sep:Rv}=ue),{SourceMapConsumer:Cv,SourceMapGenerator:Vs}=ue,{pathToFileURL:Rg}=ue,O2=da,G2=!!(Cv&&Vs),L2=!!(ks&&Ev&&Tv&&Rv),X2=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||ks(t.file),r;this.mapOpts.sourcesContent===!1?(r=new Zv(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(),L2&&G2&&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=Vs.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Vs({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 Vs({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?ks(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=ks(Rv(n,this.mapOpts.annotation)));let r=Ev(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 O2(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(Cg){let n=Cg(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;Cv==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},kv=X2,Jc=39,Zg=34,is=92,kg=47,os=10,qr=32,ss=12,as=9,ls=13,W2=91,U2=93,M2=40,P2=41,F2=123,A2=125,J2=59,D2=42,Y2=58,K2=64,cs=/[\t\n\f\r "#'()/;[\\\]{}]/g,us=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_2=/.[\r\n"'(/\\]/,Vg=/[\da-f]/i,H2=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 os:case qr:case as:case ls:case ss:{a=d;do a+=1,i=n.charCodeAt(a);while(i===qr||i===os||i===as||i===ls||i===ss);l=["space",n.slice(d,a)],d=a-1;break}case W2:case U2:case F2:case A2:case Y2:case J2:case P2:{let C=String.fromCharCode(i);l=[C,C,d];break}case M2:{if(f=b.length?b.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Jc&&p!==Zg&&p!==qr&&p!==os&&p!==as&&p!==ss&&p!==ls){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)===is;)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||_2.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Jc:case Zg:{c=i===Jc?"'":'"',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)===is;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case K2:{cs.lastIndex=d+1,cs.test(n),cs.lastIndex===0?a=n.length-1:a=cs.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case is:{for(a=d,s=!0;n.charCodeAt(a+1)===is;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==kg&&i!==qr&&i!==os&&i!==as&&i!==ls&&i!==ss&&(a+=1,Vg.test(n.charAt(a)))){for(;Vg.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===kg&&n.charCodeAt(d+1)===D2?(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):(us.lastIndex=d+1,us.test(n),us.lastIndex===0?a=n.length-1:a=us.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}},z2=yh,B2=ha,j2=pa,Q2=ki,xg=bh,$2=H2,Ng={empty:!0,space:!0};tU=class{constructor(t){this.input=t,this.root=new Q2,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 z2;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 B2;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=$2(this.input)}decl(t,e){let n=new j2;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]||q2(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 xg;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",!Ng[u]&&!Ng[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 xg;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})}},eU=tU,nU=Rn,rU=da,iU=eU;vh=js;js.default=js;nU.registerParse(js);Cu=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}},Vv=Cu;Cu.default=Cu;oU=Vv,Zu=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 oU(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},Sh=Zu;Zu.default=Zu;Og={},xv=function(t){Og[t]||(Og[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},sU=Rn,aU=gh,lU=kv,cU=vh,Gg=Sh,uU=ki,hU=ca,{isClean:Se,my:pU}=Zi,dU=xv,fU={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},mU={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},yU={Once:!0,postcssPlugin:!0,prepare:!0},lr=0;Vu={},cr=class Ov{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=ku(n);else if(n instanceof Ov||n instanceof Gg)i=ku(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=cU;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[pU]&&sU.rebuild(i)}this.result=new Gg(e,i,r),this.helpers=Yt(z({},Vu),{postcss:Vu,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(!mU[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yU[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=[Lg(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=hU;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new lU(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||dU("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(Lg(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=Nv(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=>{Vu=t};Gv=cr;cr.default=cr;uU.registerLazyResult(cr);aU.registerLazyResult(cr);gU=kv,bU=vh,vU=Sh,SU=ca,wU=xv,xu=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=bU;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=SU;this.result=new vU(this.Co,r,this.fn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new gU(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||wU("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[]}},IU=xu;xu.default=xu;TU=gh,EU=Gv,RU=IU,CU=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 RU(this,t,e):new EU(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},ZU=vi;vi.default=vi;CU.registerProcessor(vi);TU.registerProcessor(vi);Lv=yh,Xv=ha,kU=Rn,VU=dh,Wv=pa,Uv=gh,xU=N2,NU=da,OU=Gv,GU=Iv,LU=ua,XU=vh,wh=ZU,WU=Sh,Mv=ki,Pv=bh,UU=ca,MU=Vv;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||ks(t.file),r;this.mapOpts.sourcesContent===!1?(r=new Cv(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(),L2&&G2&&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=Vs.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Vs({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 Vs({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?ks(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=ks(Ev(n,this.mapOpts.annotation)));let r=Tv(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 O2(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(Rg){let n=Rg(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;Rv==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},Zv=X2,Jc=39,Cg=34,is=92,Zg=47,os=10,qr=32,ss=12,as=9,ls=13,W2=91,U2=93,M2=40,P2=41,F2=123,A2=125,J2=59,D2=42,Y2=58,K2=64,cs=/[\t\n\f\r "#'()/;[\\\]{}]/g,us=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_2=/.[\r\n"'(/\\]/,kg=/[\da-f]/i,H2=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 os:case qr:case as:case ls:case ss:{a=d;do a+=1,i=n.charCodeAt(a);while(i===qr||i===os||i===as||i===ls||i===ss);l=["space",n.slice(d,a)],d=a-1;break}case W2:case U2:case F2:case A2:case Y2:case J2:case P2:{let C=String.fromCharCode(i);l=[C,C,d];break}case M2:{if(f=b.length?b.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==Jc&&p!==Cg&&p!==qr&&p!==os&&p!==as&&p!==ss&&p!==ls){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)===is;)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||_2.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case Jc:case Cg:{c=i===Jc?"'":'"',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)===is;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case K2:{cs.lastIndex=d+1,cs.test(n),cs.lastIndex===0?a=n.length-1:a=cs.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case is:{for(a=d,s=!0;n.charCodeAt(a+1)===is;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==Zg&&i!==qr&&i!==os&&i!==as&&i!==ls&&i!==ss&&(a+=1,kg.test(n.charAt(a)))){for(;kg.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===Zg&&n.charCodeAt(d+1)===D2?(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):(us.lastIndex=d+1,us.test(n),us.lastIndex===0?a=n.length-1:a=us.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}},z2=yh,B2=ha,j2=pa,Q2=ki,Vg=bh,$2=H2,xg={empty:!0,space:!0};tU=class{constructor(t){this.input=t,this.root=new Q2,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 z2;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 B2;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=$2(this.input)}decl(t,e){let n=new j2;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]||q2(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 Vg;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",!xg[u]&&!xg[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 Vg;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})}},eU=tU,nU=Rn,rU=da,iU=eU;vh=js;js.default=js;nU.registerParse(js);Cu=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}},kv=Cu;Cu.default=Cu;oU=kv,Zu=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 oU(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},Sh=Zu;Zu.default=Zu;Ng={},Vv=function(t){Ng[t]||(Ng[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},sU=Rn,aU=gh,lU=Zv,cU=vh,Og=Sh,uU=ki,hU=ca,{isClean:Se,my:pU}=Zi,dU=Vv,fU={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},mU={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},yU={Once:!0,postcssPlugin:!0,prepare:!0},lr=0;Vu={},cr=class Nv{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=ku(n);else if(n instanceof Nv||n instanceof Og)i=ku(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=cU;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[pU]&&sU.rebuild(i)}this.result=new Og(e,i,r),this.helpers=Yt(z({},Vu),{postcss:Vu,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(!mU[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yU[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=[Gg(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=hU;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new lU(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||dU("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(Gg(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=xv(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=>{Vu=t};Ov=cr;cr.default=cr;uU.registerLazyResult(cr);aU.registerLazyResult(cr);gU=Zv,bU=vh,vU=Sh,SU=ca,wU=Vv,xu=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=bU;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=SU;this.result=new vU(this.Co,r,this.fn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new gU(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||wU("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[]}},IU=xu;xu.default=xu;TU=gh,EU=Ov,RU=IU,CU=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 RU(this,t,e):new EU(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},ZU=vi;vi.default=vi;CU.registerProcessor(vi);TU.registerProcessor(vi);Gv=yh,Lv=ha,kU=Rn,VU=dh,Xv=pa,Wv=gh,xU=N2,NU=da,OU=Ov,GU=wv,LU=ua,XU=vh,wh=ZU,WU=Sh,Uv=ki,Mv=bh,UU=ca,MU=kv;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 wh().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=UU;ht.parse=XU;ht.fromJSON=xU;ht.list=GU;ht.comment=t=>new Xv(t);ht.atRule=t=>new Lv(t);ht.decl=t=>new Wv(t);ht.rule=t=>new Pv(t);ht.root=t=>new Mv(t);ht.document=t=>new Uv(t);ht.CssSyntaxError=VU;ht.Declaration=Wv;ht.Container=kU;ht.Processor=wh;ht.Document=Uv;ht.Comment=Xv;ht.Warning=MU;ht.AtRule=Lv;ht.Result=WU;ht.Input=NU;ht.Rule=Pv;ht.Root=Mv;ht.Node=LU;OU.registerPostcss(ht);ht.default=ht;PU=Object.defineProperty,FU=(t,e,n)=>e in t?PU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,re=(t,e,n)=>FU(t,typeof e!="symbol"?e+"":e,n);Ih={exports:{}},H=String,Fv=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}};Ih.exports=Fv();Ih.exports.createColors=Fv;JU=Ih.exports,DU={},YU=Object.freeze(Object.defineProperty({__proto__:null,default:DU},Symbol.toStringTag,{value:"Module"})),he=AU(YU),Xg=JU,Wg=he,Nu=class Av 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,Av)}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=Xg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=Xg.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)+`
310
+ https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new wh().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=UU;ht.parse=XU;ht.fromJSON=xU;ht.list=GU;ht.comment=t=>new Lv(t);ht.atRule=t=>new Gv(t);ht.decl=t=>new Xv(t);ht.rule=t=>new Mv(t);ht.root=t=>new Uv(t);ht.document=t=>new Wv(t);ht.CssSyntaxError=VU;ht.Declaration=Xv;ht.Container=kU;ht.Processor=wh;ht.Document=Wv;ht.Comment=Lv;ht.Warning=MU;ht.AtRule=Gv;ht.Result=WU;ht.Input=NU;ht.Rule=Mv;ht.Root=Uv;ht.Node=LU;OU.registerPostcss(ht);ht.default=ht;PU=Object.defineProperty,FU=(t,e,n)=>e in t?PU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,re=(t,e,n)=>FU(t,typeof e!="symbol"?e+"":e,n);Ih={exports:{}},H=String,Pv=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}};Ih.exports=Pv();Ih.exports.createColors=Pv;JU=Ih.exports,DU={},YU=Object.freeze(Object.defineProperty({__proto__:null,default:DU},Symbol.toStringTag,{value:"Module"})),he=AU(YU),Lg=JU,Xg=he,Nu=class Fv 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,Fv)}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=Lg.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=Lg.createColors(!0);i=f=>u(p(f)),r=f=>h(f),Xg&&(o=f=>Xg(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}},Th=Nu;Nu.default=Nu;Ug={after:`
316
+ `),this.name+": "+this.message+e}},Th=Nu;Nu.default=Nu;Wg={after:`
317
317
  `,beforeClose:`
318
318
  `,beforeComment:`
319
319
  `,beforeDecl:`
320
320
  `,beforeOpen:" ",beforeRule:`
321
321
  `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};Ou=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 Ug[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"+KU(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=Ug[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(`
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 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"+KU(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(`
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)}},Jv=Ou;Ou.default=Ou;_U=Jv;fa=Gu;Gu.default=Gu;Vi={};Vi.isClean=Symbol("isClean");Vi.my=Symbol("my");HU=Th,zU=Jv,BU=fa,{isClean:ei,my:jU}=Vi;Xu=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[ei]=!1,this[jU]=!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=Lu(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 HU(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 zU().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=BU){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)}},ma=Xu;Xu.default=Xu;QU=ma,Wu=class extends QU{constructor(t){super(t),this.type="comment"}},ya=Wu;Wu.default=Wu;$U=ma,Uu=class extends $U{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"}},ga=Uu;Uu.default=Uu;Dv=ya,Yv=ga,qU=ma,{isClean:Kv,my:_v}=Vi;Xe=class Qv extends qU{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=Bv(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 Yv(e)]}else if(e.selector||e.selectors)e=[new Rh(e)];else if(e.name)e=[new Eh(e)];else if(e.text)e=[new Dv(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[_v]||Qv.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Kv]&&jv(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=>{Hv=t};Xe.registerRule=t=>{Rh=t};Xe.registerAtRule=t=>{Eh=t};Xe.registerRoot=t=>{zv=t};Cn=Xe;Xe.default=Xe;Xe.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Eh.prototype):t.type==="rule"?Object.setPrototypeOf(t,Rh.prototype):t.type==="decl"?Object.setPrototypeOf(t,Yv.prototype):t.type==="comment"?Object.setPrototypeOf(t,Dv.prototype):t.type==="root"&&Object.setPrototypeOf(t,zv.prototype),t[_v]=!0,t.nodes&&t.nodes.forEach(e=>{Xe.rebuild(e)})};$v=Cn,Qs=class extends $v{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)}},Ch=Qs;Qs.default=Qs;$v.registerAtRule(Qs);tM=Cn,Si=class extends tM{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new qv(new t0,this,t).stringify()}};Si.registerLazyResult=t=>{qv=t};Si.registerProcessor=t=>{t0=t};Zh=Si;Si.default=Si;eM="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",nM=(t=21)=>{let e="",n=t|0;for(;n--;)e+=eM[Math.random()*64|0];return e},rM={nanoid:nM},{existsSync:iM,readFileSync:oM}=he,{dirname:Dc,join:sM}=he,{SourceMapConsumer:Mg,SourceMapGenerator:Pg}=he;Mu=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=Dc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Mg(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 aM(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=Dc(t),iM(t))return this.mapFile=t,oM(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 Mg)return Pg.fromSourceMap(e).toString();if(e instanceof Pg)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=sM(Dc(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)}},e0=Mu;Mu.default=Mu;({nanoid:lM}=rM),{isAbsolute:Pu,resolve:Fu}=he,{SourceMapConsumer:cM,SourceMapGenerator:uM}=he,{fileURLToPath:Fg,pathToFileURL:hs}=he,Ag=Th,hM=e0,Yc=he,Kc=Symbol("fromOffsetCache"),pM=!!(cM&&uM),Jg=!!(Fu&&Pu),$s=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&&(!Jg||/^\w+:\/\//.test(e.from)||Pu(e.from)?this.file=e.from:this.file=Fu(e.from)),Jg&&pM){let n=new hM(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 "+lM(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 Ag(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 Ag(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&&(hs&&(s.input.url=hs(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Kc])n=this[Kc];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[Kc]=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:Fu(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;Pu(o.source)?a=hs(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||hs(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(Fg)c.file=Fg(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}},ba=$s;$s.default=$s;Yc&&Yc.registerInput&&Yc.registerInput($s);n0=Cn,ur=class extends n0{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 r0(new i0,this,t).stringify()}};ur.registerLazyResult=t=>{r0=t};ur.registerProcessor=t=>{i0=t};xi=ur;ur.default=ur;n0.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}},o0=wi;wi.default=wi;s0=Cn,dM=o0,qs=class extends s0{get selectors(){return dM.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=[])}},kh=qs;qs.default=qs;s0.registerRule(qs);fM=Ch,mM=ya,yM=ga,gM=ba,bM=e0,vM=xi,SM=kh;wM=Ii;Ii.default=Ii;({dirname:xs,relative:a0,resolve:l0,sep:c0}=he),{SourceMapConsumer:u0,SourceMapGenerator:Ns}=he,{pathToFileURL:Dg}=he,IM=ba,TM=!!(u0&&Ns),EM=!!(xs&&l0&&a0&&c0),RM=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=`
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)}},Av=Ou;Ou.default=Ou;_U=Av;fa=Gu;Gu.default=Gu;Vi={};Vi.isClean=Symbol("isClean");Vi.my=Symbol("my");HU=Th,zU=Av,BU=fa,{isClean:ei,my:jU}=Vi;Xu=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[ei]=!1,this[jU]=!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=Lu(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 HU(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 zU().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=BU){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)}},ma=Xu;Xu.default=Xu;QU=ma,Wu=class extends QU{constructor(t){super(t),this.type="comment"}},ya=Wu;Wu.default=Wu;$U=ma,Uu=class extends $U{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"}},ga=Uu;Uu.default=Uu;Jv=ya,Dv=ga,qU=ma,{isClean:Yv,my:Kv}=Vi;Xe=class jv extends qU{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=zv(_v(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 Dv(e)]}else if(e.selector||e.selectors)e=[new Rh(e)];else if(e.name)e=[new Eh(e)];else if(e.text)e=[new Jv(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[Kv]||jv.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Yv]&&Bv(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=>{_v=t};Xe.registerRule=t=>{Rh=t};Xe.registerAtRule=t=>{Eh=t};Xe.registerRoot=t=>{Hv=t};Cn=Xe;Xe.default=Xe;Xe.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Eh.prototype):t.type==="rule"?Object.setPrototypeOf(t,Rh.prototype):t.type==="decl"?Object.setPrototypeOf(t,Dv.prototype):t.type==="comment"?Object.setPrototypeOf(t,Jv.prototype):t.type==="root"&&Object.setPrototypeOf(t,Hv.prototype),t[Kv]=!0,t.nodes&&t.nodes.forEach(e=>{Xe.rebuild(e)})};Qv=Cn,Qs=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)}},Ch=Qs;Qs.default=Qs;Qv.registerAtRule(Qs);tM=Cn,Si=class extends tM{constructor(t){super(z({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new $v(new qv,this,t).stringify()}};Si.registerLazyResult=t=>{$v=t};Si.registerProcessor=t=>{qv=t};Zh=Si;Si.default=Si;eM="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",nM=(t=21)=>{let e="",n=t|0;for(;n--;)e+=eM[Math.random()*64|0];return e},rM={nanoid:nM},{existsSync:iM,readFileSync:oM}=he,{dirname:Dc,join:sM}=he,{SourceMapConsumer:Ug,SourceMapGenerator:Mg}=he;Mu=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=Dc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Ug(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 aM(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=Dc(t),iM(t))return this.mapFile=t,oM(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 Ug)return Mg.fromSourceMap(e).toString();if(e instanceof Mg)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=sM(Dc(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)}},t0=Mu;Mu.default=Mu;({nanoid:lM}=rM),{isAbsolute:Pu,resolve:Fu}=he,{SourceMapConsumer:cM,SourceMapGenerator:uM}=he,{fileURLToPath:Pg,pathToFileURL:hs}=he,Fg=Th,hM=t0,Yc=he,Kc=Symbol("fromOffsetCache"),pM=!!(cM&&uM),Ag=!!(Fu&&Pu),$s=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&&(!Ag||/^\w+:\/\//.test(e.from)||Pu(e.from)?this.file=e.from:this.file=Fu(e.from)),Ag&&pM){let n=new hM(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 "+lM(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 Fg(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 Fg(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&&(hs&&(s.input.url=hs(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let e,n;if(this[Kc])n=this[Kc];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[Kc]=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:Fu(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;Pu(o.source)?a=hs(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||hs(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(Pg)c.file=Pg(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}},ba=$s;$s.default=$s;Yc&&Yc.registerInput&&Yc.registerInput($s);e0=Cn,ur=class extends e0{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 n0(new r0,this,t).stringify()}};ur.registerLazyResult=t=>{n0=t};ur.registerProcessor=t=>{r0=t};xi=ur;ur.default=ur;e0.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}},i0=wi;wi.default=wi;o0=Cn,dM=i0,qs=class extends o0{get selectors(){return dM.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=[])}},kh=qs;qs.default=qs;o0.registerRule(qs);fM=Ch,mM=ya,yM=ga,gM=ba,bM=t0,vM=xi,SM=kh;wM=Ii;Ii.default=Ii;({dirname:xs,relative:s0,resolve:a0,sep:l0}=he),{SourceMapConsumer:c0,SourceMapGenerator:Ns}=he,{pathToFileURL:Jg}=he,IM=ba,TM=!!(c0&&Ns),EM=!!(xs&&a0&&s0&&l0),RM=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||xs(t.file),r;this.mapOpts.sourcesContent===!1?(r=new u0(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(),EM&&TM&&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=Ns.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Ns({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 Ns({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?xs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=xs(l0(n,this.mapOpts.annotation)));let r=a0(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 IM(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(Dg){let n=Dg(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;c0==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},h0=RM,_c=39,Yg=34,ps=92,Kg=47,ds=10,ri=32,fs=12,ms=9,ys=13,CM=91,ZM=93,kM=40,VM=41,xM=123,NM=125,OM=59,GM=42,LM=58,XM=64,gs=/[\t\n\f\r "#'()/;[\\\]{}]/g,bs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,WM=/.[\r\n"'(/\\]/,_g=/[\da-f]/i,UM=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 ds:case ri:case ms:case ys:case fs:{a=d;do a+=1,i=n.charCodeAt(a);while(i===ri||i===ds||i===ms||i===ys||i===fs);l=["space",n.slice(d,a)],d=a-1;break}case CM:case ZM:case xM:case NM:case LM:case OM:case VM:{let C=String.fromCharCode(i);l=[C,C,d];break}case kM:{if(f=b.length?b.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==_c&&p!==Yg&&p!==ri&&p!==ds&&p!==ms&&p!==fs&&p!==ys){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)===ps;)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||WM.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case _c:case Yg:{c=i===_c?"'":'"',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)===ps;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case XM:{gs.lastIndex=d+1,gs.test(n),gs.lastIndex===0?a=n.length-1:a=gs.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case ps:{for(a=d,s=!0;n.charCodeAt(a+1)===ps;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==Kg&&i!==ri&&i!==ds&&i!==ms&&i!==ys&&i!==fs&&(a+=1,_g.test(n.charAt(a)))){for(;_g.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===Kg&&n.charCodeAt(d+1)===GM?(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):(bs.lastIndex=d+1,bs.test(n),bs.lastIndex===0?a=n.length-1:a=bs.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}},MM=Ch,PM=ya,FM=ga,AM=xi,Hg=kh,JM=UM,zg={empty:!0,space:!0};YM=class{constructor(t){this.input=t,this.root=new AM,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 MM;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 PM;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=JM(this.input)}decl(t,e){let n=new FM;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]||DM(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 Hg;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",!zg[u]&&!zg[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 Hg;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})}},KM=YM,_M=Cn,HM=ba,zM=KM;Vh=ta;ta.default=ta;_M.registerParse(ta);Au=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}},p0=Au;Au.default=Au;BM=p0,Ju=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 BM(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},xh=Ju;Ju.default=Ju;Bg={},d0=function(t){Bg[t]||(Bg[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},jM=Cn,QM=Zh,$M=h0,qM=Vh,jg=xh,tP=xi,eP=fa,{isClean:we,my:nP}=Vi,rP=d0,iP={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},oP={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},sP={Once:!0,postcssPlugin:!0,prepare:!0},hr=0;Yu={},pr=class m0{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=Du(n);else if(n instanceof m0||n instanceof jg)i=Du(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=qM;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[nP]&&jM.rebuild(i)}this.result=new jg(e,i,r),this.helpers=Yt(z({},Yu),{postcss:Yu,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(!oP[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!sP[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=eP;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new $M(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||rP("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=f0(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=>{Yu=t};y0=pr;pr.default=pr;tP.registerLazyResult(pr);QM.registerLazyResult(pr);aP=h0,lP=Vh,cP=xh,uP=fa,hP=d0,Ku=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=lP;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=uP;this.result=new cP(this.Co,r,this.fn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new aP(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||hP("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[]}},pP=Ku;Ku.default=Ku;dP=Zh,fP=y0,mP=pP,yP=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 mP(this,t,e):new fP(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},gP=Ti;Ti.default=Ti;yP.registerProcessor(Ti);dP.registerProcessor(Ti);g0=Ch,b0=ya,bP=Cn,vP=Th,v0=ga,S0=Zh,SP=wM,wP=ba,IP=y0,TP=o0,EP=ma,RP=Vh,Nh=gP,CP=xh,w0=xi,I0=kh,ZP=fa,kP=p0;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||xs(t.file),r;this.mapOpts.sourcesContent===!1?(r=new c0(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(),EM&&TM&&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=Ns.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Ns({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 Ns({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?xs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=xs(a0(n,this.mapOpts.annotation)));let r=s0(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 IM(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(Jg){let n=Jg(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;l0==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}},u0=RM,_c=39,Dg=34,ps=92,Yg=47,ds=10,ri=32,fs=12,ms=9,ys=13,CM=91,ZM=93,kM=40,VM=41,xM=123,NM=125,OM=59,GM=42,LM=58,XM=64,gs=/[\t\n\f\r "#'()/;[\\\]{}]/g,bs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,WM=/.[\r\n"'(/\\]/,Kg=/[\da-f]/i,UM=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 ds:case ri:case ms:case ys:case fs:{a=d;do a+=1,i=n.charCodeAt(a);while(i===ri||i===ds||i===ms||i===ys||i===fs);l=["space",n.slice(d,a)],d=a-1;break}case CM:case ZM:case xM:case NM:case LM:case OM:case VM:{let C=String.fromCharCode(i);l=[C,C,d];break}case kM:{if(f=b.length?b.pop()[1]:"",p=n.charCodeAt(d+1),f==="url"&&p!==_c&&p!==Dg&&p!==ri&&p!==ds&&p!==ms&&p!==fs&&p!==ys){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)===ps;)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||WM.test(o)?l=["(","(",d]:(l=["brackets",o,d,a],d=a);break}case _c:case Dg:{c=i===_c?"'":'"',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)===ps;)h-=1,u=!u}while(u);l=["string",n.slice(d,a+1),d,a],d=a;break}case XM:{gs.lastIndex=d+1,gs.test(n),gs.lastIndex===0?a=n.length-1:a=gs.lastIndex-2,l=["at-word",n.slice(d,a+1),d,a],d=a;break}case ps:{for(a=d,s=!0;n.charCodeAt(a+1)===ps;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==Yg&&i!==ri&&i!==ds&&i!==ms&&i!==ys&&i!==fs&&(a+=1,Kg.test(n.charAt(a)))){for(;Kg.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===Yg&&n.charCodeAt(d+1)===GM?(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):(bs.lastIndex=d+1,bs.test(n),bs.lastIndex===0?a=n.length-1:a=bs.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}},MM=Ch,PM=ya,FM=ga,AM=xi,_g=kh,JM=UM,Hg={empty:!0,space:!0};YM=class{constructor(t){this.input=t,this.root=new AM,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 MM;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 PM;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=JM(this.input)}decl(t,e){let n=new FM;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]||DM(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 _g;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",!Hg[u]&&!Hg[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 _g;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})}},KM=YM,_M=Cn,HM=ba,zM=KM;Vh=ta;ta.default=ta;_M.registerParse(ta);Au=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}},h0=Au;Au.default=Au;BM=h0,Ju=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 BM(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}},xh=Ju;Ju.default=Ju;zg={},p0=function(t){zg[t]||(zg[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},jM=Cn,QM=Zh,$M=u0,qM=Vh,Bg=xh,tP=xi,eP=fa,{isClean:we,my:nP}=Vi,rP=p0,iP={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},oP={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},sP={Once:!0,postcssPlugin:!0,prepare:!0},hr=0;Yu={},pr=class f0{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=Du(n);else if(n instanceof f0||n instanceof Bg)i=Du(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=qM;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[nP]&&jM.rebuild(i)}this.result=new Bg(e,i,r),this.helpers=Yt(z({},Yu),{postcss:Yu,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(!oP[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!sP[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=[jg(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=eP;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let r=new $M(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||rP("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(jg(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=d0(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=>{Yu=t};m0=pr;pr.default=pr;tP.registerLazyResult(pr);QM.registerLazyResult(pr);aP=u0,lP=Vh,cP=xh,uP=fa,hP=p0,Ku=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=lP;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=uP;this.result=new cP(this.Co,r,this.fn),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new aP(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||hP("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[]}},pP=Ku;Ku.default=Ku;dP=Zh,fP=m0,mP=pP,yP=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 mP(this,t,e):new fP(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},gP=Ti;Ti.default=Ti;yP.registerProcessor(Ti);dP.registerProcessor(Ti);y0=Ch,g0=ya,bP=Cn,vP=Th,b0=ga,v0=Zh,SP=wM,wP=ba,IP=m0,TP=i0,EP=ma,RP=Vh,Nh=gP,CP=xh,S0=xi,w0=kh,ZP=fa,kP=h0;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 Nh().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=ZP;pt.parse=RP;pt.fromJSON=SP;pt.list=TP;pt.comment=t=>new b0(t);pt.atRule=t=>new g0(t);pt.decl=t=>new v0(t);pt.rule=t=>new I0(t);pt.root=t=>new w0(t);pt.document=t=>new S0(t);pt.CssSyntaxError=vP;pt.Declaration=v0;pt.Container=bP;pt.Processor=Nh;pt.Document=S0;pt.Comment=b0;pt.Warning=kP;pt.AtRule=g0;pt.Result=CP;pt.Input=wP;pt.Rule=I0;pt.Root=w0;pt.Node=EP;IP.registerPostcss(pt);pt.default=pt;_u=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"}},$g={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},qg={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vs={},VP=()=>!!globalThis.Zone;Hc={};zc={};q={childNodes:xP,parentNode:NP,parentElement:OP,textContent:GP,contains:LP,getRootNode:XP,host:WP,styleSheets:UP,shadowRoot:MP,querySelector:PP,querySelectorAll:FP,mutationObserver:E0,patch:Zn};$n=`Please stop import mirror directly. Instead of that,\r
336
+ https://www.w3ctech.com/topic/2226`));let s=e(...o);return s.postcssPlugin=t,s.postcssVersion=new Nh().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=ZP;pt.parse=RP;pt.fromJSON=SP;pt.list=TP;pt.comment=t=>new g0(t);pt.atRule=t=>new y0(t);pt.decl=t=>new b0(t);pt.rule=t=>new w0(t);pt.root=t=>new S0(t);pt.document=t=>new v0(t);pt.CssSyntaxError=vP;pt.Declaration=b0;pt.Container=bP;pt.Processor=Nh;pt.Document=v0;pt.Comment=g0;pt.Warning=kP;pt.AtRule=y0;pt.Result=CP;pt.Input=wP;pt.Rule=w0;pt.Root=S0;pt.Node=EP;IP.registerPostcss(pt);pt.default=pt;_u=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:[]},$g={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vs={},VP=()=>!!globalThis.Zone;Hc={};zc={};q={childNodes:xP,parentNode:NP,parentElement:OP,textContent:GP,contains:LP,getRootNode:XP,host:WP,styleSheets:UP,shadowRoot:MP,querySelector:PP,querySelectorAll:FP,mutationObserver:T0,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.`,tb={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&&(tb=new Proxy(tb,{get(t,e,n){return e==="map"&&console.error($n),Reflect.get(t,e,n)}}));ea=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ea=()=>new Date().getTime());AP=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch(e){return!1}return!1};Bu=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||{}),_e=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(_e||{}),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||{}),L0=(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))(L0||{});ju=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&&eb(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&&eb(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--)}},nb=(t,e)=>`${t}@${e}`,Qu=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 ju,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||!G0(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(O0(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=>{x0(m,this.mirror)&&this.iframeManager.addIframe(m),N0(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),zu(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)rb(this.removesSubTreeCache,c)&&!this.movedSet.has(q.parentNode(c))||o(c);for(let c of this.addedSet)!ib(this.droppedSet,c)&&!rb(this.removesSubTreeCache,c)||ib(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=uh(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=Js({overwriteRecord:null,element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ds(e),value:r,maskInputFn:this.maskInputFn})}),k(this,"processMutation",e=>{if(!Bc(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:nv(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,k0(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=Ds(n);i=Js({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"),!ev(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]=tv(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)||Bc(n,this.mirror,this.slimDOMOptions)||!JP(n,this.mirror)||(this.addedSet.has(n)?($u(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||V0(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[nb(r,i)]?$u(this.movedSet,n):(this.removes.push({parentId:i,id:r,isShadow:ci(e.target)&&ui(e.target)?!0:void 0}),_P(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(Bc(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[nb(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)),zu(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=[];qP=["INPUT","TEXTAREA","SELECT"],ob=new WeakMap;ra=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}},qu=class{constructor(e){k(this,"iframes",new WeakMap),k(this,"crossOriginIframeMap",new WeakMap),k(this,"crossOriginIframeMirror",new ra(qb)),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 ra(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!==L0.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},th=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=W0(Yt(z({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(U0(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(M0({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&&G0(this)&&r.addShadowRoot(a,n),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(n){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cF=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(oi=0;oi<nr.length;oi++)cF[nr.charCodeAt(oi)]=oi;uF=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},sb=new Map;P0=(t,e,n)=>{if(!t||!(A0(t,e)||typeof t=="object"))return;let r=t.constructor.name,i=hF(n,r),o=i.indexOf(t);return o===-1&&(o=i.length,i.push(t)),o};F0=(t,e,n)=>t.map(r=>Os(r,e,n)),A0=(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]);J0="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9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uZ2VkIiwgewogICAgICAgICAgaWQsCiAgICAgICAgICBiYXNlNjQKICAgICAgICB9KTsKICAgICAgfQogICAgICBjb25zdCBtc2cgPSB7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0LAogICAgICAgIGR4LAogICAgICAgIGR5LAogICAgICAgIGR3LAogICAgICAgIGRoCiAgICAgIH07CiAgICAgIGRlYnVnKCJbaGlnaGxpZ2h0LXdvcmtlcl0gY2FudmFzIGJpdG1hcCBwcm9jZXNzZWQiLCBtc2cpOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UobXNnKTsKICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgfSBlbHNlIHsKICAgICAgZGVidWcoIltoaWdobGlnaHQtd29ya2VyXSBubyBvZmZzY3JlZW5jYW52YXMgc3VwcG9ydCIsIHsKICAgICAgICBpZDogZS5kYXRhLmlkCiAgICAgIH0pOwogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCwgc3RhdHVzOiAidW5zdXBwb3J0ZWQiIH0pOwogICAgfQogIH07Cn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWltYWdlLWJpdG1hcC1kYXRhLXVybC13b3JrZXItRHd0SzhBMHouanMubWFwCg==",mF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),cb=typeof self<"u"&&self.Blob&&new Blob([mF(J0)],{type:"text/javascript;charset=utf-8"});eh=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 yF,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=ab(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=ab(e,n,r,!1),o=pF(this.processMutation.bind(this),e,n,r),s=fF(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)}},nh=class{constructor(e){k(this,"trackedLinkElements",new WeakSet),k(this,"mutationCb"),k(this,"adoptedStyleSheetCb"),k(this,"styleMirror",new Bu),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:Bb(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){}},rh=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(){}},ia=!1;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((ug=t.contentWindow)==null?void 0:ug.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}ce=vW();Ge.addCustomEvent=(t,e)=>{ia&&vt({type:rt.Custom,data:{tag:t,payload:e}})};Ge.freezePage=()=>{Tn.forEach(t=>t.freeze())};Ge.takeFullSnapshot=t=>{if(!ia)throw new Error("please take full snapshot after start recording");Gs(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"})(ub||(ub={}));({addCustomEvent:hb}=Ge),gF=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}},bF=t=>{switch(t){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!1,{password:!0}]}},vF=t=>{let e=n=>{if(n.target){let r=n.target,i=Yb(r);t(i,n)}};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},SF=t=>{let e=n=>{if(n.target){let r=Yb(n.target);t(r)}};return window.addEventListener("focusin",e),()=>window.removeEventListener("focusin",e)},wF=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)},IF=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")&&jc(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}=pb();if(s){let c={};a&&(c=JSON.parse(a));let l={type:"identify",userId:s.toString(),traits:c};jc(l)&&t(l)}}},{userId:r,userTraits:i}=pb();if(r){let o={};i&&(o=JSON.parse(i));let s={type:"identify",userId:r.toString(),traits:o};jc(s)&&t(s)}return window.addEventListener("storage",n),wX(({keyName:o})=>{n({key:o})}),()=>{window.removeEventListener("storage",n),XMLHttpRequest.prototype.send=e}},pb=()=>{let t=ie("ajs_user_id"),e=ie("ajs_user_traits"),n=ie("ajs_anonymous_id");return{userId:t,userTraits:e,anonymousId:n}},jc=t=>{if(!t)return!1;let e="";try{e=JSON.stringify(t)}catch(i){return!1}let n=TF(e),r=ie(Ht.SEGMENT_LAST_SENT_HASH_KEY);return r===void 0||n!==r?(ze(Ht.SEGMENT_LAST_SENT_HASH_KEY,n),!0):!1},TF=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()},EF=(t,e)=>{let n=RF(t),r=[],i=!1,o=!0;for(let s=0;s<n.length;s++){let a=n[s].split("+");r=[],a.length>1&&(r=kF(D0,a)),a=a[a.length-1],a=a==="*"?"*":ZF(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:"+"})}VF(document,"keydown",s=>{NF(s)})},Ut=[];Ie={},Qc=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,CF={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,"-":Qc?173:189,"=":Qc?61:187,";":Qc?59:186,"'":222,"[":219,"]":221,"\\":220},db={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},D0={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},ZF=t=>CF[t.toLowerCase()]||D0[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);fb="iframe parent ready",mb="iframe ok",Ri="highlightLogs",OF=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.`,qg={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&&(qg=new Proxy(qg,{get(t,e,n){return e==="map"&&console.error($n),Reflect.get(t,e,n)}}));ea=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ea=()=>new Date().getTime());AP=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch(e){return!1}return!1};Bu=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||{}),_e=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(_e||{}),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||{}),G0=(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))(G0||{});ju=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&&tb(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&&tb(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--)}},eb=(t,e)=>`${t}@${e}`,Qu=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 ju,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||!O0(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(N0(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=>{V0(m,this.mirror)&&this.iframeManager.addIframe(m),x0(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),zu(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)nb(this.removesSubTreeCache,c)&&!this.movedSet.has(q.parentNode(c))||o(c);for(let c of this.addedSet)!rb(this.droppedSet,c)&&!nb(this.removesSubTreeCache,c)||rb(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"&&jb(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=uh(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=Js({overwriteRecord:null,element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ds(e),value:r,maskInputFn:this.maskInputFn})}),k(this,"processMutation",e=>{if(!Bc(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:ev(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,Z0(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=Ds(n);i=Js({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"),!tv(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]=qb(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)||Bc(n,this.mirror,this.slimDOMOptions)||!JP(n,this.mirror)||(this.addedSet.has(n)?($u(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||k0(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[eb(r,i)]?$u(this.movedSet,n):(this.removes.push({parentId:i,id:r,isShadow:ci(e.target)&&ui(e.target)?!0:void 0}),_P(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(Bc(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[eb(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)),zu(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=[];qP=["INPUT","TEXTAREA","SELECT"],ib=new WeakMap;ra=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}},qu=class{constructor(e){k(this,"iframes",new WeakMap),k(this,"crossOriginIframeMap",new WeakMap),k(this,"crossOriginIframeMirror",new ra($b)),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 ra(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!==G0.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},th=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=X0(Yt(z({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(W0(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(U0({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&&O0(this)&&r.addShadowRoot(a,n),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(n){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cF=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(oi=0;oi<nr.length;oi++)cF[nr.charCodeAt(oi)]=oi;uF=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},ob=new Map;M0=(t,e,n)=>{if(!t||!(F0(t,e)||typeof t=="object"))return;let r=t.constructor.name,i=hF(n,r),o=i.indexOf(t);return o===-1&&(o=i.length,i.push(t)),o};P0=(t,e,n)=>t.map(r=>Os(r,e,n)),F0=(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]);A0="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZ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AgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCwgc3RhdHVzOiAidHJhbnNwYXJlbnQiIH0pOwogICAgICB9CiAgICAgIGlmIChsYXN0QmxvYk1hcC5nZXQoaWQpID09PSBiYXNlNjQpIHsKICAgICAgICBkZWJ1ZygiW2hpZ2hsaWdodC13b3JrZXJdIGNhbnZhcyBiaXRtYXAgaXMgdW5jaGFuZ2VkIiwgewogICAgICAgICAgaWQsCiAgICAgICAgICBiYXNlNjQKICAgICAgICB9KTsKICAgICAgfQogICAgICBjb25zdCBtc2cgPSB7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0LAogICAgICAgIGR4LAogICAgICAgIGR5LAogICAgICAgIGR3LAogICAgICAgIGRoCiAgICAgIH07CiAgICAgIGRlYnVnKCJbaGlnaGxpZ2h0LXdvcmtlcl0gY2FudmFzIGJpdG1hcCBwcm9jZXNzZWQiLCBtc2cpOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UobXNnKTsKICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgfSBlbHNlIHsKICAgICAgZGVidWcoIltoaWdobGlnaHQtd29ya2VyXSBubyBvZmZzY3JlZW5jYW52YXMgc3VwcG9ydCIsIHsKICAgICAgICBpZDogZS5kYXRhLmlkCiAgICAgIH0pOwogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCwgc3RhdHVzOiAidW5zdXBwb3J0ZWQiIH0pOwogICAgfQogIH07Cn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPWltYWdlLWJpdG1hcC1kYXRhLXVybC13b3JrZXItRHd0SzhBMHouanMubWFwCg==",mF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),lb=typeof self<"u"&&self.Blob&&new Blob([mF(A0)],{type:"text/javascript;charset=utf-8"});eh=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 yF,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=sb(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=sb(e,n,r,!1),o=pF(this.processMutation.bind(this),e,n,r),s=fF(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)}},nh=class{constructor(e){k(this,"trackedLinkElements",new WeakSet),k(this,"mutationCb"),k(this,"adoptedStyleSheetCb"),k(this,"styleMirror",new Bu),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:zb(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){}},rh=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(){}},ia=!1;try{if(Array.from([1],t=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((cg=t.contentWindow)==null?void 0:cg.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}ce=vW();Ge.addCustomEvent=(t,e)=>{ia&&vt({type:rt.Custom,data:{tag:t,payload:e}})};Ge.freezePage=()=>{Tn.forEach(t=>t.freeze())};Ge.takeFullSnapshot=t=>{if(!ia)throw new Error("please take full snapshot after start recording");Gs(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"})(cb||(cb={}));({addCustomEvent:ub}=Ge),gF=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}},bF=t=>{switch(t){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!1,{password:!0}]}},vF=t=>{let e=n=>{if(n.target){let r=n.target,i=Db(r);t(i,n)}};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},SF=t=>{let e=n=>{if(n.target){let r=Db(n.target);t(r)}};return window.addEventListener("focusin",e),()=>window.removeEventListener("focusin",e)},wF=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)},IF=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")&&jc(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}=hb();if(s){let c={};a&&(c=JSON.parse(a));let l={type:"identify",userId:s.toString(),traits:c};jc(l)&&t(l)}}},{userId:r,userTraits:i}=hb();if(r){let o={};i&&(o=JSON.parse(i));let s={type:"identify",userId:r.toString(),traits:o};jc(s)&&t(s)}return window.addEventListener("storage",n),wX(({keyName:o})=>{n({key:o})}),()=>{window.removeEventListener("storage",n),XMLHttpRequest.prototype.send=e}},hb=()=>{let t=ie("ajs_user_id"),e=ie("ajs_user_traits"),n=ie("ajs_anonymous_id");return{userId:t,userTraits:e,anonymousId:n}},jc=t=>{if(!t)return!1;let e="";try{e=JSON.stringify(t)}catch(i){return!1}let n=TF(e),r=ie(Ht.SEGMENT_LAST_SENT_HASH_KEY);return r===void 0||n!==r?(ze(Ht.SEGMENT_LAST_SENT_HASH_KEY,n),!0):!1},TF=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()},EF=(t,e)=>{let n=RF(t),r=[],i=!1,o=!0;for(let s=0;s<n.length;s++){let a=n[s].split("+");r=[],a.length>1&&(r=kF(J0,a)),a=a[a.length-1],a=a==="*"?"*":ZF(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:"+"})}VF(document,"keydown",s=>{NF(s)})},Ut=[];Ie={},Qc=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,CF={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,"-":Qc?173:189,"=":Qc?61:187,";":Qc?59:186,"'":222,"[":219,"]":221,"\\":220},pb={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},J0={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},ZF=t=>CF[t.toLowerCase()]||J0[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);db="iframe parent ready",fb="iframe ok",Ri="highlightLogs",OF=t=>{let e=ie(Ri)||"";e=e+"["+new Date().getTime()+"] "+t+`
339
339
  `,ze(Ri,e)},GF=()=>ie(Ri)||"",LF=t=>{if(!t)return;let e=ie(Ri)||"";e&&(e.startsWith(t)?(e=e.slice(t.length),ze(Ri,e)):OF("Unable to clear logs "+t.replace(`
340
340
  `," ")+" from "+e.replace(`
341
- `," ")))},Y0="dmFyIFZyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxqcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyIEJlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIFF0PU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksWHQ9T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgY3Q9KE0sRCxDKT0+RCBpbiBNP1ZyKE0sRCx7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6Q30pOk1bRF09QyxQPShNLEQpPT57Zm9yKHZhciBDIGluIER8fChEPXt9KSlRdC5jYWxsKEQsQykmJmN0KE0sQyxEW0NdKTtpZihCZSlmb3IodmFyIEMgb2YgQmUoRCkpWHQuY2FsbChELEMpJiZjdChNLEMsRFtDXSk7cmV0dXJuIE19LFVlPShNLEQpPT5qcihNLHFyKEQpKTt2YXIgZ2U9KE0sRCk9Pnt2YXIgQz17fTtmb3IodmFyIEogaW4gTSlRdC5jYWxsKE0sSikmJkQuaW5kZXhPZihKKTwwJiYoQ1tKXT1NW0pdKTtpZihNIT1udWxsJiZCZSlmb3IodmFyIEogb2YgQmUoTSkpRC5pbmRleE9mKEopPDAmJlh0LmNhbGwoTSxKKSYmKENbSl09TVtKXSk7cmV0dXJuIEN9O3ZhciB1dD0oTSxELEMpPT5jdChNLHR5cGVvZiBE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b24qKCl7aWYoZy5kYXRhLm1lc3NhZ2UudHlwZT09PUsuSW5pdGlhbGl6ZSl7dD1nLmRhdGEubWVzc2FnZS5iYWNrZW5kLG49Zy5kYXRhLm1lc3NhZ2Uuc2Vzc2lvblNlY3VyZUlELHM9Zy5kYXRhLm1lc3NhZ2UuZGVidWcsYT1nLmRhdGEubWVzc2FnZS5yZWNvcmRpbmdTdGFydFRpbWUsYy5kZWJ1Zz1zLGU9RHIobmV3IGNyKHQse2hlYWRlcnM6e319KSxNcigpKTtyZXR1cm59aWYoZCgpKXRyeXtnLmRhdGEubWVzc2FnZS50eXBlPT09Sy5Bc3luY0V2ZW50cz95aWVsZCB5KGcuZGF0YS5tZXNzYWdlKTpnLmRhdGEubWVzc2FnZS50eXBlPT09Sy5JZGVudGlmeT95aWVsZCB2KGcuZGF0YS5tZXNzYWdlKTpnLmRhdGEubWVzc2FnZS50eXBlPT09Sy5Qcm9wZXJ0aWVzP3lpZWxkIGIoZy5kYXRhLm1lc3NhZ2UpOmcuZGF0YS5tZXNzYWdlLnR5cGU9PT1LLk1ldHJpY3M/eWllbGQgbShnLmRhdGEubWVzc2FnZSk6Zy5kYXRhLm1lc3NhZ2UudHlwZT09PUsuRmVlZGJhY2smJih5aWVsZCBOKGcuZGF0YS5tZXNzYWdlKSksaT0wfWNhdGNoKEUpe3MmJmNvbnNvbGUuZXJyb3IoRSksaSs9MX19KX19fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aGlnaGxpZ2h0LWNsaWVudC13b3JrZXItQ3BtbDJKMXQuanMubWFwCg==",XF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),yb=typeof self<"u"&&self.Blob&&new Blob([XF(Y0)],{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||{}),UF=({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)},MF=({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=PF,document.head.appendChild(e),e.addEventListener("load",()=>{var n;(n=window.mixpanel)==null||n.init(t)})},PF="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",FF="9.15.0",ih=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 gb(this.debugOptions.clientInteractions),this.Qn=new WF,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
+ `," ")))},D0="dmFyIFZyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxqcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyIEJlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIFF0PU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksWHQ9T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgY3Q9KE0sRCxDKT0+RCBpbiBNP1ZyKE0sRCx7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6Q30pOk1bRF09QyxQPShNLEQpPT57Zm9yKHZhciBDIGluIER8fChEPXt9KSlRdC5jYWxsKEQsQykmJmN0KE0sQyxEW0NdKTtpZihCZSlmb3IodmFyIEM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mJmNvbnNvbGUuZXJyb3IoRSksaSs9MX19KX19fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aGlnaGxpZ2h0LWNsaWVudC13b3JrZXItQ3BtbDJKMXQuanMubWFwCg==",XF=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),mb=typeof self<"u"&&self.Blob&&new Blob([XF(D0)],{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||{}),UF=({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)},MF=({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=PF,document.head.appendChild(e),e.addEventListener("load",()=>{var n;(n=window.mixpanel)==null||n.init(t)})},PF="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",FF="9.15.0",ih=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 yb(this.debugOptions.clientInteractions),this.Qn=new WF,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=Zs();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))uu(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))uu(o);this.sessionData.sessionSecureID=pu(),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:uX()},(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 FL(`${this.mn}`,{headers:{}});this.graphqlSDK=lX(h,NX()),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,ze(Ht.USER_IDENTIFIER,e.toString()),ze(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=Zs(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(au.CLIENT_ID);u||(u=pu(),ze(au.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(""),wn(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()},ig)),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]=bF(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:[BX()],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<dX||(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===fb){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:mb},"*"),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:fb,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},ig),window.addEventListener("message",e=>{e.data.highlight===mb&&this.logger.log("highlight got response from initialized iframe")})}El(){var e;try{let r=this;this.enableSegmentIntegration&&this.listeners.push(IF(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(gF(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,r.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(AX(o=>{this.addCustomEvent("Viewport",o)})),this.listeners.push(vF((o,s)=>{let a=null,c=null;if(s&&s.target){let l=s.target;a=PX(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(SF(o=>{o&&this.addCustomEvent("Focus",o)})),this.sessionShortcut&&EF(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.")):(wF(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),wn(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),wn(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://${sg}/${n}/sessions/${r}?ts=${i}`}getCurrentSessionURL(){let e=this.sessionData.projectID,n=this.sessionData.sessionSecureID;return e&&n?`https://${sg}/${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>pX&&(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:Nb(Ub),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(),wn(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()},hX))})}addCustomEvent(e,n){if(this.state==="NotRecording"){let r,i=()=>{clearInterval(r),this.state==="Recording"&&this.events.length>0?hb(e,n):r=setTimeout(i,500)};r=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&hb(e,n)}Rl(e){return Dt(this,arguments,function*({sendFn:n}){let r=[...this.events],{bytes:i,time:o}=this.enableCanvasRecording?og.canvas:og.normal;this.wr>=i&&new Date().getTime()-this.xo>=o&&this.takeFullSnapshot(),this.logger.log(`Sending: ${r.length} events,
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()},rg)),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]=bF(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:[BX()],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<dX||(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===db){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:fb},"*"),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:db,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},rg),window.addEventListener("message",e=>{e.data.highlight===fb&&this.logger.log("highlight got response from initialized iframe")})}El(){var e;try{let r=this;this.enableSegmentIntegration&&this.listeners.push(IF(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(gF(o=>{this.reloaded?(this.addCustomEvent("Reload",o),this.reloaded=!1,r.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",o)})),this.listeners.push(AX(o=>{this.addCustomEvent("Viewport",o)})),this.listeners.push(vF((o,s)=>{let a=null,c=null;if(s&&s.target){let l=s.target;a=PX(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(SF(o=>{o&&this.addCustomEvent("Focus",o)})),this.sessionShortcut&&EF(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.")):(wF(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),wn(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),wn(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://${og}/${n}/sessions/${r}?ts=${i}`}getCurrentSessionURL(){let e=this.sessionData.projectID,n=this.sessionData.sessionSecureID;return e&&n?`https://${og}/${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>pX&&(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:xb(Wb),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(),wn(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()},hX))})}addCustomEvent(e,n){if(this.state==="NotRecording"){let r,i=()=>{clearInterval(r),this.state==="Recording"&&this.events.length>0?ub(e,n):r=setTimeout(i,500)};r=setTimeout(i,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&ub(e,n)}Rl(e){return Dt(this,arguments,function*({sendFn:n}){let r=[...this.events],{bytes:i,time:o}=this.enableCanvasRecording?ig.canvas:ig.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=GF();n?yield n({session_secure_id:this.sessionData.sessionSecureID,payload_id:(this.sessionData.payloadID++).toString(),events:{events:r},messages:YL({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}}),wn(this.sessionData),this.events=this.events.slice(r.length),LF(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 hu(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=Zs(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(gX);if(r&&(e=r==null?void 0:r.groups)!=null&&e.domain){let i=(n=r.groups.domain)!=null?n:"";return`https://${mX[i]}${yX}`}return fX}},Ci=class extends JX{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:FF,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 ih(f),n!=null&&n.manualStart||this.record.start(),In.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&&MF(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&&UF(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=WX(n.context),f=UX(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 q0=Object.defineProperty,tS=Object.defineProperties,eS=Object.getOwnPropertyDescriptors,Mi=Object.getOwnPropertySymbols,dp=Object.prototype.hasOwnProperty,fp=Object.prototype.propertyIsEnumerable,Dh=(t,e,n)=>e in t?q0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,at=(t,e)=>{for(var n in e||(e={}))dp.call(e,n)&&Dh(t,n,e[n]);if(Mi)for(var n of Mi(e))fp.call(e,n)&&Dh(t,n,e[n]);return t},me=(t,e)=>tS(t,eS(e)),mp=(t,e)=>{var n={};for(var r in t)dp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Mi)for(var r of Mi(t))e.indexOf(r)<0&&fp.call(t,r)&&(n[r]=t[r]);return n};function nS(t){return`/${t.replace(/~/g,"~0").replace(/\//g,"~1")}`}function yp(t){return t.indexOf("~")?t.replace(/~1/g,"/").replace(/~0/g,"~"):t}function rS(t){return(t.startsWith("/")?t.substring(1):t).split("/").map(e=>yp(e))}function iS(t){return!t.startsWith("/")}function oS(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("/")?nS(n):n}else{if(this.redactionName=t,t===""||t==="/"||!oS(t)){this.isValid=!1,this.g=[];return}iS(t)?this.g=[t]:t.indexOf("/",1)<0?this.g=[yp(t.slice(1))]:this.g=rS(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 sS=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}},gp=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}},bp=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}},vp=class extends Ln{constructor(t){super(`string matching ${t}`,""),this.expression=t}is(t){return typeof t=="string"&&!!t.match(this.expression)}},aS=class{is(t){return typeof t=="function"}getType(){return"function"}},lS=class{is(t){return typeof t=="boolean"||typeof t=="undefined"||t===null}getType(){return"boolean | undefined | null"}},cS=/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d*)?(Z|[-+]\d\d(:\d\d)?)/,uS=class{is(t){return typeof t=="number"||typeof t=="string"&&cS.test(t)}getType(){return"date"}},hS=class extends vp{constructor(){super(/^(\w|\.|-)+$/)}is(t){return super.is(t)&&t!=="kind"}},G=class{static createTypeArray(t,e){return new gp(t,e)}static numberWithMin(t){return new bp(t)}static stringMatchingRegex(t){return new vp(t)}};G.String=new Ln("string","");G.Number=new Ln("number",0);G.ObjectOrFactory=new sS;G.Object=new Ln("object",{});G.StringArray=new gp("string[]","");G.Boolean=new Ln("boolean",!0);G.Function=new aS;G.Date=new uS;G.Kind=new hS;G.NullableBoolean=new lS;function Sp(t){return"kind"in t?G.String.is(t.kind)&&t.kind!=="multi":!1}function wp(t){return"kind"in t?G.String.is(t.kind)&&t.kind==="multi":!1}function Ip(t){return!("kind"in t)||t.kind===null||t.kind===void 0}function Pi(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=>Pi(n,[...e,t])).map(n=>n===void 0?"null":n).join(",")}]`:`{${Object.keys(t).sort().map(n=>{let r=Pi(t[n],[...e,t]);if(r!==void 0)return`${JSON.stringify(n)}:${r}`}).filter(n=>n!==void 0).join(",")}}`}var La="user";function Yh(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function pS(t){return t&&G.Object.is(t)}function Kh(t){return G.Kind.is(t)}function _h(t){return G.String.is(t)&&t!==""}function Ra(t,e=!1){return t?t.map(n=>new Nn(n,e)):[]}function dS(t){return t!=null}function fS(t){let e=me(at({},t.custom||[]),{kind:"user",key:String(t.key)});if(dS(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(Kh);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 pS(h)?(c[l]=h,i[l]=Ra((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=>_h(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=Kh(i),s=_h(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=Ra((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=fS(e),n.st={user:Ra(e.privateAttributeNames,!0)},n}static fromLDContext(e){return e?Sp(e)?wt.ze(e):wp(e)?wt.He(e):Ip(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=La){return e.isKind?this.kinds:wt.je(e,this.se(n))}key(e=La){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}:${Yh(this.R[e].key)}`).join(":"):`${this.kind}:${Yh(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=Pi(wt.toLDContext(this))}catch(e){}return this.Et}}};xn.UserKind=La;var mS=["key","kind","_meta","anonymous"].map(t=>new Nn(t,!0)),yS=["name","ip","firstName","lastName","email","avatar","country"];function gS(t,e){return t.depth===e.length&&e.every((n,r)=>n===t.getComponent(r))}function bS(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=>gS(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 vS=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=>!mS.some(o=>o.compare(i)))}ne(t,e,n,r){let i=this.Ke||r&&e.anonymous===!0,{cloned:o,excluded:s}=bS(e,this.We(t,e,n,i));return t.legacy&&yS.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}},Hh=30*1e3,SS=.5,wS=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(Hh/this.re))}A(){let t=Math.min(this.Dt,this.qe),e=this.re*2**t;return Math.min(e,Hh)}Ye(t){return t-Math.trunc(this.Je()*SS*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}},zh;(function(t){t[t.Valid=0]="Valid",t[t.Initializing=1]="Initializing",t[t.Interrupted=2]="Interrupted",t[t.Closed=3]="Closed"})(zh||(zh={}));var Fi=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.status=n,this.name="LaunchDarklyPollingError",this.recoverable=r}},Xa=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.code=n,this.name="LaunchDarklyStreamingError",this.recoverable=r}},JF=120*1e3,DF=300*1e3,_t;(function(t){t.Unknown="UNKNOWN",t.NetworkError="NETWORK_ERROR",t.ErrorResponse="ERROR_RESPONSE",t.InvalidData="INVALID_DATA"})(_t||(_t={}));var Ai;(function(t){t[t.Disabled=0]="Disabled",t[t.Enabled=1]="Enabled"})(Ai||(Ai={}));var On;(function(t){t[t.AnalyticsEvents=0]="AnalyticsEvents",t[t.DiagnosticEvent=1]="DiagnosticEvent"})(On||(On={}));var qe;(function(t){t[t.Succeeded=0]="Succeeded",t[t.Failed=1]="Failed",t[t.FailedAndMustShutDown=2]="FailedAndMustShutDown"})(qe||(qe={}));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 IS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(Number(t))}function TS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(parseInt(t,10))}function ES(t){return typeof t=="symbol"?"NaN":String(parseFloat(t))}var Ca={s:t=>Vn(t),d:t=>IS(t),i:t=>TS(t),f:t=>ES(t),j:t=>Vn(t),o:t=>Vn(t),O:t=>Vn(t),c:()=>""};function Wa(...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 Ca&&t.length){let a=t.shift();r+=(e=Ca[s])==null?void 0:e.call(Ca,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 RS=["debug","info","warn","error","none"],Pa=class Tp{static get(){return new Tp({})}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):Wa(...e)}catch(r){return Wa(...e)}}oi(e,n){try{e(n)}catch(r){console.error(n)}}x(e,n){var r;if(e>=this.ni){let i=`${RS[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)}},CS={error:G.Function,warn:G.Function,info:G.Function,debug:G.Function},Ep=class{constructor(t,e){Object.entries(CS).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)}},Rp=t=>{let e=new Pa({level:"info",destination:console.error,formatter:Wa});return t?new Ep(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`}},ZS=/^(\w|\.|-)+$/,kS=G.stringMatchingRegex(ZS),VS={is:(t,e)=>kS.is(t)?t.length>64?{valid:!1,message:Ue.tagValueTooLong(e)}:{valid:!0}:{valid:!1,message:Ue.invalidTagValue(e)}},xS=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}=VS.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(" "))}},NS=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 Za(t){return t.replace(/\/+$/,"")}function Fa(t){return t.replace(/^\/+/,"").replace(/\?$/,"")}var Ji=class Cp{constructor(e,n,r=Cp.DEFAULT_EVENTS,i="/bulk",o="/diagnostic",s=!0,a){this.streaming=Za(e),this.polling=Za(n),this.events=Za(r),this.analyticsEventPath=i,this.diagnosticEventPath=o,this.includeAuthorizationHeader=s,this.payloadFilterKey=a}};Ji.DEFAULT_EVENTS="https://events.launchdarkly.com";function Aa(t,e=[]){if(e.length===0)return t;let n=e.map(({key:r,value:i})=>`${r}=${i}`);return`${t}?${n.join("&")}`}function OS(t,e,n){let r=Fa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Aa(`${t.streaming}/${r}`,i)}function GS(t,e,n=[]){let r=Fa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Aa(`${t.polling}/${r}`,i)}function Bh(t,e,n=[]){let r=Fa(e);return Aa(`${t.events}/${r}`,n)}var Zp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyUnexpectedResponseError"}},jh=class extends Error{constructor(t){super(t),this.name="LaunchDarklyClientError"}},kp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyTimeoutError"}};function Ki(t){return t>=400&&t<500?t===400||t===408||t===429:!0}function LS(t){return t===413?!0:Ki(t)}function XS(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 kp(s))},t*1e3)}),cancel:()=>{r(),clearTimeout(n)}}}function Vp(t){return t==null?t:JSON.parse(JSON.stringify(t))}function ka(t){return Math.trunc(t*1e3)}var WS=t=>JSON.stringify(t)==="{}",Ja=(t,e)=>t&&Object.entries(t).reduce((n,[r,i])=>(i&&!WS(i)&&!(e!=null&&e.includes(r))&&(n[r]=typeof i=="object"?Ja(i,e):i),n),{});function Wi(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(!Wi(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(!Wi(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(!Wi(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function US(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 xp({status:t}){return t?Ki(t):!0}var Qh=(t,e)=>e.btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),Np=async(t=1e3)=>new Promise(e=>{setTimeout(e,t)}),MS=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}},Ua;(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"})(Ua||(Ua={}));var PS=Ua,Op=class{static invalidMetricValue(t){return`The track function was called with a non-numeric "metricValue" (${t}), only numeric metric values are supported.`}};Op.MissingContextKeyNoEvent="Context was unspecified or had no key; event will not be sent";var FS=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=Bh(n.serviceEndpoints,i,[]),this.hi=Bh(n.serviceEndpoints,o,[]),this.T=a,this.di=s}async nt(t,e,n,r){let i={status:qe.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 Zp(Gn({status:a,message:"some events were dropped"},"event posting")),!Ki(a))return LS(a)?i.status=qe.Failed:i.status=qe.FailedAndMustShutDown,i.error=s,i}catch(a){s=a}return s&&!r?(i.status=qe.Failed,i.error=s,i):(await Np(),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 Di(t){return t.kind==="feature"}function AS(t){return t.kind==="identify"}function JS(t){return t.kind==="migration_op"}var DS=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 YS(t){return`${t.key}:${t.variation!==null&&t.variation!==void 0?t.variation:""}:${t.version!==null&&t.version!==void 0?t.version:""}`}var Gp=class{constructor(t=!1,e){this.fi=t,this.S=e,this.Y=0,this.rt=0,this.at={},this.ot={}}summarizeEvent(t){if(Di(t)&&!t.excludeFromSummaries){this.y||(this.y=t.context);let e=YS(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 DS(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={}}},KS=class extends Error{constructor(t){super(t),this.name="LaunchDarklyInvalidSDKKeyError"}},_S=class{constructor(t,e){this.S=t,this.t=e,this.Z={}}summarizeEvent(t){var e;if(Di(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 Gp(!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 Ui(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}function HS(t){return t.getSummaries!==void 0}var zS=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 FS(e,n),this.S=new vS(t.allAttributesPrivate,t.privateAttributes.map(a=>new Nn(a))),s?this.X=new _S(this.S,this.t):this.X=new Gp,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 KS("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=[],HS(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(JS(t)){if(Ui(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=Di(t),r=n&&t.trackEvents||!n,i=this.yi(t),o=AS(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&&Ui(t.samplingRatio)&&this.ut(this.Ot(t,!1)),i&&Ui(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 Di(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===qe.FailedAndMustShutDown&&(this.At=!0),e.serverTime&&(this.me=e.serverTime),e.error)throw e.error}},Lp=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}},Ma=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)}},Xp=class{constructor(t,e=1){this.context=t,this.samplingRatio=e,this.kind="identify",this.creationDate=Date.now()}},BS=class{close(){}async flush(){}sendEvent(){}},jS=class{constructor(t){this.Tt=t}evalEvent(t){var e;return new Ma(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 Ma(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 Xp(t,1)}customEvent(t,e,n,r,i=1){return new Lp(e,t,n!=null?n:void 0,r!=null?r:void 0,i)}},$h="FDv1Fallback";function QS(t){return{vi:t,De:"",useSelector(e){return this.De=e,this},processFullTransfer(e){let n=[{event:"server-intent",data:{payloads:[{id:$h,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:$h}}),this.vi.processEvents(n)}}}var Wp=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=[]}},$S=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 Wp(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 qS(t){if(t){let e=Object.keys(t).find(n=>n.toLowerCase()==="x-ld-envid");if(e)return{environmentId:t[e]}}}var qh="unknown plugin";function Yi(t,e){try{return e.getMetadata().name||qh}catch(n){return t.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),qh}}function tw(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 ${Yi(t,i)} returned undefined from getHooks.`):s&&s.length>0&&r.push(...s)}catch(s){t.error(`Exception thrown getting hooks for plugin ${Yi(t,i)}. Unable to get hooks.`)}}),r}function ew(t,e,n,r){r.forEach(i=>{try{i.register(n,e)}catch(o){t.error(`Exception thrown registering plugin ${Yi(t,i)}.`)}})}var de=Object.freeze({__proto__:null,ClientMessages:Op,DiagnosticsManager:MS,ErrorKinds:PS,EventFactoryBase:jS,EventProcessor:zS,FDv1PayloadAdaptor:QS,InputCustomEvent:Lp,InputEvalEvent:Ma,InputIdentifyEvent:Xp,NullEventProcessor:BS,PayloadProcessor:Wp,PayloadStreamReader:$S,canonicalize:Pi,initMetadataFromHeaders:qS,isLegacyUser:Ip,isMultiKind:wp,isSingleKind:Sp,safeGetHooks:tw,safeGetName:Yi,safeRegisterPlugins:ew,shouldSample:Ui}),Kt;(function(t){t.Initializing="INITIALIZING",t.Valid="VALID",t.Interrupted="INTERRUPTED",t.SetOffline="SET_OFFLINE",t.Closed="CLOSED"})(Kt||(Kt={}));function nw(t){return t>=200&&t<=299}var tp=class extends Error{constructor(t,e){super(t),this.status=e,this.name="LaunchDarklyRequestError"}},rw=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(nw(e.status))return await e.text();t=e.status}catch(e){throw new tp(e==null?void 0:e.message)}throw new tp(`Unexpected status code: ${t}`,t)}};function ep(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=GS(e,f,m);return new rw(r,d,p,h,u)}var np=new Error("Task has already been executed or shed. This is likely an implementation error. The task will not be executed again.");function iw(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(np)),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(np)),s=!0,o.then(a=>{r({status:"shed"},a)})},promise:i,sheddable:n}}function ow(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=iw(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 sw={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},aw=300,Up="https://clientsdk.launchdarkly.com",Mp="https://clientstream.launchdarkly.com";function lw(t){return t instanceof Ep?t:Rp(t)}var cw=class{constructor(t={},e={getImplementationHooks:()=>[],credentialType:"mobileKey"}){var n,r,i;this.logger=Rp(),this.baseUri=Up,this.eventsUri=Ji.DEFAULT_EVENTS,this.streamUri=Mp,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=aw,this.hooks=[],this.inspectors=[],this.logger=lw(t.logger),this.Ti(t).forEach(o=>this.logger.warn(o)),this.serviceEndpoints=new Ji(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 xS({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=sw[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 bp&&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 Pp(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 Fp=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 Ap(t){return async e=>Pp(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 uw(t,e){return gr([{value:"LaunchDarkly",transform:fe},{value:e,transform:Ap(t)}])}async function hw(t){return gr([{value:"LaunchDarkly",transform:fe},{value:"AnonymousKeys",transform:fe},{value:t,transform:fe}])}async function pw(t){return gr([{value:"LaunchDarkly",transform:fe},{value:"ContextKeys",transform:fe},{value:t,transform:fe}])}async function dw(t){return gr([{value:t,transform:fe},{value:"ContextIndex",transform:fe}])}async function rp(t,e,n){return gr([{value:e,transform:fe},{value:n.canonicalKey,transform:Ap(t)}])}var{isLegacyUser:fw,isSingleKind:Va,isMultiKind:ip}=de,Jp="1.0",mw=t=>{let e=t,{kind:n}=e,r=mp(e,["kind"]);return{kind:"multi",[n]:r}},yw=async({crypto:t,info:e},{applicationInfo:n})=>{var r;let{ld_application:i}=e.platformData(),o=(r=Ja(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 Pp(t.createHash("sha256").update(s),"base64"),o.envAttributesVersion=o.envAttributesVersion||Jp,o}},gw=async t=>{var e,n,r,i;let{ld_device:o,os:s}=t.info.platformData(),a=(e=Ja(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 pw("ld_device");return a.key=await Fp(h,t),a.envAttributesVersion=a.envAttributesVersion||Jp,a}},bw=async(t,e,n)=>{if(fw(t))return t;let r,i;if(Va(t)&&t.kind!=="ld_application"||ip(t)&&!t.ld_application?r=await yw(e,n):n.logger.warn("Not adding ld_application environment attributes because it already exists."),Va(t)&&t.kind!=="ld_device"||ip(t)&&!t.ld_device?i=await gw(e):n.logger.warn("Not adding ld_device environment attributes because it already exists."),r||i){let o=Va(t)?mw(t):t;return at(at(at({},o),r?{ld_application:r}:{}),i?{ld_device:i}:{})}return t};function vw(){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:Sw,isMultiKind:ww,isSingleKind:Iw}=de,Da=async(t,e,n)=>{let{anonymous:r,key:i}=e;if(r&&!i){let o=await hw(t);e.key=await Fp(o,n)}},Tw=async(t,e)=>{await Da(t.kind,t,e)},Ew=async(t,e)=>{let n=t,{kind:r}=n,i=mp(n,["kind"]);return Promise.all(Object.entries(i).map(([o,s])=>Da(o,s,e)))},Rw=async(t,e)=>{await Da("user",t,e)},Cw=async(t,e)=>{let n=Vp(t);return Iw(n)&&await Tw(n,e),ww(n)&&await Ew(n,e),Sw(n)&&await Rw(n,e),n},Zw=t=>({customBaseURI:t.serviceEndpoints.polling!==Up,customStreamURI:t.serviceEndpoints.streaming!==Mp,customEventsURI:t.serviceEndpoints.events!==Ji.DEFAULT_EVENTS,eventsCapacity:t.capacity,eventsFlushIntervalMillis:ka(t.flushInterval),reconnectTimeMillis:ka(t.streamInitialReconnectDelay),diagnosticRecordingIntervalMillis:ka(t.diagnosticRecordingInterval),allAttributesPrivate:t.allAttributesPrivate,usingSecureMode:!1,bootstrapMode:!1}),kw=(t,e,n)=>{if(e.sendEvents&&!e.diagnosticOptOut)return new de.DiagnosticsManager(t,n,Zw(e))};function op(t,e){return{value:e!=null?e:null,variationIndex:null,reason:{kind:"ERROR",errorKind:t}}}function sp(t,e,n){return{value:t,variationIndex:e!=null?e:null,reason:n!=null?n:null}}var Vw=(t,e,n,r,i)=>{if(e.sendEvents)return new de.EventProcessor(me(at({},e),{eventsCapacity:e.capacity}),new NS(t,e,n),r,void 0,i,!1,!0)},ap=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})}},xa=class Dp{constructor(){this.container={index:new Array}}static fromJson(e){let n=new Dp;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)):[]}},xw=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=dw(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 rp(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 xa,this.G;try{this.G=xa.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 xa}return this.G}async xe(t){var e,n;let r=await this.Ni(),i=await rp(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 Nw(){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 Ow(t,e){let n=[];return Object.entries(t).forEach(([r,i])=>{let o=e[r];(!o||!Wi(i,o))&&n.push(r)}),Object.keys(e).forEach(r=>{t[r]||n.push(r)}),n}function Gw(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=Ow(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 Lw=class{constructor(t,e,n,r,i=()=>Date.now()){this.$=Nw(),this.w=Gw(this.$,r),this.Mt=this.Ri(t,e,n,r,i)}async Ri(t,e,n,r,i=()=>Date.now()){let o=await uw(t.crypto,e);return new xw(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)}}},lp="unknown hook",Yp="beforeEvaluation",Kp="afterEvaluation",Xw="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||lp}catch(n){return t.error("Exception thrown getting metadata for hook. Unable to get hook name."),lp}}function Ww(t,e,n){return e.map(r=>br(t,Yp,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 Uw(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,Kp,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 Mw(t,e,n){return e.map(r=>br(t,Yp,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 Pw(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,Kp,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 Fw(t,e,n){for(let r=e.length-1;r>=0;r-=1){let i=e[r];br(t,Xw,vr(t,i),()=>{var o;return(o=i==null?void 0:i.afterTrack)==null?void 0:o.call(i,n)},void 0)}}var Aw=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=Ww(this.t,i,o),a=r();return Uw(this.t,i,o,s,a),a}identify(t,e){let n=[...this.F],r={context:t,timeout:e},i=Mw(this.t,n,r);return o=>{Pw(this.t,n,r,i,o)}}addHook(t){this.F.push(t)}afterTrack(t){if(this.F.length===0)return;let e=[...this.F];Fw(this.t,e,t)}};function Jw(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 Dw(t,e){return`an inspector: "${e}" of an invalid type (${t}) was configured`}function Yw(t,e){return`an inspector: "${e}" of type: "${t}" generated an exception`}function Kw(t,e){let n=!1,r={method:(...i)=>{try{t.method(...i)}catch(o){n||(n=!0,e.warn(Yw(r.type,r.name)))}},type:t.type,name:t.name,synchronous:t.synchronous};return r}var _p="flag-used",Hp="flag-details-changed",zp="flag-detail-changed",Bp="client-identity-changed",_w=[_p,Hp,zp,Bp];function Hw(t,e){let n=_w.includes(t.type)&&t.method&&typeof t.method=="function";return n||e.warn(Dw(t.type,t.name)),n}var zw=class{constructor(t,e){this.W=[];let n=t.filter(r=>Hw(r,e));this.W=n.map(r=>Kw(r,e))}hasInspectors(){return this.W.length!==0}onFlagUsed(t,e,n){this.W.forEach(r=>{r.type===_p&&r.method(t,e,n)})}onFlagsChanged(t){this.W.forEach(e=>{e.type===Hp&&e.method(t)})}onFlagChanged(t,e){this.W.forEach(n=>{n.type===zp&&n.method(t,e)})}onIdentityChanged(t){this.W.forEach(e=>{e.type===Bp&&e.method(t)})}},Bw=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 jw(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:cp,ErrorKinds:up}=de,Qw=5,$w=class{constructor(t,e,n,r,i,o){if(this.sdkKey=t,this.autoEnvAttributes=e,this.platform=n,this.a=vw(),this.Ut=15,this.N=new ap(!1),this.ft=new ap(!0),this.Vt=!1,this.Fi=ow(),!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 cw(r,o),this.logger=this.e.logger,this.Se=US(this.sdkKey,this.platform.info,this.e.tags,this.e.serviceEndpoints.includeAuthorizationHeader,this.e.userAgentHeaderName),this.E=new Lw(this.platform,t,this.e.maxCachedContexts,this.e.logger),this.L=kw(t,this.e,n),this.D=Vw(t,this.e,n,this.Se,this.L),this.emitter=new Bw,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=jw(this.sdkKey,this.platform,this.e),this.e.getImplementationHooks(this.environmentMetadata).forEach(a=>{s.push(a)}),this.U=new Aw(this.logger,s),this.Q=new zw(this.e.inspectors,this.logger),this.Q.hasInspectors()&&this.U.addHook(Jw(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()?Vp(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 kp(`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:Qw,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 Cw(t,this.platform);this.autoEnvAttributes===Ai.Enabled&&(c=await bw(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=XS(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(cp.MissingContextKeyNoEvent);return}n!==void 0&&!G.Number.is(n)&&((r=this.logger)==null||r.warn(cp.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 jh(`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))),op(up.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 jh(`Wrong type "${v}" for feature flag "${t}"; returning default value`);return this.emitter.emit("error",this.a.getUnwrappedContext(),I),op(up.WrongType,e)}}let d=sp(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]=sp(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 qw(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 tI=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)}},eI=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 hp(t){t==null||t.debug("Poll completed after the processor was closed. Skipping processing.")}var nI=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 Fi(_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){hp(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){hp(this.t);return}let p=h;if(p.status!==void 0&&!Ki(p.status)){(r=this.t)==null||r.error(Gn(h,"polling request")),(i=this.m)==null||i.call(this,new Fi(_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()}},rI=(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 Xa(_t.InvalidData,"Malformed JSON data in event stream"))};function iI(t,e){e==null||e.debug(`Received ${t} event after processor was closed. Skipping processing.`)}function pp(t){t==null||t.debug("Ping completed after processor was closed. Skipping processing.")}var oI=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=OS(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 xp(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 Xa(_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){iI(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){rI(i,c,this.t,this.m);return}r(l)}else(a=this.m)==null||a.call(this,new Xa(_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){pp(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 Fi(_t.InvalidData,"Malformed JSON data in ping polling response"))}}catch(l){if(this.u){pp(this.t);return}let u=l;(c=this.m)==null||c.call(this,new Fi(_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()}},sI=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 eI(a),this.J=new tI(e,this.dataSourceStatusManager,this.config.logger)}setConnectionParams(t){this.Ji=t}createPollingProcessor(t,e,n,r,i){let o=new nI(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 oI(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 jp(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 _i(){return typeof document!==void 0}function Ya(){return typeof window!==void 0}function Qp(t,e,n){return _i()?(document.addEventListener(t,e,n),()=>{document.removeEventListener(t,e,n)}):()=>{}}function $p(t,e,n){return _i()?(window.addEventListener(t,e,n),()=>{window.removeEventListener(t,e,n)}):()=>{}}function yr(){return Ya()?window.location.href:""}function aI(){return Ya()?window.location.search:""}function lI(){return Ya()?window.location.hash:""}function cI(){if(typeof crypto!==void 0)return crypto;throw Error("Access to a web crypto API is required")}function uI(){return _i()?document.visibilityState:"visibile"}function hI(t){if(_i())return document.querySelectorAll(t)}var pI="[BrowserDataManager]",dI=class extends sI{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(`${pI} ${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=ep(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(!xp(s))throw s;i=s,o<r&&(this.C(Gn(s,"initial poll request","will retry")),await Np(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,jp(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=ep(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 fI(t){let e=Qp("visibilitychange",()=>{uI()==="hidden"&&t()}),n=$p("pagehide",t);return()=>{e(),n()}}function Na(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function mI(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(`^${Na(t.url)}/?$`).test(e);case"canonical":return new RegExp(`^${Na(t.url)}/?$`).test(i);case"substring":return new RegExp(`.*${Na(t.substring)}.*$`).test(i);case"regex":return new RegExp(t.pattern).test(i);default:return!1}}function yI(t,e){let n=[];return e.forEach(r=>{let i=t.target,{selector:o}=r,s=hI(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 gI=class{constructor(t,e){let n=t.filter(o=>{var s;return(s=o.urls)==null?void 0:s.some(a=>mI(a,yr(),aI(),lI()))}),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=>{yI(s,i).forEach(a=>{e(a)})};this.Te=Qp("click",o)}}close(){var t;(t=this.Te)==null||t.call(this)}},bI=300,vI=class{constructor(t){this.No=yr();let e=()=>{let r=yr();r!==this.No&&(this.No=r,t())};this.Jt=setInterval(e,bI);let n=$p("popstate",e);this.$e=()=>{n()}}close(){var t;this.Jt&&clearInterval(this.Jt),(t=this.$e)==null||t.call(this)}},SI=class{constructor(t,e,n,r,i,o=s=>new vI(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 gI(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 Zp(`Encountered error fetching goals: ${t}`))}}close(){var t,e;(t=this.Ne)==null||t.close(),(e=this.qt)==null||e.close()}};function wI(t){return t.kind==="click"}var II=2,qp={fetchGoals:!0,eventUrlTransformer:t=>t,streaming:void 0,plugins:[]},TI={fetchGoals:G.Boolean,eventUrlTransformer:G.Function,streaming:G.Boolean,plugins:G.createTypeArray("LDPlugin",{})};function EI(t){var e;let n=at({},t);return(e=n.flushInterval)!=null||(n.flushInterval=II),n}function RI(t){let e=EI(t);return Object.keys(qp).forEach(n=>{delete e[n]}),e}function CI(t,e){let n=at({},qp);return Object.entries(TI).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 ZI=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}},kI={start:0,end:3},VI={start:4,end:5},Oa={start:6,end:7},Ga={start:8,end:8},xI={start:9,end:9},NI={start:10,end:15};function OI(){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 GI(t){return t[Ga.start]=(t[Ga.start]|128)&191,t[Oa.start]=t[Oa.start]&15|64,`${kn(t,kI)}-${kn(t,VI)}-${kn(t,Oa)}-${kn(t,Ga)}${kn(t,xI)}-${kn(t,NI)}`}function LI(){let t=OI();return GI(t)}function XI(){return typeof crypto!==void 0&&typeof crypto.randomUUID=="function"?crypto.randomUUID():LI()}var WI=class{createHash(t){return new ZI(cI(),t)}randomUUID(){return XI()}};function UI(t){let e=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(e)}var MI=class{btoa(t){return UI(new TextEncoder().encode(t))}},PI=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}},FI=class{constructor(t,e){this.vt=t,this.n={},this.A=new wS(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())}},AI=class{fetch(t,e){return fetch(t,e)}createEventSource(t,e){return new FI(t,e)}getEventSourceCapabilities(){return{customMethod:!1,readTimeout:!1,headers:!1}}};function td(){return typeof localStorage!="undefined"}function JI(){if(!td())return[];let t=[];for(let e=0;e<localStorage.length;e+=1){let n=localStorage.key(e);n&&t.push(n)}return t}var DI=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}`)}}},YI=class{constructor(t,e){this.encoding=new MI,this.crypto=new WI,this.requests=new AI,td()&&(this.storage=new DI(t)),this.info=new PI(e)}},KI=class extends $w{constructor(t,e,n={},r){var i;let{logger:o,debug:s}=n,a=o!=null?o:new Pa({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 YI(a,n),u=CI(n,a),h=RI(me(at({},n),{logger:a})),{eventUrlTransformer:p}=u;super(t,e,l,h,(f,m,d,b,v)=>new dI(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:()=>JI().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 SI(t,l.requests,c,f=>{a.error(f.message)},(f,m)=>{let d=this.getInternalContext();if(!d)return;let b=p(f);wI(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&&fI(()=>this.flush()))}registerPlugins(t){de.safeRegisterPlugins(this.logger,this.environmentMetadata,t,this.te||[]);let e=this.getDebugOverrides();e&&qw(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=jp(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 _I(t,e,n,r={},i){let o=new KI(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 YF(t){return new Pa(t)}function ed(t,e,n){return _I(t,e,Ai.Disabled,n)}var HI=Object.defineProperty,zI=(t,e,n)=>e in t?HI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Te=(t,e,n)=>zI(t,typeof e!="symbol"?e+"":e,n),BI=(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]),jI(r,...n)},jI=(t,...e)=>BI(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>eR);n.recordLog(`${t}${e}`,"warn")}catch(n){}}),QI=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])}},vo=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 QI)}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=[]}},$I=Object.defineProperty,qI=Object.defineProperties,tT=Object.getOwnPropertyDescriptors,So=Object.getOwnPropertySymbols,Pf=Object.prototype.hasOwnProperty,Ff=Object.prototype.propertyIsEnumerable,Zl=(t,e,n)=>e in t?$I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))Pf.call(e,n)&&Zl(t,n,e[n]);if(So)for(var n of So(e))Ff.call(e,n)&&Zl(t,n,e[n]);return t},An=(t,e)=>qI(t,tT(e)),xr=(t,e)=>{var n={};for(var r in t)Pf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&So)for(var r of So(t))e.indexOf(r)<0&&Ff.call(t,r)&&(n[r]=t[r]);return n},Wr=(t,e,n)=>Zl(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 eT(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 lo(t,e){throw new Error(e)}function nT(t){return typeof t=="object"&&t!==null}function rT(t,e){throw new Error("Unexpected invariant triggered.")}var iT=/\r\n|[\n\r]/g;function kl(t,e){let n=0,r=1;for(let i of t.body.matchAll(iT)){if(typeof i.index=="number"||rT(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function oT(t){return Af(t.source,kl(t.source,t.start))}function Af(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+nd([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+nd([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function nd(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 sT(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 aT=class Jf extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=sT(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=rd(Array.isArray(s)?s:s?[s]:void 0);let p=rd((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=>kl(a,m)):p==null?void 0:p.map(m=>kl(m.source,m.start));let f=nT(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,Jf):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+=`
348
+ SessionSecureID: ${this.sessionData.sessionSecureID}`);let s=GF();n?yield n({session_secure_id:this.sessionData.sessionSecureID,payload_id:(this.sessionData.payloadID++).toString(),events:{events:r},messages:YL({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}}),wn(this.sessionData),this.events=this.events.slice(r.length),LF(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 hu(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=Zs(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(gX);if(r&&(e=r==null?void 0:r.groups)!=null&&e.domain){let i=(n=r.groups.domain)!=null?n:"";return`https://${mX[i]}${yX}`}return fX}},Ci=class extends JX{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:FF,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 ih(f),n!=null&&n.manualStart||this.record.start(),In.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&&MF(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&&UF(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=WX(n.context),f=UX(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 $0=Object.defineProperty,q0=Object.defineProperties,tS=Object.getOwnPropertyDescriptors,Mi=Object.getOwnPropertySymbols,pp=Object.prototype.hasOwnProperty,dp=Object.prototype.propertyIsEnumerable,Dh=(t,e,n)=>e in t?$0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,at=(t,e)=>{for(var n in e||(e={}))pp.call(e,n)&&Dh(t,n,e[n]);if(Mi)for(var n of Mi(e))dp.call(e,n)&&Dh(t,n,e[n]);return t},me=(t,e)=>q0(t,tS(e)),fp=(t,e)=>{var n={};for(var r in t)pp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Mi)for(var r of Mi(t))e.indexOf(r)<0&&dp.call(t,r)&&(n[r]=t[r]);return n};function eS(t){return`/${t.replace(/~/g,"~0").replace(/\//g,"~1")}`}function mp(t){return t.indexOf("~")?t.replace(/~1/g,"/").replace(/~0/g,"~"):t}function nS(t){return(t.startsWith("/")?t.substring(1):t).split("/").map(e=>mp(e))}function rS(t){return!t.startsWith("/")}function iS(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("/")?eS(n):n}else{if(this.redactionName=t,t===""||t==="/"||!iS(t)){this.isValid=!1,this.p=[];return}rS(t)?this.p=[t]:t.indexOf("/",1)<0?this.p=[mp(t.slice(1))]:this.p=nS(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 oS=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}},yp=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}},gp=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}},bp=class extends Ln{constructor(t){super(`string matching ${t}`,""),this.expression=t}is(t){return typeof t=="string"&&!!t.match(this.expression)}},sS=class{is(t){return typeof t=="function"}getType(){return"function"}},aS=class{is(t){return typeof t=="boolean"||typeof t=="undefined"||t===null}getType(){return"boolean | undefined | null"}},lS=/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d*)?(Z|[-+]\d\d(:\d\d)?)/,cS=class{is(t){return typeof t=="number"||typeof t=="string"&&lS.test(t)}getType(){return"date"}},uS=class extends bp{constructor(){super(/^(\w|\.|-)+$/)}is(t){return super.is(t)&&t!=="kind"}},G=class{static createTypeArray(t,e){return new yp(t,e)}static numberWithMin(t){return new gp(t)}static stringMatchingRegex(t){return new bp(t)}};G.String=new Ln("string","");G.Number=new Ln("number",0);G.ObjectOrFactory=new oS;G.Object=new Ln("object",{});G.StringArray=new yp("string[]","");G.Boolean=new Ln("boolean",!0);G.Function=new sS;G.Date=new cS;G.Kind=new uS;G.NullableBoolean=new aS;function vp(t){return"kind"in t?G.String.is(t.kind)&&t.kind!=="multi":!1}function Sp(t){return"kind"in t?G.String.is(t.kind)&&t.kind==="multi":!1}function wp(t){return!("kind"in t)||t.kind===null||t.kind===void 0}function Pi(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=>Pi(n,[...e,t])).map(n=>n===void 0?"null":n).join(",")}]`:`{${Object.keys(t).sort().map(n=>{let r=Pi(t[n],[...e,t]);if(r!==void 0)return`${JSON.stringify(n)}:${r}`}).filter(n=>n!==void 0).join(",")}}`}var La="user";function Yh(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function hS(t){return t&&G.Object.is(t)}function Kh(t){return G.Kind.is(t)}function _h(t){return G.String.is(t)&&t!==""}function Ra(t,e=!1){return t?t.map(n=>new Nn(n,e)):[]}function pS(t){return t!=null}function dS(t){let e=me(at({},t.custom||[]),{kind:"user",key:String(t.key)});if(pS(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(Kh);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 hS(h)?(c[l]=h,i[l]=Ra((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=>_h(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=Kh(i),s=_h(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=Ra((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=dS(e),n.st={user:Ra(e.privateAttributeNames,!0)},n}static fromLDContext(e){return e?vp(e)?wt.ze(e):Sp(e)?wt.He(e):wp(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=La){return e.isKind?this.kinds:wt.je(e,this.se(n))}key(e=La){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}:${Yh(this.R[e].key)}`).join(":"):`${this.kind}:${Yh(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=Pi(wt.toLDContext(this))}catch(e){}return this.Et}}};xn.UserKind=La;var fS=["key","kind","_meta","anonymous"].map(t=>new Nn(t,!0)),mS=["name","ip","firstName","lastName","email","avatar","country"];function yS(t,e){return t.depth===e.length&&e.every((n,r)=>n===t.getComponent(r))}function gS(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=>yS(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 bS=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=>!fS.some(o=>o.compare(i)))}ne(t,e,n,r){let i=this.Ke||r&&e.anonymous===!0,{cloned:o,excluded:s}=gS(e,this.We(t,e,n,i));return t.legacy&&mS.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}},Hh=30*1e3,vS=.5,SS=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(Hh/this.re))}A(){let t=Math.min(this.Dt,this.qe),e=this.re*2**t;return Math.min(e,Hh)}Ye(t){return t-Math.trunc(this.Je()*vS*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}},zh;(function(t){t[t.Valid=0]="Valid",t[t.Initializing=1]="Initializing",t[t.Interrupted=2]="Interrupted",t[t.Closed=3]="Closed"})(zh||(zh={}));var Fi=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.status=n,this.name="LaunchDarklyPollingError",this.recoverable=r}},Xa=class extends Error{constructor(t,e,n,r=!0){super(e),this.kind=t,this.code=n,this.name="LaunchDarklyStreamingError",this.recoverable=r}},JF=120*1e3,DF=300*1e3,_t;(function(t){t.Unknown="UNKNOWN",t.NetworkError="NETWORK_ERROR",t.ErrorResponse="ERROR_RESPONSE",t.InvalidData="INVALID_DATA"})(_t||(_t={}));var Ai;(function(t){t[t.Disabled=0]="Disabled",t[t.Enabled=1]="Enabled"})(Ai||(Ai={}));var On;(function(t){t[t.AnalyticsEvents=0]="AnalyticsEvents",t[t.DiagnosticEvent=1]="DiagnosticEvent"})(On||(On={}));var qe;(function(t){t[t.Succeeded=0]="Succeeded",t[t.Failed=1]="Failed",t[t.FailedAndMustShutDown=2]="FailedAndMustShutDown"})(qe||(qe={}));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 wS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(Number(t))}function IS(t){return typeof t=="symbol"?"NaN":typeof t=="bigint"?`${t}n`:String(parseInt(t,10))}function TS(t){return typeof t=="symbol"?"NaN":String(parseFloat(t))}var Ca={s:t=>Vn(t),d:t=>wS(t),i:t=>IS(t),f:t=>TS(t),j:t=>Vn(t),o:t=>Vn(t),O:t=>Vn(t),c:()=>""};function Wa(...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 Ca&&t.length){let a=t.shift();r+=(e=Ca[s])==null?void 0:e.call(Ca,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 ES=["debug","info","warn","error","none"],Pa=class Ip{static get(){return new Ip({})}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):Wa(...e)}catch(r){return Wa(...e)}}oi(e,n){try{e(n)}catch(r){console.error(n)}}x(e,n){var r;if(e>=this.ni){let i=`${ES[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)}},RS={error:G.Function,warn:G.Function,info:G.Function,debug:G.Function},Tp=class{constructor(t,e){Object.entries(RS).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)}},Ep=t=>{let e=new Pa({level:"info",destination:console.error,formatter:Wa});return t?new Tp(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`}},CS=/^(\w|\.|-)+$/,ZS=G.stringMatchingRegex(CS),kS={is:(t,e)=>ZS.is(t)?t.length>64?{valid:!1,message:Ue.tagValueTooLong(e)}:{valid:!0}:{valid:!1,message:Ue.invalidTagValue(e)}},VS=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}=kS.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 Za(t){return t.replace(/\/+$/,"")}function Fa(t){return t.replace(/^\/+/,"").replace(/\?$/,"")}var Ji=class Rp{constructor(e,n,r=Rp.DEFAULT_EVENTS,i="/bulk",o="/diagnostic",s=!0,a){this.streaming=Za(e),this.polling=Za(n),this.events=Za(r),this.analyticsEventPath=i,this.diagnosticEventPath=o,this.includeAuthorizationHeader=s,this.payloadFilterKey=a}};Ji.DEFAULT_EVENTS="https://events.launchdarkly.com";function Aa(t,e=[]){if(e.length===0)return t;let n=e.map(({key:r,value:i})=>`${r}=${i}`);return`${t}?${n.join("&")}`}function NS(t,e,n){let r=Fa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Aa(`${t.streaming}/${r}`,i)}function OS(t,e,n=[]){let r=Fa(e),i=[...n];return t.payloadFilterKey&&i.push({key:"filter",value:t.payloadFilterKey}),Aa(`${t.polling}/${r}`,i)}function Bh(t,e,n=[]){let r=Fa(e);return Aa(`${t.events}/${r}`,n)}var Cp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyUnexpectedResponseError"}},GS=class extends Error{constructor(t){super(t),this.name="LaunchDarklyClientError"}},Zp=class extends Error{constructor(t){super(t),this.name="LaunchDarklyTimeoutError"}};function Ki(t){return t>=400&&t<500?t===400||t===408||t===429:!0}function LS(t){return t===413?!0:Ki(t)}function XS(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 Zp(s))},t*1e3)}),cancel:()=>{r(),clearTimeout(n)}}}function kp(t){return t==null?t:JSON.parse(JSON.stringify(t))}function ka(t){return Math.trunc(t*1e3)}var WS=t=>JSON.stringify(t)==="{}",Ja=(t,e)=>t&&Object.entries(t).reduce((n,[r,i])=>(i&&!WS(i)&&!(e!=null&&e.includes(r))&&(n[r]=typeof i=="object"?Ja(i,e):i),n),{});function Wi(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(!Wi(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(!Wi(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(!Wi(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function US(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 Vp({status:t}){return t?Ki(t):!0}var jh=(t,e)=>e.btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),xp=async(t=1e3)=>new Promise(e=>{setTimeout(e,t)}),MS=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}},Ua;(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"})(Ua||(Ua={}));var PS=Ua,Np=class{static invalidMetricValue(t){return`The track function was called with a non-numeric "metricValue" (${t}), only numeric metric values are supported.`}};Np.MissingContextKeyNoEvent="Context was unspecified or had no key; event will not be sent";var FS=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=Bh(n.serviceEndpoints,i,[]),this.hi=Bh(n.serviceEndpoints,o,[]),this.T=a,this.di=s}async nt(t,e,n,r){let i={status:qe.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 Cp(Gn({status:a,message:"some events were dropped"},"event posting")),!Ki(a))return LS(a)?i.status=qe.Failed:i.status=qe.FailedAndMustShutDown,i.error=s,i}catch(a){s=a}return s&&!r?(i.status=qe.Failed,i.error=s,i):(await xp(),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 Di(t){return t.kind==="feature"}function AS(t){return t.kind==="identify"}function JS(t){return t.kind==="migration_op"}var DS=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 YS(t){return`${t.key}:${t.variation!==null&&t.variation!==void 0?t.variation:""}:${t.version!==null&&t.version!==void 0?t.version:""}`}var Op=class{constructor(t=!1,e){this.fi=t,this.S=e,this.Y=0,this.rt=0,this.at={},this.ot={}}summarizeEvent(t){if(Di(t)&&!t.excludeFromSummaries){this.y||(this.y=t.context);let e=YS(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 DS(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={}}},KS=class extends Error{constructor(t){super(t),this.name="LaunchDarklyInvalidSDKKeyError"}},_S=class{constructor(t,e){this.S=t,this.t=e,this.Z={}}summarizeEvent(t){var e;if(Di(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 Op(!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 Ui(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}function HS(t){return t.getSummaries!==void 0}var zS=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 FS(e,n),this.S=new bS(t.allAttributesPrivate,t.privateAttributes.map(a=>new Nn(a))),s?this.X=new _S(this.S,this.t):this.X=new Op,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 KS("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=[],HS(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(JS(t)){if(Ui(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=Di(t),r=n&&t.trackEvents||!n,i=this.yi(t),o=AS(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&&Ui(t.samplingRatio)&&this.ut(this.Ot(t,!1)),i&&Ui(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 Di(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===qe.FailedAndMustShutDown&&(this.At=!0),e.serverTime&&(this.me=e.serverTime),e.error)throw e.error}},Gp=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}},Ma=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)}},Lp=class{constructor(t,e=1){this.context=t,this.samplingRatio=e,this.kind="identify",this.creationDate=Date.now()}},BS=class{close(){}async flush(){}sendEvent(){}},jS=class{constructor(t){this.Tt=t}evalEvent(t){var e;return new Ma(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 Ma(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 Lp(t,1)}customEvent(t,e,n,r,i=1){return new Gp(e,t,n!=null?n:void 0,r!=null?r:void 0,i)}},Qh="FDv1Fallback";function QS(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 Xp=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=[]}},$S=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 Xp(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 qS(t){if(t){let e=Object.keys(t).find(n=>n.toLowerCase()==="x-ld-envid");if(e)return{environmentId:t[e]}}}var $h="unknown plugin";function Yi(t,e){try{return e.getMetadata().name||$h}catch(n){return t.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),$h}}function tw(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 ${Yi(t,i)} returned undefined from getHooks.`):s&&s.length>0&&r.push(...s)}catch(s){t.error(`Exception thrown getting hooks for plugin ${Yi(t,i)}. Unable to get hooks.`)}}),r}function ew(t,e,n,r){r.forEach(i=>{try{i.register(n,e)}catch(o){t.error(`Exception thrown registering plugin ${Yi(t,i)}.`)}})}var de=Object.freeze({__proto__:null,ClientMessages:Np,DiagnosticsManager:MS,ErrorKinds:PS,EventFactoryBase:jS,EventProcessor:zS,FDv1PayloadAdaptor:QS,InputCustomEvent:Gp,InputEvalEvent:Ma,InputIdentifyEvent:Lp,NullEventProcessor:BS,PayloadProcessor:Xp,PayloadStreamReader:$S,canonicalize:Pi,initMetadataFromHeaders:qS,isLegacyUser:wp,isMultiKind:Sp,isSingleKind:vp,safeGetHooks:tw,safeGetName:Yi,safeRegisterPlugins:ew,shouldSample:Ui}),Kt;(function(t){t.Initializing="INITIALIZING",t.Valid="VALID",t.Interrupted="INTERRUPTED",t.SetOffline="SET_OFFLINE",t.Closed="CLOSED"})(Kt||(Kt={}));function nw(t){return t>=200&&t<=299}var qh=class extends Error{constructor(t,e){super(t),this.status=e,this.name="LaunchDarklyRequestError"}},rw=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(nw(e.status))return await e.text();t=e.status}catch(e){throw new qh(e==null?void 0:e.message)}throw new qh(`Unexpected status code: ${t}`,t)}};function tp(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=OS(e,f,m);return new rw(r,d,p,h,u)}var ep=new Error("Task has already been executed or shed. This is likely an implementation error. The task will not be executed again.");function iw(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(ep)),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(ep)),s=!0,o.then(a=>{r({status:"shed"},a)})},promise:i,sheddable:n}}function ow(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=iw(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 sw={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},aw=300,Wp="https://clientsdk.launchdarkly.com",Up="https://clientstream.launchdarkly.com";function lw(t){return t instanceof Tp?t:Ep(t)}var cw=class{constructor(t={},e={getImplementationHooks:()=>[],credentialType:"mobileKey"}){var n,r,i;this.logger=Ep(),this.baseUri=Wp,this.eventsUri=Ji.DEFAULT_EVENTS,this.streamUri=Up,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=aw,this.hooks=[],this.inspectors=[],this.logger=lw(t.logger),this.Ti(t).forEach(o=>this.logger.warn(o)),this.serviceEndpoints=new Ji(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 VS({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=sw[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 gp&&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 Mp(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 Pp=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 Fp(t){return async e=>Mp(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 uw(t,e){return gr([{value:"LaunchDarkly",transform:fe},{value:e,transform:Fp(t)}])}async function hw(t){return gr([{value:"LaunchDarkly",transform:fe},{value:"AnonymousKeys",transform:fe},{value:t,transform:fe}])}async function pw(t){return gr([{value:"LaunchDarkly",transform:fe},{value:"ContextKeys",transform:fe},{value:t,transform:fe}])}async function dw(t){return gr([{value:t,transform:fe},{value:"ContextIndex",transform:fe}])}async function np(t,e,n){return gr([{value:e,transform:fe},{value:n.canonicalKey,transform:Fp(t)}])}var{isLegacyUser:fw,isSingleKind:Va,isMultiKind:rp}=de,Ap="1.0",mw=t=>{let e=t,{kind:n}=e,r=fp(e,["kind"]);return{kind:"multi",[n]:r}},yw=async({crypto:t,info:e},{applicationInfo:n})=>{var r;let{ld_application:i}=e.platformData(),o=(r=Ja(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 Mp(t.createHash("sha256").update(s),"base64"),o.envAttributesVersion=o.envAttributesVersion||Ap,o}},gw=async t=>{var e,n,r,i;let{ld_device:o,os:s}=t.info.platformData(),a=(e=Ja(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 pw("ld_device");return a.key=await Pp(h,t),a.envAttributesVersion=a.envAttributesVersion||Ap,a}},bw=async(t,e,n)=>{if(fw(t))return t;let r,i;if(Va(t)&&t.kind!=="ld_application"||rp(t)&&!t.ld_application?r=await yw(e,n):n.logger.warn("Not adding ld_application environment attributes because it already exists."),Va(t)&&t.kind!=="ld_device"||rp(t)&&!t.ld_device?i=await gw(e):n.logger.warn("Not adding ld_device environment attributes because it already exists."),r||i){let o=Va(t)?mw(t):t;return at(at(at({},o),r?{ld_application:r}:{}),i?{ld_device:i}:{})}return t};function vw(){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:Sw,isMultiKind:ww,isSingleKind:Iw}=de,Da=async(t,e,n)=>{let{anonymous:r,key:i}=e;if(r&&!i){let o=await hw(t);e.key=await Pp(o,n)}},Tw=async(t,e)=>{await Da(t.kind,t,e)},Ew=async(t,e)=>{let n=t,{kind:r}=n,i=fp(n,["kind"]);return Promise.all(Object.entries(i).map(([o,s])=>Da(o,s,e)))},Rw=async(t,e)=>{await Da("user",t,e)},Cw=async(t,e)=>{let n=kp(t);return Iw(n)&&await Tw(n,e),ww(n)&&await Ew(n,e),Sw(n)&&await Rw(n,e),n},Zw=t=>({customBaseURI:t.serviceEndpoints.polling!==Wp,customStreamURI:t.serviceEndpoints.streaming!==Up,customEventsURI:t.serviceEndpoints.events!==Ji.DEFAULT_EVENTS,eventsCapacity:t.capacity,eventsFlushIntervalMillis:ka(t.flushInterval),reconnectTimeMillis:ka(t.streamInitialReconnectDelay),diagnosticRecordingIntervalMillis:ka(t.diagnosticRecordingInterval),allAttributesPrivate:t.allAttributesPrivate,usingSecureMode:!1,bootstrapMode:!1}),kw=(t,e,n)=>{if(e.sendEvents&&!e.diagnosticOptOut)return new de.DiagnosticsManager(t,n,Zw(e))};function ip(t,e){return{value:e!=null?e:null,variationIndex:null,reason:{kind:"ERROR",errorKind:t}}}function op(t,e,n){return{value:t,variationIndex:e!=null?e:null,reason:n!=null?n:null}}var Vw=(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)},sp=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})}},xa=class Jp{constructor(){this.container={index:new Array}}static fromJson(e){let n=new Jp;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)):[]}},xw=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=dw(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 np(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 xa,this.G;try{this.G=xa.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 xa}return this.G}async xe(t){var e,n;let r=await this.Ni(),i=await np(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 Nw(){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 Ow(t,e){let n=[];return Object.entries(t).forEach(([r,i])=>{let o=e[r];(!o||!Wi(i,o))&&n.push(r)}),Object.keys(e).forEach(r=>{t[r]||n.push(r)}),n}function Gw(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=Ow(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 Lw=class{constructor(t,e,n,r,i=()=>Date.now()){this.$=Nw(),this.w=Gw(this.$,r),this.Mt=this.Ri(t,e,n,r,i)}async Ri(t,e,n,r,i=()=>Date.now()){let o=await uw(t.crypto,e);return new xw(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)}}},ap="unknown hook",Dp="beforeEvaluation",Yp="afterEvaluation",Xw="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||ap}catch(n){return t.error("Exception thrown getting metadata for hook. Unable to get hook name."),ap}}function Ww(t,e,n){return e.map(r=>br(t,Dp,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 Uw(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,Yp,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 Mw(t,e,n){return e.map(r=>br(t,Dp,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 Pw(t,e,n,r,i){for(let o=e.length-1;o>=0;o-=1){let s=e[o],a=r[o];br(t,Yp,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 Fw(t,e,n){for(let r=e.length-1;r>=0;r-=1){let i=e[r];br(t,Xw,vr(t,i),()=>{var o;return(o=i==null?void 0:i.afterTrack)==null?void 0:o.call(i,n)},void 0)}}var Aw=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=Ww(this.t,i,o),a=r();return Uw(this.t,i,o,s,a),a}identify(t,e){let n=[...this.F],r={context:t,timeout:e},i=Mw(this.t,n,r);return o=>{Pw(this.t,n,r,i,o)}}addHook(t){this.F.push(t)}afterTrack(t){if(this.F.length===0)return;let e=[...this.F];Fw(this.t,e,t)}};function Jw(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 Dw(t,e){return`an inspector: "${e}" of an invalid type (${t}) was configured`}function Yw(t,e){return`an inspector: "${e}" of type: "${t}" generated an exception`}function Kw(t,e){let n=!1,r={method:(...i)=>{try{t.method(...i)}catch(o){n||(n=!0,e.warn(Yw(r.type,r.name)))}},type:t.type,name:t.name,synchronous:t.synchronous};return r}var Kp="flag-used",_p="flag-details-changed",Hp="flag-detail-changed",zp="client-identity-changed",_w=[Kp,_p,Hp,zp];function Hw(t,e){let n=_w.includes(t.type)&&t.method&&typeof t.method=="function";return n||e.warn(Dw(t.type,t.name)),n}var zw=class{constructor(t,e){this.W=[];let n=t.filter(r=>Hw(r,e));this.W=n.map(r=>Kw(r,e))}hasInspectors(){return this.W.length!==0}onFlagUsed(t,e,n){this.W.forEach(r=>{r.type===Kp&&r.method(t,e,n)})}onFlagsChanged(t){this.W.forEach(e=>{e.type===_p&&e.method(t)})}onFlagChanged(t,e){this.W.forEach(n=>{n.type===Hp&&n.method(t,e)})}onIdentityChanged(t){this.W.forEach(e=>{e.type===zp&&e.method(t)})}},Bw=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 jw(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:lp,ErrorKinds:cp}=de,Qw=5,$w=class{constructor(t,e,n,r,i,o){if(this.sdkKey=t,this.autoEnvAttributes=e,this.platform=n,this.a=vw(),this.Ut=15,this.N=new sp(!1),this.ft=new sp(!0),this.Vt=!1,this.Fi=ow(),!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 cw(r,o),this.logger=this.e.logger,this.Se=US(this.sdkKey,this.platform.info,this.e.tags,this.e.serviceEndpoints.includeAuthorizationHeader,this.e.userAgentHeaderName),this.E=new Lw(this.platform,t,this.e.maxCachedContexts,this.e.logger),this.L=kw(t,this.e,n),this.D=Vw(t,this.e,n,this.Se,this.L),this.emitter=new Bw,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=jw(this.sdkKey,this.platform,this.e),this.e.getImplementationHooks(this.environmentMetadata).forEach(a=>{s.push(a)}),this.U=new Aw(this.logger,s),this.Q=new zw(this.e.inspectors,this.logger),this.Q.hasInspectors()&&this.U.addHook(Jw(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()?kp(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 Zp(`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:Qw,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 Cw(t,this.platform);this.autoEnvAttributes===Ai.Enabled&&(c=await bw(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=XS(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(lp.MissingContextKeyNoEvent);return}n!==void 0&&!G.Number.is(n)&&((r=this.logger)==null||r.warn(lp.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))),ip(cp.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 GS(`Wrong type "${I}" for feature flag "${t}"; returning default value`);return this.emitter.emit("error",this.a.getUnwrappedContext(),R),ip(cp.WrongType,e)}}let b=op(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]=op(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 qw(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 tI=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)}},eI=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 up(t){t==null||t.debug("Poll completed after the processor was closed. Skipping processing.")}var nI=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 Fi(_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){up(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){up(this.t);return}let p=h;if(p.status!==void 0&&!Ki(p.status)){(r=this.t)==null||r.error(Gn(h,"polling request")),(i=this.m)==null||i.call(this,new Fi(_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()}},rI=(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 Xa(_t.InvalidData,"Malformed JSON data in event stream"))};function iI(t,e){e==null||e.debug(`Received ${t} event after processor was closed. Skipping processing.`)}function hp(t){t==null||t.debug("Ping completed after processor was closed. Skipping processing.")}var oI=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=NS(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 Vp(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 Xa(_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){iI(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){rI(i,c,this.t,this.m);return}r(l)}else(a=this.m)==null||a.call(this,new Xa(_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){hp(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 Fi(_t.InvalidData,"Malformed JSON data in ping polling response"))}}catch(l){if(this.u){hp(this.t);return}let u=l;(c=this.m)==null||c.call(this,new Fi(_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()}},sI=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 eI(a),this.J=new tI(e,this.dataSourceStatusManager,this.config.logger)}setConnectionParams(t){this.Ji=t}createPollingProcessor(t,e,n,r,i){let o=new nI(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 oI(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 Bp(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 _i(){return typeof document!==void 0}function Ya(){return typeof window!==void 0}function jp(t,e,n){return _i()?(document.addEventListener(t,e,n),()=>{document.removeEventListener(t,e,n)}):()=>{}}function Qp(t,e,n){return _i()?(window.addEventListener(t,e,n),()=>{window.removeEventListener(t,e,n)}):()=>{}}function yr(){return Ya()?window.location.href:""}function aI(){return Ya()?window.location.search:""}function lI(){return Ya()?window.location.hash:""}function cI(){if(typeof crypto!==void 0)return crypto;throw Error("Access to a web crypto API is required")}function uI(){return _i()?document.visibilityState:"visibile"}function hI(t){if(_i())return document.querySelectorAll(t)}var pI="[BrowserDataManager]",dI=class extends sI{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(`${pI} ${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=tp(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(!Vp(s))throw s;i=s,o<r&&(this.C(Gn(s,"initial poll request","will retry")),await xp(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,Bp(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=tp(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 fI(t){let e=jp("visibilitychange",()=>{uI()==="hidden"&&t()}),n=Qp("pagehide",t);return()=>{e(),n()}}function Na(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function mI(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(`^${Na(t.url)}/?$`).test(e);case"canonical":return new RegExp(`^${Na(t.url)}/?$`).test(i);case"substring":return new RegExp(`.*${Na(t.substring)}.*$`).test(i);case"regex":return new RegExp(t.pattern).test(i);default:return!1}}function yI(t,e){let n=[];return e.forEach(r=>{let i=t.target,{selector:o}=r,s=hI(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 gI=class{constructor(t,e){let n=t.filter(o=>{var s;return(s=o.urls)==null?void 0:s.some(a=>mI(a,yr(),aI(),lI()))}),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=>{yI(s,i).forEach(a=>{e(a)})};this.Te=jp("click",o)}}close(){var t;(t=this.Te)==null||t.call(this)}},bI=300,vI=class{constructor(t){this.No=yr();let e=()=>{let r=yr();r!==this.No&&(this.No=r,t())};this.Jt=setInterval(e,bI);let n=Qp("popstate",e);this.$e=()=>{n()}}close(){var t;this.Jt&&clearInterval(this.Jt),(t=this.$e)==null||t.call(this)}},SI=class{constructor(t,e,n,r,i,o=s=>new vI(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 gI(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 Cp(`Encountered error fetching goals: ${t}`))}}close(){var t,e;(t=this.Ne)==null||t.close(),(e=this.qt)==null||e.close()}};function wI(t){return t.kind==="click"}var II=2,$p={fetchGoals:!0,eventUrlTransformer:t=>t,streaming:void 0,plugins:[]},TI={fetchGoals:G.Boolean,eventUrlTransformer:G.Function,streaming:G.Boolean,plugins:G.createTypeArray("LDPlugin",{})};function EI(t){var e;let n=at({},t);return(e=n.flushInterval)!=null||(n.flushInterval=II),n}function RI(t){let e=EI(t);return Object.keys($p).forEach(n=>{delete e[n]}),e}function CI(t,e){let n=at({},$p);return Object.entries(TI).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 ZI=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}},kI={start:0,end:3},VI={start:4,end:5},Oa={start:6,end:7},Ga={start:8,end:8},xI={start:9,end:9},NI={start:10,end:15};function OI(){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 GI(t){return t[Ga.start]=(t[Ga.start]|128)&191,t[Oa.start]=t[Oa.start]&15|64,`${kn(t,kI)}-${kn(t,VI)}-${kn(t,Oa)}-${kn(t,Ga)}${kn(t,xI)}-${kn(t,NI)}`}function LI(){let t=OI();return GI(t)}function XI(){return typeof crypto!==void 0&&typeof crypto.randomUUID=="function"?crypto.randomUUID():LI()}var WI=class{createHash(t){return new ZI(cI(),t)}randomUUID(){return XI()}};function UI(t){let e=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(e)}var MI=class{btoa(t){return UI(new TextEncoder().encode(t))}},PI=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}},FI=class{constructor(t,e){this.vt=t,this.n={},this.A=new SS(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())}},AI=class{fetch(t,e){return fetch(t,e)}createEventSource(t,e){return new FI(t,e)}getEventSourceCapabilities(){return{customMethod:!1,readTimeout:!1,headers:!1}}};function qp(){return typeof localStorage!="undefined"}function JI(){if(!qp())return[];let t=[];for(let e=0;e<localStorage.length;e+=1){let n=localStorage.key(e);n&&t.push(n)}return t}var DI=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}`)}}},YI=class{constructor(t,e){this.encoding=new MI,this.crypto=new WI,this.requests=new AI,qp()&&(this.storage=new DI(t)),this.info=new PI(e)}},KI=class extends $w{constructor(t,e,n={},r){var i;let{logger:o,debug:s}=n,a=o!=null?o:new Pa({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 YI(a,n),u=CI(n,a),h=RI(me(at({},n),{logger:a})),{eventUrlTransformer:p}=u;super(t,e,l,h,(f,m,d,b,v)=>new dI(l,f,t,m,u,()=>({pathGet(I,R){return`/sdk/evalx/${t}/contexts/${jh(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}/${jh(R,I)}`},pathReport(I,R){return`/eval/${t}`},pathPing(I,R){return`/ping/${t}`}}),d,b,v),{getLegacyStorageKeys:()=>JI().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 SI(t,l.requests,c,f=>{a.error(f.message)},(f,m)=>{let d=this.getInternalContext();if(!d)return;let b=p(f);wI(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&&fI(()=>this.flush()))}registerPlugins(t){de.safeRegisterPlugins(this.logger,this.environmentMetadata,t,this.te||[]);let e=this.getDebugOverrides();e&&qw(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=Bp(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 _I(t,e,n,r={},i){let o=new KI(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 YF(t){return new Pa(t)}function td(t,e,n){return _I(t,e,Ai.Disabled,n)}var HI=Object.defineProperty,zI=(t,e,n)=>e in t?HI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Te=(t,e,n)=>zI(t,typeof e!="symbol"?e+"":e,n),BI=(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]),jI(r,...n)},jI=(t,...e)=>BI(void 0,null,function*(){try{let{LDObserve:n}=yield Promise.resolve().then(()=>eR);n.recordLog(`${t}${e}`,"warn")}catch(n){}}),QI=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])}},vo=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 QI)}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=[]}},$I=Object.defineProperty,qI=Object.defineProperties,tT=Object.getOwnPropertyDescriptors,So=Object.getOwnPropertySymbols,Mf=Object.prototype.hasOwnProperty,Pf=Object.prototype.propertyIsEnumerable,Zl=(t,e,n)=>e in t?$I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j=(t,e)=>{for(var n in e||(e={}))Mf.call(e,n)&&Zl(t,n,e[n]);if(So)for(var n of So(e))Pf.call(e,n)&&Zl(t,n,e[n]);return t},An=(t,e)=>qI(t,tT(e)),xr=(t,e)=>{var n={};for(var r in t)Mf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&So)for(var r of So(t))e.indexOf(r)<0&&Pf.call(t,r)&&(n[r]=t[r]);return n},Wr=(t,e,n)=>Zl(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 eT(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 lo(t,e){throw new Error(e)}function nT(t){return typeof t=="object"&&t!==null}function rT(t,e){throw new Error("Unexpected invariant triggered.")}var iT=/\r\n|[\n\r]/g;function kl(t,e){let n=0,r=1;for(let i of t.body.matchAll(iT)){if(typeof i.index=="number"||rT(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function oT(t){return Ff(t.source,kl(t.source,t.start))}function Ff(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+ed([[`${s} |`,m[0]],...m.slice(1,p+1).map(d=>["|",d]),["|","^".padStart(f)],["|",m[p+1]]])}return l+ed([[`${s-1} |`,u[i-1]],[`${s} |`,h],["|","^".padStart(c)],[`${s+1} |`,u[i+1]]])}function ed(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 sT(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 aT=class Af extends Error{constructor(e,...n){var r,i,o;let{nodes:s,source:a,positions:c,path:l,originalError:u,extensions:h}=sT(n);super(e),this.name="GraphQLError",this.path=l!=null?l:void 0,this.originalError=u!=null?u:void 0,this.nodes=nd(Array.isArray(s)?s:s?[s]:void 0);let p=nd((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=>kl(a,m)):p==null?void 0:p.map(m=>kl(m.source,m.start));let f=nT(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,Af):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
  `+oT(n.loc));else if(this.source&&this.locations)for(let n of this.locations)e+=`
353
353
 
354
- `+Af(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 rd(t){return t===void 0||t.length===0?void 0:t}function Ct(t,e,n){return new aT(`Syntax Error: ${n}`,{source:t,positions:[e]})}var lT=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}}},Df=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}}},Yf={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"]},cT=new Set(Object.keys(Yf));function id(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&cT.has(e)}var Pn;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Pn||(Pn={}));var Vl;(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"})(Vl||(Vl={}));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 xl(t){return t===9||t===32}function Ur(t){return t>=48&&t<=57}function Kf(t){return t>=97&&t<=122||t>=65&&t<=90}function _f(t){return Kf(t)||t===95}function uT(t){return Kf(t)||Ur(t)||t===95}function hT(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=pT(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 pT(t){let e=0;for(;e<t.length&&xl(t.charCodeAt(e));)++e;return e}function dT(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||xl(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&&xl(t.charCodeAt(0));return(u&&!p||o)&&(h+=`
354
+ `+Ff(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 nd(t){return t===void 0||t.length===0?void 0:t}function Ct(t,e,n){return new aT(`Syntax Error: ${n}`,{source:t,positions:[e]})}var lT=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}}},Jf=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}}},Df={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"]},cT=new Set(Object.keys(Df));function rd(t){let e=t==null?void 0:t.kind;return typeof e=="string"&&cT.has(e)}var Pn;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Pn||(Pn={}));var Vl;(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"})(Vl||(Vl={}));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 xl(t){return t===9||t===32}function Ur(t){return t>=48&&t<=57}function Yf(t){return t>=97&&t<=122||t>=65&&t<=90}function Kf(t){return Yf(t)||t===95}function uT(t){return Yf(t)||Ur(t)||t===95}function hT(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=pT(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 pT(t){let e=0;for(;e<t.length&&xl(t.charCodeAt(e));)++e;return e}function dT(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||xl(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&&xl(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 fT=class{constructor(t){let e=new Df(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=yT(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===S.COMMENT);return t}};function mT(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 Po(t,e){return Hf(t.charCodeAt(e))&&zf(t.charCodeAt(e+1))}function Hf(t){return t>=55296&&t<=56319}function zf(t){return t>=56320&&t<=57343}function hn(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 Df(e,n,r,o,s,i)}function yT(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 gT(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?TT(t,i):vT(t,i)}if(Ur(o)||o===45)return bT(t,i,o);if(_f(o))return ET(t,i);throw Ct(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Hn(o)||Po(n,i)?`Unexpected character: ${hn(t,i)}.`:`Invalid character: ${hn(t,i)}.`)}return It(t,S.EOF,r,r)}function gT(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(Po(n,i))i+=2;else break}return It(t,S.COMMENT,e,i,n.slice(e+1,i))}function bT(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: ${hn(t,i)}.`)}else i=Ka(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Ka(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=Ka(t,i,o),o=r.charCodeAt(i)),o===46||_f(o))throw Ct(t.source,i,`Invalid number, expected digit but got: ${hn(t,i)}.`);return It(t,s?S.FLOAT:S.INT,e,i,r.slice(e,i))}function Ka(t,e,n){if(!Ur(n))throw Ct(t.source,e,`Invalid number, expected digit but got: ${hn(t,e)}.`);let r=t.source.body,i=e+1;for(;Ur(r.charCodeAt(i));)++i;return i}function vT(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?ST(t,i):wT(t,i):IT(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(Hn(a))++i;else if(Po(n,i))i+=2;else throw Ct(t.source,i,`Invalid character within String: ${hn(t,i)}.`)}throw Ct(t.source,i,"Unterminated string.")}function ST(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 wT(t,e){let n=t.source.body,r=od(n,e+2);if(Hn(r))return{value:String.fromCodePoint(r),size:6};if(Hf(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=od(n,e+8);if(zf(i))return{value:String.fromCodePoint(r,i),size:12}}throw Ct(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function od(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 IT(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:`
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 fT=class{constructor(t){let e=new Jf(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=yT(this,t.end);t.next=e,e.prev=t,t=e}while(t.kind===S.COMMENT);return t}};function mT(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 Po(t,e){return _f(t.charCodeAt(e))&&Hf(t.charCodeAt(e+1))}function _f(t){return t>=55296&&t<=56319}function Hf(t){return t>=56320&&t<=57343}function hn(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 Jf(e,n,r,o,s,i)}function yT(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 gT(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?TT(t,i):vT(t,i)}if(Ur(o)||o===45)return bT(t,i,o);if(Kf(o))return ET(t,i);throw Ct(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Hn(o)||Po(n,i)?`Unexpected character: ${hn(t,i)}.`:`Invalid character: ${hn(t,i)}.`)}return It(t,S.EOF,r,r)}function gT(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(Po(n,i))i+=2;else break}return It(t,S.COMMENT,e,i,n.slice(e+1,i))}function bT(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: ${hn(t,i)}.`)}else i=Ka(t,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Ka(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=Ka(t,i,o),o=r.charCodeAt(i)),o===46||Kf(o))throw Ct(t.source,i,`Invalid number, expected digit but got: ${hn(t,i)}.`);return It(t,s?S.FLOAT:S.INT,e,i,r.slice(e,i))}function Ka(t,e,n){if(!Ur(n))throw Ct(t.source,e,`Invalid number, expected digit but got: ${hn(t,e)}.`);let r=t.source.body,i=e+1;for(;Ur(r.charCodeAt(i));)++i;return i}function vT(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?ST(t,i):wT(t,i):IT(t,i);s+=c.value,i+=c.size,o=i;continue}if(a===10||a===13)break;if(Hn(a))++i;else if(Po(n,i))i+=2;else throw Ct(t.source,i,`Invalid character within String: ${hn(t,i)}.`)}throw Ct(t.source,i,"Unterminated string.")}function ST(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 wT(t,e){let n=t.source.body,r=id(n,e+2);if(Hn(r))return{value:String.fromCodePoint(r),size:6};if(_f(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){let i=id(n,e+8);if(Hf(i))return{value:String.fromCodePoint(r,i),size:12}}throw Ct(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function id(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 IT(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 TT(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,hT(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(Po(n,o))o+=2;else throw Ct(t.source,o,`Invalid character within String: ${hn(t,o)}.`)}throw Ct(t.source,o,"Unterminated string.")}function ET(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(uT(o))++i;else break}return It(t,S.NAME,e,i,n.slice(e,i))}var RT=10,Bf=2;function ac(t){return Fo(t,[])}function Fo(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return CT(t,e);default:return String(t)}}function CT(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(ZT(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:Fo(r,n)}else if(Array.isArray(t))return VT(t,n);return kT(t,n)}function ZT(t){return typeof t.toJSON=="function"}function kT(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>Bf?"["+xT(t)+"]":"{ "+n.map(([r,i])=>r+": "+Fo(i,e)).join(", ")+" }"}function VT(t,e){if(t.length===0)return"[]";if(e.length>Bf)return"[Array]";let n=Math.min(RT,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(Fo(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 NT=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=ac(t);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
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(Po(n,o))o+=2;else throw Ct(t.source,o,`Invalid character within String: ${hn(t,o)}.`)}throw Ct(t.source,o,"Unterminated string.")}function ET(t,e){let n=t.source.body,r=n.length,i=e+1;for(;i<r;){let o=n.charCodeAt(i);if(uT(o))++i;else break}return It(t,S.NAME,e,i,n.slice(e,i))}var RT=10,zf=2;function ac(t){return Fo(t,[])}function Fo(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return CT(t,e);default:return String(t)}}function CT(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";let n=[...e,t];if(ZT(t)){let r=t.toJSON();if(r!==t)return typeof r=="string"?r:Fo(r,n)}else if(Array.isArray(t))return VT(t,n);return kT(t,n)}function ZT(t){return typeof t.toJSON=="function"}function kT(t,e){let n=Object.entries(t);return n.length===0?"{}":e.length>zf?"["+xT(t)+"]":"{ "+n.map(([r,i])=>r+": "+Fo(i,e)).join(", ")+" }"}function VT(t,e){if(t.length===0)return"[]";if(e.length>zf)return"[Array]";let n=Math.min(RT,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(Fo(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 NT=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=ac(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},wo=class{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||lo(!1,`Body must be a string. Received: ${ac(e)}.`),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||lo(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||lo(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function OT(t){return NT(t,wo)}function lc(t,e){return new GT(t,e).parseDocument()}var GT=class{constructor(t,e={}){let n=OT(t)?t:new wo(t);this.l=new fT(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,`${Hi(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(Vl,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Rn.noLocation!==!0&&(e.loc=new lT(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 ${jf(t)}, found ${Hi(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 ${Hi(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 ${Hi(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 Hi(t){let e=t.value;return jf(t.kind)+(e!=null?` "${e}"`:"")}function jf(t){return mT(t)?`"${t}"`:t}function LT(t){return`"${t.replace(XT,WT)}"`}var XT=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function WT(t){return UT[t.charCodeAt(0)]}var UT=["\\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"],MT=Object.freeze({});function PT(t,e,n=Yf){let r=new Map;for(let v of Object.values(F))r.set(v,FT(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;id(l)||lo(!1,`Invalid AST Node: ${ac(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===MT)break;if(R===!1){if(!v){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!v))if(id(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 FT(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 AT(t){return PT(t,DT)}var JT=80,DT={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>L(t.definitions,`
369
+ spurious results.`)}}return!1},wo=class{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||lo(!1,`Body must be a string. Received: ${ac(e)}.`),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||lo(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||lo(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function OT(t){return NT(t,wo)}function lc(t,e){return new GT(t,e).parseDocument()}var GT=class{constructor(t,e={}){let n=OT(t)?t:new wo(t);this.l=new fT(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,`${Hi(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(Vl,e.value))return e;throw this.unexpected(t)}node(t,e){return this.Rn.noLocation!==!0&&(e.loc=new lT(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 ${Bf(t)}, found ${Hi(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 ${Hi(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 ${Hi(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 Hi(t){let e=t.value;return Bf(t.kind)+(e!=null?` "${e}"`:"")}function Bf(t){return mT(t)?`"${t}"`:t}function LT(t){return`"${t.replace(XT,WT)}"`}var XT=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function WT(t){return UT[t.charCodeAt(0)]}var UT=["\\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"],MT=Object.freeze({});function PT(t,e,n=Df){let r=new Map;for(let v of Object.values(F))r.set(v,FT(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;rd(l)||lo(!1,`Invalid AST Node: ${ac(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===MT)break;if(R===!1){if(!v){p.pop();continue}}else if(R!==void 0&&(c.push([u,R]),!v))if(rd(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 FT(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 AT(t){return PT(t,DT)}var JT=80,DT={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>JT&&(s=o+B(`(
372
372
  `,co(L(n,`
@@ -375,7 +375,7 @@ spurious results.`)}}return!1},wo=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+(sd(n)?B(`(
378
+ `)+e+(od(n)?B(`(
379
379
  `,co(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},wo=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+(sd(n)?B(`(
388
+ `)+"directive @"+e+(od(n)?B(`(
389
389
  `,co(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
  `,co(L(t,`
393
393
  `)),`
394
394
  }`)}function B(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function co(t){return B(" ",t.replace(/\n/g,`
395
- `))}function sd(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
396
- `)))!==null&&e!==void 0?e:!1}var cc=JSON,YT=t=>t.toUpperCase(),KT=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},_T=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},HT=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},zT=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},ad=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},_a=t=>{if(typeof t=="string"){let n;try{let r=lc(t);n=ad(r)}catch(r){}return{query:t,operationName:n}}let e=ad(t);return{query:AT(t),operationName:e}},Qf=class uo extends Error{constructor(e,n){let r=`${uo.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,uo.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,uo)}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})`}},uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Nl={exports:{}};(function(t,e){var n=typeof self<"u"?self:uc,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})(Nl,Nl.exports);var Io=Nl.exports,ho=hc(Io),BT=eT({__proto__:null,default:ho},[Io]),Xn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||BT&&Io.Headers&&t instanceof Io.Headers?e=KT(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},ld=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),jT=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(ld(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:ld(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},QT=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=qT(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=jT({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:cc});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)}),$T=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>Dn(this,null,function*(){let[r,i,o]=n,s=HT(r,i,o),a=this.requestConfig,{headers:c,fetch:l=ho,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}=_a(s.query);return Ha({url:m,query:s.query,variables:s.variables,headers:j(j({},Xn(za(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=_T(t,n,r),o=this.requestConfig,{headers:s,fetch:a=ho,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}=_a(i.document);return Ha({url:p,query:f,variables:i.variables,headers:j(j({},Xn(za(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=zT(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})=>_a(l).query),c=r.documents.map(({variables:l})=>l);return Ha({url:this.url,query:a,variables:c,headers:j(j({},Xn(za(o))),Xn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:ho,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}},Ha=t=>Dn(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=QT(YT((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield tE(c,(n=o.jsonSerializer)!=null?n:cc),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})}}),qT=(t,e,n,r)=>{let i=r!=null?r:cc;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)},tE=(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()}),za=t=>typeof t=="function"?t():t,Ol={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)}}})(Ol,Ol.exports);var eE=Ol.exports,rn=hc(eE),To=function(){return To=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},To.apply(this,arguments)},po=new Map,Gl=new Map,$f=!0,Eo=!1;function qf(t){return t.replace(/[\s,]+/g," ").trim()}function nE(t){return qf(t.source.body.substring(t.start,t.end))}function rE(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=nE(r.loc),s=Gl.get(i);s&&!s.has(o)?$f&&console.warn("Warning: fragment with name "+i+` already exists.
395
+ `))}function od(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
396
+ `)))!==null&&e!==void 0?e:!1}var cc=JSON,YT=t=>t.toUpperCase(),KT=t=>{let e={};return t.forEach((n,r)=>{e[r]=n}),e},_T=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},HT=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},zT=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},sd=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},_a=t=>{if(typeof t=="string"){let n;try{let r=lc(t);n=sd(r)}catch(r){}return{query:t,operationName:n}}let e=sd(t);return{query:AT(t),operationName:e}},jf=class uo extends Error{constructor(e,n){let r=`${uo.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,uo.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,uo)}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})`}},uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Nl={exports:{}};(function(t,e){var n=typeof self<"u"?self:uc,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})(Nl,Nl.exports);var Io=Nl.exports,ho=hc(Io),BT=eT({__proto__:null,default:ho},[Io]),Xn=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||BT&&Io.Headers&&t instanceof Io.Headers?e=KT(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},ad=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),jT=t=>{if(!Array.isArray(t.query)){let r=t,i=[`query=${encodeURIComponent(ad(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:ad(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},QT=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=qT(i,o,s,c.jsonSerializer),typeof p=="string"&&(u["Content-Type"]="application/json")):h=jT({query:i,variables:o,operationName:s,jsonSerializer:(n=c.jsonSerializer)!=null?n:cc});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)}),$T=class{constructor(t,e={}){this.url=t,this.requestConfig=e,this.rawRequest=(...n)=>Dn(this,null,function*(){let[r,i,o]=n,s=HT(r,i,o),a=this.requestConfig,{headers:c,fetch:l=ho,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}=_a(s.query);return Ha({url:m,query:s.query,variables:s.variables,headers:j(j({},Xn(za(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=_T(t,n,r),o=this.requestConfig,{headers:s,fetch:a=ho,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}=_a(i.document);return Ha({url:p,query:f,variables:i.variables,headers:j(j({},Xn(za(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=zT(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})=>_a(l).query),c=r.documents.map(({variables:l})=>l);return Ha({url:this.url,query:a,variables:c,headers:j(j({},Xn(za(o))),Xn(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:ho,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}},Ha=t=>Dn(void 0,null,function*(){var e,n;let{query:r,variables:i,fetchOptions:o}=t,s=QT(YT((e=t.method)!=null?e:"post")),a=Array.isArray(t.query),c=yield s(t),l=yield tE(c,(n=o.jsonSerializer)!=null?n:cc),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 jf(An(j({},p),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),qT=(t,e,n,r)=>{let i=r!=null?r:cc;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)},tE=(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()}),za=t=>typeof t=="function"?t():t,Ol={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)}}})(Ol,Ol.exports);var eE=Ol.exports,rn=hc(eE),To=function(){return To=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},To.apply(this,arguments)},po=new Map,Gl=new Map,Qf=!0,Eo=!1;function $f(t){return t.replace(/[\s,]+/g," ").trim()}function nE(t){return $f(t.source.body.substring(t.start,t.end))}function rE(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=nE(r.loc),s=Gl.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||Gl.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),To(To({},t),{definitions:n})}function iE(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 oE(t){var e=qf(t);if(!po.has(e)){var n=lc(t,{experimentalFragmentVariables:Eo,allowLegacyFragmentVariables:Eo});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");po.set(e,iE(rE(n)))}return po.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]}),oE(r)}function sE(){po.clear(),Gl.clear()}function aE(){$f=!1}function lE(){Eo=!0}function cE(){Eo=!1}var Sr={gql:Wt,resetCaches:sE,disableFragmentWarnings:aE,enableExperimentalFragmentVariables:lE,disableExperimentalFragmentVariables:cE};(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 tm=Wt`
398
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Gl.set(i,s=new Set),s.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),To(To({},t),{definitions:n})}function iE(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 oE(t){var e=$f(t);if(!po.has(e)){var n=lc(t,{experimentalFragmentVariables:Eo,allowLegacyFragmentVariables:Eo});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");po.set(e,iE(rE(n)))}return po.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]}),oE(r)}function sE(){po.clear(),Gl.clear()}function aE(){Qf=!1}function lE(){Eo=!0}function cE(){Eo=!1}var Sr={gql:Wt,resetCaches:sE,disableFragmentWarnings:aE,enableExperimentalFragmentVariables:lE,disableExperimentalFragmentVariables:cE};(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 qf=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
- ${tm}
568
+ ${qf}
569
569
  `,gE=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
- ${tm}
623
- `,vE=(t,e,n,r)=>t();function SE(t,e=vE){return{PushPayload(n,r){return e(i=>t.request(uE,n,j(j({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(hE,n,j(j({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(pE,n,j(j({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(dE,n,j(j({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(fE,n,j(j({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(mE,n,j(j({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(yE,n,j(j({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(gE,n,j(j({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(bE,n,j(j({},r),i)),"GetSamplingConfig","query",n)}}}var tn=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(tn||{}),jt=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(jt||{});function wE(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 IE(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 Ll(t){return Object.prototype.toString.call(t)==="[object Object]"}function em(t,e){if(e===0)return!0;let n=Object.keys(t);for(let r of n)if(Ll(t[r])&&em(t[r],e-1))return!0;return!1}function Xl(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]=IE(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 Ll(a)&&Object.keys(a).length>n.numOfKeysLimit||typeof a=="function"?!0:a instanceof Event&&a.isTrusted===!1?Object.keys(a).length===1:!!(Ll(a)&&em(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 nm=900*1e3;function zi(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 TE={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 Wl(t,e){function n(i,o,s){if(typeof document<"u"){s=zi({},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,"",zi({},o,{expires:-1}))},withAttributes:function(i){return Wl(this.converter,zi({},this.attributes,i))},withConverter:function(i){return Wl(zi({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Ba=Wl(TE,{path:"/"}),rm="localStorage",Ul=!0,EE=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]}},RE=class{getItem(t){var e;return(e=Ba.get(t))!=null?e:""}setItem(t,e){if(!Ul)return;let n=new Date;n.setTime(n.getTime()+nm),Ba.set(t,e,{expires:n})}removeItem(t){Ul&&Ba.remove(t)}},Ao=new EE,Ro=new RE,pc=()=>{try{switch(rm){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return Ao}},CE=t=>{rm=t},cd=t=>{Ul=t},im=t=>{try{return pc().getItem(t)}catch(e){return ke("storage","debug",`failed to get item ${t}; using global storage`,e),Ao.getItem(t)}},om=(t,e)=>{Ro.setItem(t,e);try{return pc().setItem(t,e)}catch(n){return ke("storage","debug",`failed to set item ${t}; using global storage`,n),Ao.setItem(t,e)}},ZE=t=>{Ro.removeItem(t);try{return pc().removeItem(t)}catch(e){return ke("storage","debug",`failed to remove item ${t}; using global storage`,e),Ao.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||{}),Jo=t=>`${Yr.SESSION_DATA}_${t}`,Fe=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:sm()},kE=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},sm=()=>{var t;return(t=im(Yr.SESSION_ID))!=null?t:""},am=t=>{om(Yr.SESSION_ID,t)},VE=t=>{let e=Jo(t);return JSON.parse(im(e)||"{}")},xE=t=>{t||(t=sm());let e=VE(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<nm)return e;ZE(Jo(t))},lm=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;kE(e),om(Jo(e),JSON.stringify(t))},NE=function(){let t=Ro.getItem(Yr.SESSION_ID);am(t);let e=Jo(t),n=Ro.getItem(e);try{lm(JSON.parse(n))}catch(r){}},cm=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(cm||{}),dc=10,fc=1e3,mc=500,OE=[cm.BillingQuotaExceeded.toString()],GE=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>OE.includes(n.message)))===void 0},LE=()=>{let t=(e,n,r,i,o=0)=>Dn(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof Qf&&!GE(s))throw s;if(o<dc)return yield new Promise(a=>setTimeout(a,fc+mc*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",um="launchdarkly",XE="evaluation",WE=`${Lt}.set.id`,UE=`${Lt}.key`,ME=`${Lt}.contextKeys`,PE=`${Lt}.context.id`,FE=`${Lt}.result.value`,AE=`${Lt}.provider.name`,ud={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`},JE=`${Lt}.result.variationIndex`,DE=`${um}.application.id`,YE=`${um}.application.version`,KE="$ld:telemetry:session:init",_E="$ld:telemetry:error",hd="$ld:telemetry:track",HE="$ld:telemetry:metric",hm="document_load",zE="result.status";function pm(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function dm(t){return t.kind==="multi"}function pd(t){return dm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${pm(t[e].key)}`).join(":"):t.key}function dd(t){return dm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:pm(t[e].key)})).reduce((e,n)=>j(j({},e),n),{}):t.key}var BE=class{constructor(t,e){Wr(this,"client"),Wr(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(KE,{sessionID:t})}recordGauge(t,e){var n;e.category!==jt.WebVital&&e.name!==hm||e.name!=="Jank"&&this.client.track(`${HE}:${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(_E,An(j({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${hd}:${n}`:hd,An(j({},e),{sessionID:t}))}},jE=class extends vo{constructor(t,e){super(),Wr(this,"client"),this.client=new BE(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 QE(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 $E=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)},qE=()=>{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},tR=class{constructor(t){Wr(this,"sessionSecureID");try{t!=null&&t.storageMode&&CE(t==null?void 0:t.storageMode),cd(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?NE():cd(!1);let e=Fe(),n=xE(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=qE(),am(this.sessionSecureID),lm({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){ke("Error initializing @launchdarkly observability plugin","error",e)}}},Co=class extends vo{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])}},ln;typeof globalThis<"u"?globalThis.LDObserve?ln=globalThis.LDObserve:(ln=new Co,globalThis.LDObserve=ln):ln=new Co;var eR=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return ln}},Symbol.toStringTag,{value:"Module"})),nR=Object.defineProperty,rR=Object.defineProperties,iR=Object.getOwnPropertyDescriptors,fd=Object.getOwnPropertySymbols,oR=Object.prototype.hasOwnProperty,sR=Object.prototype.propertyIsEnumerable,Ml=(t,e,n)=>e in t?nR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mt=(t,e)=>{for(var n in e||(e={}))oR.call(e,n)&&Ml(t,n,e[n]);if(fd)for(var n of fd(e))sR.call(e,n)&&Ml(t,n,e[n]);return t},At=(t,e)=>rR(t,iR(e)),yt=(t,e,n)=>Ml(t,typeof e!="symbol"?e+"":e,n),Do=(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())}),fm={exports:{}},md={exports:{}},yd;function aR(){return yd||(yd=1,(function(t,e){(function(n,r){t.exports=r()})(uc,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})})(md)),md.exports}(function(t,e){(function(n,r){t.exports=r(aR())})(uc,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
+ ${qf}
623
+ `,vE=(t,e,n,r)=>t();function SE(t,e=vE){return{PushPayload(n,r){return e(i=>t.request(uE,n,j(j({},r),i)),"PushPayload","mutation",n)},PushPayloadCompressed(n,r){return e(i=>t.request(hE,n,j(j({},r),i)),"PushPayloadCompressed","mutation",n)},identifySession(n,r){return e(i=>t.request(pE,n,j(j({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(dE,n,j(j({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(fE,n,j(j({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(mE,n,j(j({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(yE,n,j(j({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(gE,n,j(j({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(bE,n,j(j({},r),i)),"GetSamplingConfig","query",n)}}}var tn=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(tn||{}),jt=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(jt||{});function wE(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 IE(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 Ll(t){return Object.prototype.toString.call(t)==="[object Object]"}function tm(t,e){if(e===0)return!0;let n=Object.keys(t);for(let r of n)if(Ll(t[r])&&tm(t[r],e-1))return!0;return!1}function Xl(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]=IE(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 Ll(a)&&Object.keys(a).length>n.numOfKeysLimit||typeof a=="function"?!0:a instanceof Event&&a.isTrusted===!1?Object.keys(a).length===1:!!(Ll(a)&&tm(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 em=900*1e3;function zi(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 TE={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 Wl(t,e){function n(i,o,s){if(typeof document<"u"){s=zi({},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,"",zi({},o,{expires:-1}))},withAttributes:function(i){return Wl(this.converter,zi({},this.attributes,i))},withConverter:function(i){return Wl(zi({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Ba=Wl(TE,{path:"/"}),nm="localStorage",Ul=!0,EE=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]}},RE=class{getItem(t){var e;return(e=Ba.get(t))!=null?e:""}setItem(t,e){if(!Ul)return;let n=new Date;n.setTime(n.getTime()+em),Ba.set(t,e,{expires:n})}removeItem(t){Ul&&Ba.remove(t)}},Ao=new EE,Ro=new RE,pc=()=>{try{switch(nm){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage}}catch(t){return Ao}},CE=t=>{nm=t},ld=t=>{Ul=t},rm=t=>{try{return pc().getItem(t)}catch(e){return ke("storage","debug",`failed to get item ${t}; using global storage`,e),Ao.getItem(t)}},im=(t,e)=>{Ro.setItem(t,e);try{return pc().setItem(t,e)}catch(n){return ke("storage","debug",`failed to set item ${t}; using global storage`,n),Ao.setItem(t,e)}},ZE=t=>{Ro.removeItem(t);try{return pc().removeItem(t)}catch(e){return ke("storage","debug",`failed to remove item ${t}; using global storage`,e),Ao.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||{}),Jo=t=>`${Yr.SESSION_DATA}_${t}`,Fe=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:om()},kE=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},om=()=>{var t;return(t=rm(Yr.SESSION_ID))!=null?t:""},sm=t=>{im(Yr.SESSION_ID,t)},VE=t=>{let e=Jo(t);return JSON.parse(rm(e)||"{}")},xE=t=>{t||(t=om());let e=VE(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<em)return e;ZE(Jo(t))},am=function(t){if(!(t!=null&&t.sessionSecureID))return;let e=t.sessionSecureID;kE(e),im(Jo(e),JSON.stringify(t))},NE=function(){let t=Ro.getItem(Yr.SESSION_ID);sm(t);let e=Jo(t),n=Ro.getItem(e);try{am(JSON.parse(n))}catch(r){}},lm=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(lm||{}),dc=10,fc=1e3,mc=500,OE=[lm.BillingQuotaExceeded.toString()],GE=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>OE.includes(n.message)))===void 0},LE=()=>{let t=(e,n,r,i,o=0)=>Dn(void 0,null,function*(){try{return yield e()}catch(s){if(s instanceof jf&&!GE(s))throw s;if(o<dc)return yield new Promise(a=>setTimeout(a,fc+mc*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",cm="launchdarkly",XE="evaluation",WE=`${Lt}.set.id`,UE=`${Lt}.key`,ME=`${Lt}.contextKeys`,PE=`${Lt}.context.id`,FE=`${Lt}.result.value`,AE=`${Lt}.provider.name`,cd={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`},JE=`${Lt}.result.variationIndex`,DE=`${cm}.application.id`,YE=`${cm}.application.version`,KE="$ld:telemetry:session:init",_E="$ld:telemetry:error",ud="$ld:telemetry:track",HE="$ld:telemetry:metric",um="document_load",zE="result.status";function hm(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function pm(t){return t.kind==="multi"}function hd(t){return pm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${hm(t[e].key)}`).join(":"):t.key}function pd(t){return pm(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:hm(t[e].key)})).reduce((e,n)=>j(j({},e),n),{}):t.key}var BE=class{constructor(t,e){Wr(this,"client"),Wr(this,"metadata"),this.client=t,this.metadata=e}getHooks(t){return[]}init(t){this.client.track(KE,{sessionID:t})}recordGauge(t,e){var n;e.category!==jt.WebVital&&e.name!==um||e.name!=="Jank"&&this.client.track(`${HE}:${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(_E,An(j({},e),{sessionID:t}))}track(t,e){let n=e.event;this.client.track(n?`${ud}:${n}`:ud,An(j({},e),{sessionID:t}))}},jE=class extends vo{constructor(t,e){super(),Wr(this,"client"),this.client=new BE(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 QE(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 $E=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)},qE=()=>{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},tR=class{constructor(t){Wr(this,"sessionSecureID");try{t!=null&&t.storageMode&&CE(t==null?void 0:t.storageMode),ld(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?NE():ld(!1);let e=Fe(),n=xE(e);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(this.sessionSecureID=qE(),sm(this.sessionSecureID),am({sessionSecureID:this.sessionSecureID,projectID:0,payloadID:1,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(e){ke("Error initializing @launchdarkly observability plugin","error",e)}}},Co=class extends vo{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])}},ln;typeof globalThis<"u"?globalThis.LDObserve?ln=globalThis.LDObserve:(ln=new Co,globalThis.LDObserve=ln):ln=new Co;var eR=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return ln}},Symbol.toStringTag,{value:"Module"})),nR=Object.defineProperty,rR=Object.defineProperties,iR=Object.getOwnPropertyDescriptors,dd=Object.getOwnPropertySymbols,oR=Object.prototype.hasOwnProperty,sR=Object.prototype.propertyIsEnumerable,Ml=(t,e,n)=>e in t?nR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mt=(t,e)=>{for(var n in e||(e={}))oR.call(e,n)&&Ml(t,n,e[n]);if(dd)for(var n of dd(e))sR.call(e,n)&&Ml(t,n,e[n]);return t},At=(t,e)=>rR(t,iR(e)),yt=(t,e,n)=>Ml(t,typeof e!="symbol"?e+"":e,n),Do=(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())}),dm={exports:{}},fd={exports:{}},md;function aR(){return md||(md=1,(function(t,e){(function(n,r){t.exports=r()})(uc,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})})(fd)),fd.exports}(function(t,e){(function(n,r){t.exports=r(aR())})(uc,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)}}})})(fm);var lR=fm.exports,gd=hc(lR);function Yo(t){try{return gd.parse(t)}catch(e){try{return gd.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:n}),[]}}}function cR(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=Yo(l));let h=[Xl(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]?wE(s,a,c=>(...l)=>{c.apply(this,l);try{t(uR(a,e,...l))}catch(u){c("highlight logger error:",u,...l)}}):()=>{}}}function uR(t,e,...n){let r=Yo(new Error),i=e.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Xl(o,e.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:r.slice(1),value:i,attributes:Xl(n.filter(o=>typeof o=="object").reduce((o,s)=>mt(mt({},o),s),{}),e.stringifyOptions),time:Date.now()}}function ja(t,e,n,r){var i,o,s,a;let c=r!=null?r:e,l=Yo(c),u={};e instanceof Error&&(e=e.message,e.cause&&(u={"exception.cause":e.cause}));let h=pR(l);t({error:c,event:rn(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?rn(u):void 0})}var hR=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};let n=window.onerror=(s,a,c,l,u)=>{ja(t,s,a,u)},r=window.onunhandledrejection=s=>{if(s.reason){let a=s.promise;a.getStack?ja(t,s.reason,s.type,a.getStack()):ja(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}},pR=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},bd=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],vd=["websocket error",'\\"ResizeObserver loop'],dR=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},cn="1.9.0",Sd=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function fR(t){var e=new Set([t]),n=new Set,r=t.match(Sd);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(Sd);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 mR=fR(cn),yR=cn.split(".")[0],Mr=Symbol.for("opentelemetry.js.api."+yR),Pr=dR;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:cn};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!==cn){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+cn);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+cn+"."),!0}function pn(t){var e,n,r=(e=Pr[Mr])===null||e===void 0?void 0:e.version;if(!(!r||!mR(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"+cn+".");var n=Pr[Mr];n&&delete n[t]}var gR=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},bR=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))},vR=(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=pn("diag");if(r)return n.unshift(e),r[t].apply(r,bR([],gR(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 SR(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 wR=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},IR=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))},TR="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=pn("diag");if(a)return a[i].apply(a,IR([],wR(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=pn("diag"),h=SR((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(TR,n)},n.createComponentLogger=function(i){return new vR(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})(),ER=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},RR=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.")},CR=(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=ER(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=RR(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})(),ZR=Symbol("BaggageEntryMetadata"),kR=ve.instance();function VR(t){return t===void 0&&(t={}),new CR(new Map(Object.entries(t)))}function xR(t){return typeof t!="string"&&(kR.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:ZR,toString:function(){return t}}}function yc(t){return Symbol.for(t)}var NR=(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})(),on=new NR,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)}})(),OR=(function(){function t(){}return t.prototype.createGauge=function(e,n){return AR},t.prototype.createHistogram=function(e,n){return JR},t.prototype.createCounter=function(e,n){return FR},t.prototype.createUpDownCounter=function(e,n){return DR},t.prototype.createObservableGauge=function(e,n){return KR},t.prototype.createObservableCounter=function(e,n){return YR},t.prototype.createObservableUpDownCounter=function(e,n){return _R},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t})(),Ko=(function(){function t(){}return t})(),GR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(Ko),LR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(Ko),XR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(Ko),WR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(Ko),gc=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),UR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(gc),MR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(gc),PR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(gc),mm=new OR,FR=new GR,AR=new XR,JR=new WR,DR=new LR,YR=new UR,KR=new MR,_R=new PR;function HR(){return mm}var De;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(De||(De={}));var zR={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},BR={set:function(t,e,n){t!=null&&(t[e]=n)}},jR=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},QR=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))},$R=(function(){function t(){}return t.prototype.active=function(){return on},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,QR([r],jR(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})(),qR=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},tC=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))},Qa="context",eC=new $R,_o=(function(){function t(){}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalContextManager=function(e){return Kr(Qa,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,tC([e,n,r],qR(o),!1))},t.prototype.bind=function(e,n){return this.Ir().bind(e,n)},t.prototype.Ir=function(){return pn(Qa)||eC},t.prototype.disable=function(){this.Ir().disable(),_r(Qa,ve.instance())},t})(),Ve;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(Ve||(Ve={}));var ym="0000000000000000",gm="00000000000000000000000000000000",bm={traceId:gm,spanId:ym,traceFlags:Ve.NONE},Nr=(function(){function t(e){e===void 0&&(e=bm),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})(),bc=yc("OpenTelemetry Context Key SPAN");function vc(t){return t.getValue(bc)||void 0}function nC(){return vc(_o.getInstance().active())}function Sc(t,e){return t.setValue(bc,e)}function rC(t){return t.deleteValue(bc)}function iC(t,e){return Sc(t,new Nr(e))}function vm(t){var e;return(e=vc(t))===null||e===void 0?void 0:e.spanContext()}var oC=/^([0-9a-f]{32})$/i,sC=/^[0-9a-f]{16}$/i;function Sm(t){return oC.test(t)&&t!==gm}function aC(t){return sC.test(t)&&t!==ym}function Ho(t){return Sm(t.traceId)&&aC(t.spanId)}function lC(t){return new Nr(t)}var $a=_o.getInstance(),wm=(function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=$a.active());var i=!!(n!=null&&n.root);if(i)return new Nr;var o=r&&vm(r);return cC(o)&&Ho(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:$a.active(),l=this.startSpan(e,o,c),u=Sc(c,l);return $a.with(u,a,void 0,l)}},t})();function cC(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var uC=new wm,hC=(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):uC},t})(),pC=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new wm},t})(),dC=new pC,wd=(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 hC(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:dC},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})(),Zo;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Zo||(Zo={}));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 ko;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(ko||(ko={}));var tt=_o.getInstance(),X=ve.instance(),fC=(function(){function t(){}return t.prototype.getMeter=function(e,n,r){return mm},t})(),mC=new fC,qa="metrics",yC=(function(){function t(){}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalMeterProvider=function(e){return Kr(qa,e,ve.instance())},t.prototype.getMeterProvider=function(){return pn(qa)||mC},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){_r(qa,ve.instance())},t})(),Ce=yC.getInstance(),gC=(function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t})(),wc=yc("OpenTelemetry Baggage Key");function Im(t){return t.getValue(wc)||void 0}function bC(){return Im(_o.getInstance().active())}function vC(t,e){return t.setValue(wc,e)}function SC(t){return t.deleteValue(wc)}var tl="propagation",wC=new gC,IC=(function(){function t(){this.createBaggage=VR,this.getBaggage=Im,this.getActiveBaggage=bC,this.setBaggage=vC,this.deleteBaggage=SC}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalPropagator=function(e){return Kr(tl,e,ve.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=BR),this.Dr().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=zR),this.Dr().extract(e,n,r)},t.prototype.fields=function(){return this.Dr().fields()},t.prototype.disable=function(){_r(tl,ve.instance())},t.prototype.Dr=function(){return pn(tl)||wC},t})(),Qt=IC.getInstance(),el="trace",TC=(function(){function t(){this.Tr=new wd,this.wrapSpanContext=lC,this.isSpanContextValid=Ho,this.deleteSpan=rC,this.getSpan=vc,this.getActiveSpan=nC,this.getSpanContext=vm,this.setSpan=Sc,this.setSpanContext=iC}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalTracerProvider=function(e){var n=Kr(el,this.Tr,ve.instance());return n&&this.Tr.setDelegate(e),n},t.prototype.getTracerProvider=function(){return pn(el)||this.Tr},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){_r(el,ve.instance()),this.Tr=new wd},t})(),ut=TC.getInstance(),Tm=yc("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Em(t){return t.setValue(Tm,!0)}function Ic(t){return t.getValue(Tm)===!0}var EC="=",Pl=";",Fl=",",nl="baggage",RC=180,CC=4096,ZC=8192,kC=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 VC(t){return t.reduce(function(e,n){var r=""+e+(e!==""?Fl:"")+n;return r.length>ZC?e:r},"")}function xC(t){return t.getAllEntries().map(function(e){var n=kC(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Pl+i.metadata.toString()),o})}function NC(t){var e=t.split(Pl);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(EC);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(Pl))),{key:i,value:o,metadata:s}}}}}var Rm=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=Qt.getBaggage(e);if(!(!i||Ic(e))){var o=xC(i).filter(function(a){return a.length<=CC}).slice(0,RC),s=VC(o);s.length>0&&r.set(n,nl,s)}},t.prototype.extract=function(e,n,r){var i=r.get(n,nl),o=Array.isArray(i)?i.join(Fl):i;if(!o)return e;var s={};if(o.length===0)return e;var a=o.split(Fl);return a.forEach(function(c){var l=NC(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[nl]},t})(),Cm=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.")},OC=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 fo(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=Cm(Object.entries(t)),o=i.next();!o.done;o=i.next()){var s=OC(o.value,2),a=s[0],c=s[1];if(!GC(a)){X.warn("Invalid attribute key: "+a);continue}if(!Zm(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 GC(t){return typeof t=="string"&&t.length>0}function Zm(t){return t==null?!0:Array.isArray(t)?LC(t):km(t)}function LC(t){var e,n,r;try{for(var i=Cm(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!=null){if(!r){if(km(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 km(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function XC(){return function(t){X.error(WC(t))}}function WC(t){return typeof t=="string"?t:JSON.stringify(UC(t))}function UC(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 MC=XC();function Ye(t){try{MC(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 PC=",",FC=["OTEL_SDK_DISABLED"];function AC(t){return FC.indexOf(t)>-1}var JC=["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 DC(t){return JC.indexOf(t)>-1}var YC=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function KC(t){return YC.indexOf(t)>-1}var mo=1/0,yo=128,_C=128,HC=128,Vm={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:mo,OTEL_ATTRIBUTE_COUNT_LIMIT:yo,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:mo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:yo,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:mo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:yo,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:_C,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:HC,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 zC(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function BC(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 jC(t,e,n,r){r===void 0&&(r=PC);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var QC={ALL:St.ALL,VERBOSE:St.VERBOSE,DEBUG:St.DEBUG,INFO:St.INFO,WARN:St.WARN,ERROR:St.ERROR,NONE:St.NONE};function $C(t,e,n){var r=n[t];if(typeof r=="string"){var i=QC[r.toUpperCase()];i!=null&&(e[t]=i)}}function xm(t){var e={};for(var n in Vm){var r=n;switch(r){case"OTEL_LOG_LEVEL":$C(r,e,t);break;default:if(AC(r))zC(r,e,t);else if(DC(r))BC(r,e,t);else if(KC(r))jC(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=xm(Or);return Object.assign({},Vm,t)}function qC(){return xm(Or)}function Id(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Tc(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var i=Id(t.charCodeAt(r)),o=Id(t.charCodeAt(r+1));e[n++]=i<<4|o}return e}var te=performance,tZ="1.30.1",eZ="process.runtime.name",nZ="telemetry.sdk.name",rZ="telemetry.sdk.language",iZ="telemetry.sdk.version",oZ=eZ,sZ=nZ,aZ=rZ,lZ=iZ,cZ="webjs",uZ=cZ,Wn,rl=(Wn={},Wn[sZ]="opentelemetry",Wn[oZ]="browser",Wn[aZ]=uZ,Wn[lZ]=tZ,Wn),hZ=9,pZ=6,dZ=Math.pow(10,pZ),Vo=Math.pow(10,hZ);function $t(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*dZ);return[n,r]}function Ec(){var t=te.timeOrigin;if(typeof t!="number"){var e=te;t=e.timing&&e.timing.fetchStart}return t}function dn(t){var e=$t(Ec()),n=$t(typeof t=="number"?t:te.now());return Nm(e,n)}function Gr(t){if(Rc(t))return t;if(typeof t=="number")return t<Ec()?dn(t):$t(t);if(t instanceof Date)return $t(t.getTime());throw TypeError("Invalid input type")}function fZ(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=Vo),[n,r]}function Ze(t){return t[0]*Vo+t[1]}function Bi(t){return t[0]*1e6+t[1]/1e3}function Rc(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Td(t){return Rc(t)||typeof t=="number"||t instanceof Date}function Nm(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Vo&&(n[1]-=Vo,n[0]+=1),n}var kt;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(kt||(kt={}));var mZ=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.")},Om=(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=mZ(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})(),Al="[_0-9a-z-*/]",yZ="[a-z]"+Al+"{0,255}",gZ="[a-z0-9]"+Al+"{0,240}@[a-z]"+Al+"{0,13}",bZ=new RegExp("^(?:"+yZ+"|"+gZ+")$"),vZ=/^[ -~]{0,255}[!-~]$/,SZ=/,|=/;function wZ(t){return bZ.test(t)}function IZ(t){return vZ.test(t)&&!SZ.test(t)}var Ed=32,TZ=512,Rd=",",Cd="=",EZ=(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+Cd+e.get(r)),n},[]).join(Rd)},t.prototype.Hs=function(e){e.length>TZ||(this._e=e.split(Rd).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Cd);if(o!==-1){var s=i.slice(0,o),a=i.slice(o+1,r.length);wZ(s)&&IZ(a)&&n.set(s,a)}return n},new Map),this._e.size>Ed&&(this._e=new Map(Array.from(this._e.entries()).reverse().slice(0,Ed))))},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})(),go="traceparent",il="tracestate",RZ="00",CZ="(?!ff)[\\da-f]{2}",ZZ="(?![0]{32})[\\da-f]{32}",kZ="(?![0]{16})[\\da-f]{16}",VZ="[\\da-f]{2}",xZ=new RegExp("^\\s?("+CZ+")-("+ZZ+")-("+kZ+")-("+VZ+")(-.*)?\\s?$");function NZ(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 Gm=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=ut.getSpanContext(e);if(!(!i||Ic(e)||!Ho(i))){var o=RZ+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||Ve.NONE).toString(16);r.set(n,go,o),i.traceState&&r.set(n,il,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,go);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var s=NZ(o);if(!s)return e;s.isRemote=!0;var a=r.get(n,il);if(a){var c=Array.isArray(a)?a.join(","):a;s.traceState=new EZ(typeof c=="string"?c:void 0)}return ut.setSpanContext(e,s)},t.prototype.fields=function(){return[go,il]},t})(),OZ="[object Object]",GZ="[object Null]",LZ="[object Undefined]",XZ=Function.prototype,Lm=XZ.toString,WZ=Lm.call(Object),UZ=MZ(Object.getPrototypeOf,Object),Xm=Object.prototype,Wm=Xm.hasOwnProperty,sn=Symbol?Symbol.toStringTag:void 0,Um=Xm.toString;function MZ(t,e){return function(n){return t(e(n))}}function Zd(t){if(!PZ(t)||FZ(t)!==OZ)return!1;var e=UZ(t);if(e===null)return!0;var n=Wm.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Lm.call(n)===WZ}function PZ(t){return t!=null&&typeof t=="object"}function FZ(t){return t==null?t===void 0?LZ:GZ:sn&&sn in Object(t)?AZ(t):JZ(t)}function AZ(t){var e=Wm.call(t,sn),n=t[sn],r=!1;try{t[sn]=void 0,r=!0}catch(o){}var i=Um.call(t);return r&&(e?t[sn]=n:delete t[sn]),i}function JZ(t){return Um.call(t)}var DZ=20;function Mm(){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=Pm(n,t.shift(),0,r);return n}function ol(t){return xo(t)?t.slice():t}function Pm(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>DZ)){if(n++,bo(t)||bo(e)||Fm(e))i=ol(e);else if(xo(t)){if(i=t.slice(),xo(e))for(var o=0,s=e.length;o<s;o++)i.push(ol(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]=ol(e[c])}}else if(Ir(t))if(Ir(e)){if(!YZ(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(bo(l))typeof l>"u"?delete i[c]:i[c]=l;else{var u=i[c],h=l;if(kd(t,c,r)||kd(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]=Pm(i[c],l,n,r)}}}}else i=e;return i}}function kd(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 xo(t){return Array.isArray(t)}function Fm(t){return typeof t=="function"}function Ir(t){return!bo(t)&&!xo(t)&&!Fm(t)&&typeof t=="object"}function bo(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function YZ(t,e){return!(!Zd(t)||!Zd(e))}var KZ=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 Am(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Jm(t,e){var n,r;if(!e)return!1;try{for(var i=KZ(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(Am(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 _Z=(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})(),HZ=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},zZ=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))},BZ=(function(){function t(e,n){this.Qs=e,this.$s=n,this._r=!1,this.or=new _Z}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,zZ([this.$s],HZ(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 jZ(t,e){return new Promise(function(n){tt.with(Em(tt.active()),function(){t.export(e,function(r){n(r)})})})}var QZ={qs:jZ},Dm=(function(){function t(){}return t.prototype.emit=function(e){},t})(),$Z=new Dm,qZ=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new Dm},t})(),Ym=new qZ,tk=(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):$Z},t})(),Vd=(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 tk(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:Ym},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})(),ek=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},ji=Symbol.for("io.opentelemetry.js.api.logs"),Tr=ek;function nk(t,e,n){return function(r){return r===t?e:n}}var xd=1,rk=(function(){function t(){this.en=new Vd}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Tr[ji]?this.getLoggerProvider():(Tr[ji]=nk(xd,e,Ym),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Tr[ji])===null||e===void 0?void 0:e.call(Tr,xd))!==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[ji],this.en=new Vd},t})(),Km=rk.getInstance();function ik(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 ok(t){t.forEach(function(e){return e.disable()})}function sk(t){var e,n,r=t.tracerProvider||ut.getTracerProvider(),i=t.meterProvider||Ce.getMeterProvider(),o=t.loggerProvider||Km.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return ik(s,r,i,o),function(){ok(s)}}function Jl(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&&(Jl(t.logger)?Xt=t.logger:Xt("new logger isn't a function, not replacing"))}function _m(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(!Jl(t[e])||!Jl(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 ak(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){_m(r,i,n)})})}function Hm(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 lk(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){Hm(n,r)})})}Hr.wrap=_m;Hr.massWrap=ak;Hr.unwrap=Hm;Hr.massUnwrap=lk;var qt=Hr,Dl=function(){return Dl=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},Dl.apply(this,arguments)},ck=(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=Km.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=Dl({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})(),uk=(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)}})(),zm=(function(t){uk(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})(ck);function Nd(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 hk="exception.type",pk="exception.message",dk="exception.stacktrace",sl=hk,al=pk,fk=dk,mk="exception",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)},yk=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.")},Od=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},gk=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))},bk=(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:ko.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+Ec()),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):Zm(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=yk(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=Od(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++),Td(n)&&(Td(r)||(r=n),n=void 0);var i=fo(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,gk([],Od(e),!1)),this},t.prototype.setStatus=function(e){return this.lr()?this:(this.status=Yl({},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=fZ(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 dn(e+this.ea);if(typeof e=="number")return $t(e);if(e instanceof Date)return $t(e.getTime());if(Rc(e))return e;if(this.na)return $t(Date.now());var n=te.now()-this.Mo;return Nm(this.startTime,$t(n))},t.prototype.isRecording=function(){return this.ar===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[al]=e:e&&(e.code?r[sl]=e.code.toString():e.name&&(r[sl]=e.name),e.message&&(r[al]=e.message),e.stack&&(r[fk]=e.stack)),r[sl]||r[al]?this.addEvent(mk,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 No=(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})(),ll=(function(){function t(e){var n,r,i,o;this.sn=e.root,this.sn||(Ye(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 No,this.Do=(i=e.localParentSampled)!==null&&i!==void 0?i:new Jn,this.Yo=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new No}return t.prototype.shouldSample=function(e,n,r,i,o,s){var a=ut.getSpanContext(e);return!a||!Ho(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})(),Gd=(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:Sm(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})(),vk=ye.AlwaysOn,Un=1;function Bm(){var t=Yn();return{sampler:jm(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 jm(t){switch(t===void 0&&(t=Yn()),t.OTEL_TRACES_SAMPLER){case ye.AlwaysOn:return new Jn;case ye.AlwaysOff:return new No;case ye.ParentBasedAlwaysOn:return new ll({root:new Jn});case ye.ParentBasedAlwaysOff:return new ll({root:new No});case ye.TraceIdRatio:return new Gd(Ld(t));case ye.ParentBasedTraceIdRatio:return new ll({root:new Gd(Ld(t))});default:return X.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+vk+'".'),new Jn}}function Ld(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 Sk(t){var e={sampler:jm()},n=Bm(),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 wk(t){var e,n,r,i,o,s,a,c,l,u,h,p,f=Object.assign({},t.spanLimits),m=qC();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:yo,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:mo,Object.assign({},t,{spanLimits:f})}var Ik=(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 BZ(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(Em(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){Ye(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,Ye(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})(),Tk=(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){Tk(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){Ye(i)})},this.Qr=function(){r.forceFlush().catch(function(i){Ye(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})(Ik),Ek=8,Rk=16,Ck=(function(){function t(){this.generateTraceId=Xd(Rk),this.generateSpanId=Xd(Ek)}return t})(),Qi=Array(32);function Xd(t){return function(){for(var e=0;e<t*2;e++)Qi[e]=Math.floor(Math.random()*16)+48,Qi[e]>=58&&(Qi[e]+=39);return String.fromCharCode.apply(null,Qi.slice(0,t*2))}}var Zk=(function(){function t(e,n,r){this.ha=r;var i=Sk(n);this.pa=i.sampler,this.da=i.generalLimits,this.Wn=i.spanLimits,this.Bo=n.idGenerator||new Ck,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(Ic(r)){X.debug("Instrumentation suppressed, returning Noop Span");var c=ut.wrapSpanContext(bm);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:fo(V.attributes)}}),b=fo(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===Zo.RECORD_AND_SAMPLED?Ve.SAMPLED:Ve.NONE,R={traceId:h,spanId:u,traceFlags:I,traceState:p};if(v.decision===Zo.NOT_RECORD){X.debug("Recording is off, propagating context in a non-recording span");var c=ut.wrapSpanContext(R);return c}var E=fo(Object.assign(b,v.attributes)),T=new bk(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})(),kk="service.name",Vk="telemetry.sdk.name",xk="telemetry.sdk.language",Nk="telemetry.sdk.version",Ok=kk,Wd=Vk,Ud=xk,Md=Nk;function Gk(){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)},Lk=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())})},Xk=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}}},Wk=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[Ok]=Gk(),e[Ud]=rl[Ud],e[Wd]=rl[Wd],e[Md]=rl[Md],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 Lk(this,void 0,void 0,function(){return Xk(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=Wk(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})(),$i=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.")},Pd=(function(){function t(e){this.xr=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=$i(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){Ye(c||new Error("MultiSpanProcessor: forceFlush failed")),a()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=$i(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=$i(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=$i(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})(),Uk=(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})(),Mk=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},Pk=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))},an;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(an||(an={}));var Fk=(function(){function t(e){e===void 0&&(e={});var n,r;this.Pn=[],this.$r=new Map;var i=Mm({},Bm(),wk(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=Pk([],Mk(e.spanProcessors),!1),this.activeSpanProcessor=new Pd(this.Pn);else{var o=this.fa();if(o!==void 0){var s=new Qm(o);this.activeSpanProcessor=s}else this.activeSpanProcessor=new Uk}}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 Zk({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 Pd(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=an.timeout},e);r.forceFlush().then(function(){clearTimeout(s),o!==an.timeout&&(o=an.resolved,i(o))}).catch(function(a){clearTimeout(s),o=an.error,i(a)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var s=o.filter(function(a){return a!==an.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 Om({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 Gm}],["baggage",function(){return new Rm}]]),t.va=new Map,t})(),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(;!(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},Jk=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))},$m=(function(){function t(){this.qr=!1,this.Xe=on}return t.prototype.Sa=function(e,n){e===void 0&&(e=on);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=on,this.qr=!1,this},t.prototype.enable=function(){return this.qr?this:(this.qr=!0,this.Xe=on,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||on;try{return n.call.apply(n,Jk([r],Ak(i),!1))}finally{this.Xe=s}},t})(),Dk=(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)}})(),Yk=(function(t){Dk(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 $m),n.contextManager&&n.contextManager.enable(),t.prototype.register.call(this,n)},e})(Fk),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 Kk="http.response_content_length",_k="http.response_content_length_uncompressed",Hk=Kk,zk=_k,cl;function Bk(){return cl||(cl=document.createElement("a")),cl}function Ke(t,e){return e in t}function Rt(t,e,n,r){var i=void 0,o=void 0;Ke(n,e)&&typeof n[e]=="number"&&(i=n[e]);var s=J.FETCH_START;if(Ke(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),Ke(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(Hk,r);var i=e[J.DECODED_BODY_SIZE];i!==void 0&&r!==i&&t.setAttribute(zk,i)}function jk(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 qm(){return typeof location<"u"?location.origin:void 0}function ty(t,e,n,r,i,o){i===void 0&&(i=new WeakSet);var s=Re(t);t=s.toString();var a=$k(t,e,n,r,i,o);if(a.length===0)return{mainRequest:void 0};if(a.length===1)return{mainRequest:a[0]};var c=jk(a);if(s.origin!==qm()&&c.length>1){var l=c[0],u=Qk(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 Qk(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 $k(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=Bk();return e.href=t,e}function ey(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=t1(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=ey(t.parentNode,!1)),r+=n,r}function qk(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 t1(t,e){var n=t.nodeType,r=qk(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 ny(t,e){var n=e||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=Re(t);return r.origin===qm()?!0:n.some(function(i){return Am(t,i)})}var Lr;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(Lr||(Lr={}));var e1="0.44.0",n1="@opentelemetry/instrumentation-document-load",r1="http.url",i1="http.user_agent",ul=r1,o1=i1,s1="deployment.environment",a1=s1,l1="service.name",c1="telemetry.sdk.name",u1="telemetry.sdk.version",h1="url.full",p1="url.path",d1="url.query",Oo;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Oo||(Oo={}));var f1=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(Ke(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(Ke(s,c)){var l=s[c];typeof l=="number"&&(n[c]=l)}})}}return n},Fd={"first-paint":Oo.FIRST_PAINT,"first-contentful-paint":Oo.FIRST_CONTENTFUL_PAINT},m1=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;Ke(Fd,o)&&t.addEvent(Fd[o],s)})},y1=(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)}})(),g1=(function(t){y1(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,n1,e1,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")===go}),i=f1(),o=r&&r.content||"";tt.with(Qt.extract(on,{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(ul,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(ul,location.href),a.setAttribute(o1,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||m1(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&&(Ke(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(ul,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(Ke(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&&Nd(function(){return r(n)},function(o){o&&i.v.error("addCustomAttributesOnSpan",o)})},e.prototype.Ea=function(n,r,i){var o=this;i&&Nd(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})(zm),ry=(function(){function t(){}return t.prototype.emit=function(e){},t})(),b1=new ry,v1=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new ry},t})(),iy=new v1,S1=(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):b1},t})(),Ad=(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 S1(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:iy},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})(),w1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},qi=Symbol.for("io.opentelemetry.js.api.logs"),Rr=w1;function I1(t,e,n){return function(r){return r===t?e:n}}var Jd=1,T1=(function(){function t(){this.en=new Ad}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Rr[qi]?this.getLoggerProvider():(Rr[qi]=I1(Jd,e,iy),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Rr[qi])===null||e===void 0?void 0:e.call(Rr,Jd))!==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[qi],this.en=new Ad},t})(),E1=T1.getInstance(),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)},R1=(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=E1.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=Kl({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})(),C1=(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)}})(),Z1=(function(t){C1(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})(R1);function k1(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function V1(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Go;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(Go||(Go={}));var x1="http.method",N1="http.url",O1="http.host",G1="http.scheme",L1="http.status_code",X1="http.user_agent",W1="http.request_content_length_uncompressed",U1=x1,M1=N1,P1=O1,F1=G1,A1=L1,J1=X1,D1=W1,Y1=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())})},K1=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}}},_1=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.")},H1=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},oy=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function z1(){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=B1(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(j1(n.body))}else{var s=t[0];return s!=null&&s.body?s.clone().text().then(function(a){return _l(a)}):Promise.resolve()}}function B1(t){if(!t.pipeThrough)return oy.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 Y1(this,void 0,void 0,function(){var a;return K1(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 j1(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 $1(t);if(t instanceof URLSearchParams)return _l(t.toString());if(typeof t=="string")return _l(t);oy.warn("unknown body type")}var Q1=new TextEncoder;function _l(t){return Q1.encode(t).byteLength}function $1(t){var e,n,r=0;try{for(var i=_1(t.entries()),o=i.next();!o.done;o=i.next()){var s=H1(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 Dd="0.57.1",q1=(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)}})(),tV=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},eV=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))},hl,nV=300,Yd=typeof process=="object"&&((hl=process.release)===null||hl===void 0?void 0:hl.name)==="node",rV=(function(t){q1(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",Dd,n)||this;return r.component="fetch",r.version=Dd,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(A1,r.status),r.statusText!=null&&n.setAttribute(Go.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(P1,i.host),n.setAttribute(F1,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(J1,navigator.userAgent)},e.prototype.si=function(n,r){if(!ny(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={}),Jm(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[Go.COMPONENT]=this.moduleName,i[U1]=o,i[M1]=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=ty(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=dn();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)},nV)},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&&z1.apply(void 0,eV([],tV(o),!1)).then(function(b){b&&u.setAttribute(D1,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&&k1(function(){return s(n,r,i)},function(a){a&&o.v.error("applyCustomAttributesOnSpan",a)})},e.prototype.Za=function(n){var r=dn(),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(Yd){this.v.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}V1(fetch)&&(this.P(Or,"fetch"),this.v.debug("removing previous patch for constructor")),this.ae(Or,"fetch",this.Ca())},e.prototype.disable=function(){Yd||(this.P(Or,"fetch"),this.un=new WeakSet)},e})(Z1),sy=(function(){function t(){}return t.prototype.emit=function(e){},t})(),iV=new sy,oV=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new sy},t})(),ay=new oV,sV=(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):iV},t})(),Kd=(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 sV(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:ay},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})(),aV=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},to=Symbol.for("io.opentelemetry.js.api.logs"),Cr=aV;function lV(t,e,n){return function(r){return r===t?e:n}}var _d=1,cV=(function(){function t(){this.en=new Kd}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Cr[to]?this.getLoggerProvider():(Cr[to]=lV(_d,e,ay),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Cr[to])===null||e===void 0?void 0:e.call(Cr,_d))!==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[to],this.en=new Kd},t})(),uV=cV.getInstance(),Hl=function(){return Hl=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},Hl.apply(this,arguments)},hV=(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=uV.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=Hl({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})(),pV=(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)}})(),dV=(function(t){pV(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})(hV);function fV(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function Hd(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var mV="http.method",yV="http.url",gV="http.host",bV="http.scheme",vV="http.status_code",SV="http.user_agent",wV="http.request_content_length_uncompressed",IV=mV,TV=yV,EV=gV,RV=bV,CV=vV,ZV=SV,kV=wV,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 VV=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},NV=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function OV(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 LV(t);if(t instanceof URLSearchParams)return zd(t.toString());if(typeof t=="string")return zd(t);NV.warn("unknown body type")}var GV=new TextEncoder;function zd(t){return GV.encode(t).byteLength}function LV(t){var e,n,r=0;try{for(var i=VV(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 Bd="0.57.1",zl;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(zl||(zl={}));var XV=(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)}})(),WV=300,UV=(function(t){XV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Bd,n)||this;return r.component="xml-http-request",r.version=Bd,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(!ny(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(CV,r.status),r.statusText!==void 0&&n.setAttribute(zl.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(EV,o.host),n.setAttribute(RV,o.protocol.replace(":","")),n.setAttribute(ZV,navigator.userAgent)}},e.prototype.ka=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&fV(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=ty(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(Jm(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[IV]=i,o[TV]=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=dn(),m=Date.now();setTimeout(function(){r(u,p,f,m)},WV)}}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=OV(v);I!==void 0&&d.setAttribute(kV,I)}tt.with(ut.setSpan(tt.active(),d),function(){n.wn++,m.sendStartTime=dn(),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),Hd(XMLHttpRequest.prototype.open)&&(this.P(XMLHttpRequest.prototype,"open"),this.v.debug("removing previous patch from method open")),Hd(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})(dV),MV=(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=>{[...PV,...t].includes(s==null?void 0:s.toLowerCase())&&(o[s]="[REDACTED]")}),o)},PV=["authorization","cookie","proxy-authorization","token"],FV=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],AV=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),JV=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function DV(t){return!!(t.includes("/sdk/evalx")&&t.match(AV)||t.includes("/eval/")&&t.match(JV))}var YV=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),KV=t=>DV(t),_V=(t,e)=>e.some(n=>t.toLocaleLowerCase().includes(n)),HV=(t,e,n)=>!_V(t,e)&&!KV(t)&&!YV(t),zV=(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},jd=64*1024,BV={"application/json":64*1024*1024,"text/plain":64*1024*1024},ly=(t,e,n,r)=>{var i,o,s;let a=jd;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=BV[c])!=null?s:jd}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},jV=(t,e,n)=>Do(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=ly(r,n,e,t.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r}),cy=(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})(),QV=(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){QV(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 $V(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 qV(t){if(t!=null)return function(){return t}}function tx(t,e,n){var r,i,o,s,a,c;return{timeoutMillis:$V((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 ex(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var nx=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())})},rx=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}}},ix=(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 nx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.pr)];case 1:return e.sent(),[2]}})})},t})();function ox(t){return new ix(t.concurrencyLimit)}function sx(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function ax(){return{handleResponse:function(t){t==null||!sx(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||X.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var lx=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())})},cx=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}}},ux=(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 lx(this,void 0,void 0,function(){return cx(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 hx(t,e){return new ux(t.transport,t.serializer,ax(),t.promiseHandler,e.timeout)}function uy(t,e,n){return hx({transport:n,serializer:e,promiseHandler:ox(t)},{timeout:t.timeoutMillis})}function hy(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function px(t){var e=Number(BigInt.asUintN(32,t)),n=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:n}}function py(t){var e=hy(t);return px(e)}function dx(t){var e=hy(t);return e.toString()}var fx=typeof BigInt<"u"?dx:Ze;function $d(t){return t}function dy(t){if(t!==void 0)return Tc(t)}var mx={encodeHrTime:py,encodeSpanContext:Tc,encodeOptionalSpanContext:dy};function fy(t){var e,n;if(t===void 0)return mx;var r=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(n=t.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?py:fx,encodeSpanContext:i?$d:Tc,encodeOptionalSpanContext:i?$d:dy}}var yx=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 my(t){return{attributes:gn(t.attributes),droppedAttributesCount:0}}function yy(t){return{name:t.name,version:t.version}}function gn(t){return Object.keys(t).map(function(e){return gy(e,t[e])})}function gy(t,e){return{key:t,value:by(e)}}function by(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(by)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(n){var r=yx(n,2),i=r[0],o=r[1];return gy(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 gx=(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,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())})},tf=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}}},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(;!(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},vx=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))},Sx=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 wx(t){return t!=null}function vy(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(n){return[n,t[n]]})))}function Ix(t){var e,n;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((n=t.schemaUrl)!==null&&n!==void 0?n:"")}var Sy=(function(t){gx(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 Sy("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function Tx(t){return qd(this,void 0,void 0,function(){var e=this;return tf(this,function(n){return[2,Promise.all(t.map(function(r){return qd(e,void 0,void 0,function(){var i,o;return tf(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 Ex(t){return t.status==="rejected"}function ef(t,e){var n=[];return t.forEach(function(r){n.push.apply(n,vx([],bx(e(r)),!1))}),n}function Rx(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=Sx(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 Cx(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 Zx(t,e){return t.toLowerCase()===e.toLowerCase()}var fn;(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"})(fn||(fn={}));var kx=(function(){function t(){this.kind=fn.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 Ox(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:De.DOUBLE,advice:(s=n==null?void 0:n.advice)!==null&&s!==void 0?s:{}}}function Vx(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 Zx(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var Nx=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Ox(t){return t.match(Nx)!=null}var Gx=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 Lx(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 pl=(function(){function t(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=Lx(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=Cx(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})(),wy=(function(){function t(e,n){this.dr=e,this.xt=n,this.kind=fn.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new pl(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 pl(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 pl(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=Gx(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})(),dl=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},fl=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))},nf=(function(){function t(e,n,r,i){e===void 0&&(e=new Xx),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})(),Xx=(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,fl([r,this.kt.length-n],dl(this.kt.slice(n)),!1)),i.splice.apply(i,fl([0,n],dl(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(fl([],dl(this.kt),!1))},t})(),Wx=52,Ux=2146435072,Mx=1048575,Iy=1023,Ty=-1022,Ey=Iy,Bl=Math.pow(2,-1022);function Ry(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=(n&Ux)>>20;return r-Iy}function Cy(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4),i=(n&Mx)*Math.pow(2,32);return i+r}function jl(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function Px(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var Fx=(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){Fx(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Error),Ax=(function(){function t(e){this.Vn=-e}return t.prototype.mapToIndex=function(e){if(e<Bl)return this.fr();var n=Ry(e),r=this.Ua(Cy(e)-1,Wx);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 jl(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=Ty>>this.Vn;return this.Vn<2&&e--,e},t.prototype.Nr=function(){return Ey>>this.Vn},t.prototype.Ua=function(e,n){return Math.floor(e*Math.pow(2,-n))},t})(),Jx=(function(){function t(e){this.Dn=e,this.io=jl(Math.LOG2E,e),this.Ma=jl(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=Bl)return this.fr()-1;if(Cy(e)===0){var n=Ry(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 Bl;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 Ty<<this.Dn},t.prototype.Nr=function(){return(Ey+1<<this.Dn)-1},t})(),rf=-10,of=20,Dx=Array.from({length:31},function(t,e){return e>10?new Jx(e-10):new Ax(e-10)});function sf(t){if(t>of||t<rf)throw new Dr("expected scale >= "+rf+" && <= "+of+", got: "+t);return Dx[t+10]}var Yx=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},eo=(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})(),Kx=20,_x=160,ml=2,Hx=(function(){function t(e,n,r,i,o,s,a,c,l,u,h){e===void 0&&(e=e),n===void 0&&(n=_x),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 nf),u===void 0&&(u=new nf),h===void 0&&(h=sf(Kx)),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<ml&&(X.warn("Exponential Histogram Max Size set to "+this.Ze+", changing to the minimum size of: "+ml),this.Ze=ml)}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=Px(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=sf(n)}},t.prototype.hs=function(e){var n=Math.min(this.scale,e.scale),r=eo.combine(this.Or(this.positive,this.scale,n),this.Or(e.positive,e.scale,n)),i=eo.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 eo(0,-1);var i=n-r;return new eo(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})(),zx=(function(){function t(e,n){this.Ze=e,this.xt=n,this.kind=fn.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new Hx(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=Yx(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})(),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},yl=(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})(),jx=(function(){function t(){this.kind=fn.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new yl(e)},t.prototype.merge=function(e,n){var r=Bi(n.sampleTime)>=Bi(e.sampleTime)?n:e;return new yl(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(e,n){var r=Bi(n.sampleTime)>=Bi(e.sampleTime)?n:e;return new yl(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=Bx(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t})(),Qx=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})(),af=(function(){function t(e){this.monotonic=e,this.kind=fn.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=Qx(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t})(),bn=(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 Zy},t.Sum=function(){return ky},t.LastValue=function(){return Vy},t.Histogram=function(){return xy},t.ExponentialHistogram=function(){return oN},t.Default=function(){return sN},t})(),$x=(function(t){bn(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 kx,e})(xe),qx=(function(t){bn(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 af(!0),e.NON_MONOTONIC_INSTANCE=new af(!1),e})(xe),tN=(function(t){bn(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 jx,e})(xe),eN=(function(t){bn(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 wy([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e})(xe),nN=(function(t){bn(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 wy(this.dr,this.xt)},e})(xe),rN=(function(t){bn(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 zx(this.Ze,this.xt)},e})(xe),iN=(function(t){bn(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 ky;case K.GAUGE:case K.OBSERVABLE_GAUGE:return Vy;case K.HISTOGRAM:return n.advice.explicitBucketBoundaries?new nN(n.advice.explicitBucketBoundaries):xy}return X.warn("Unable to recognize instrument type: "+n.type),Zy},e.prototype.createAggregator=function(n){return this.Kr(n).createAggregator(n)},e})(xe),Zy=new $x,ky=new qx,Vy=new tN,xy=new eN,oN=new rN,sN=new iN,aN=function(t){return xe.Default()},lN=function(t){return ae.CUMULATIVE},gl=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())})},bl=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}}},lf=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},cN=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))},uN=(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:aN,this.uo=(r=e==null?void 0:e.aggregationTemporalitySelector)!==null&&r!==void 0?r:lN,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 gl(this,void 0,void 0,function(){var n,r,i,o,s,a;return bl(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(cN([this.ho.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})],lf(this.Pa.map(function(l){return l.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})})),!1))];case 1:return n=lf.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(ef(i,function(l){return l.errors})),s=r.resourceMetrics.resource,a=r.resourceMetrics.scopeMetrics.concat(ef(i,function(l){return l.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:s,scopeMetrics:a},errors:o}]}})})},t.prototype.shutdown=function(e){return gl(this,void 0,void 0,function(){return bl(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 gl(this,void 0,void 0,function(){return bl(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})(),hN=(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)}})(),no=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}}},pN=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},dN=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))},fN=(function(t){hN(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 no(this,void 0,void 0,function(){var n;return ro(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 Sy?(X.error("Export took longer than %s milliseconds and timed out.",this.po),[2]):(Ye(n),[3,3]);case 3:return[2]}})})},e.prototype.Aa=function(){var n,r;return no(this,void 0,void 0,function(){var i,o,s,a,c,l;return ro(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,dN(["PeriodicExportingMetricReader: metrics collection errors"],pN(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),Ye(a),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,QZ.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 no(this,void 0,void 0,function(){return ro(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 no(this,void 0,void 0,function(){return ro(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})(uN),mN=(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})(),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)}})(),zo=(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===De.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})(),yN=(function(t){vn(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})(zo),gN=(function(t){vn(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})(zo),bN=(function(t){vn(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})(zo),vN=(function(t){vn(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})(zo),Bo=(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})(),SN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Bo),wN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Bo),IN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Bo);function Ql(t){return t instanceof Bo}var TN=(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 bN(i,r)},t.prototype.createHistogram=function(e,n){var r=Me(e,K.HISTOGRAM,n),i=this.Qe.registerMetricStorage(r);return new vN(i,r)},t.prototype.createCounter=function(e,n){var r=Me(e,K.COUNTER,n),i=this.Qe.registerMetricStorage(r);return new gN(i,r)},t.prototype.createUpDownCounter=function(e,n){var r=Me(e,K.UP_DOWN_COUNTER,n),i=this.Qe.registerMetricStorage(r);return new yN(i,r)},t.prototype.createObservableGauge=function(e,n){var r=Me(e,K.OBSERVABLE_GAUGE,n),i=this.Qe.registerAsyncMetricStorage(r);return new wN(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 SN(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 IN(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})(),Ny=(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})(),EN=(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)}})(),cf=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}}},RN=(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 cf(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 cf(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})(),un=(function(t){EN(e,t);function e(){return t.call(this,vy)||this}return e})(RN),CN=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},Oy=(function(){function t(e,n){this.cn=e,this.pn=new un,this.Hn=new un,this.fo={"otel.metric.overflow":!0},this.Is=(n!=null?n:2e3)-1,this.Ka=vy(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=CN(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 un,e},t})(),vl=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.")},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},Gy=(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=ZN(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=vl(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 un,o=this.zn.get(e);if(this.zn.set(e,[]),o===void 0)return i;try{for(var s=vl(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=uf(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=vl(e.keys()),a=s.next();!a.done;a=s.next()){var c=uf(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 ZN(t){return Array.from(t.entries())}var 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)}})(),VN=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){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 Oy(r,a.bo),a.vo=new Gy(r,o),a}return e.prototype.record=function(n,r){var i=this,o=new un;Array.from(n.entries()).forEach(function(s){var a=VN(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})(Ny);function hf(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)}}})})(dm);var lR=dm.exports,yd=hc(lR);function Yo(t){try{return yd.parse(t)}catch(e){try{return yd.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:n}),[]}}}function cR(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=Yo(l));let h=[Xl(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]?wE(s,a,c=>(...l)=>{c.apply(this,l);try{t(uR(a,e,...l))}catch(u){c("highlight logger error:",u,...l)}}):()=>{}}}function uR(t,e,...n){let r=Yo(new Error),i=e.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Xl(o,e.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:r.slice(1),value:i,attributes:Xl(n.filter(o=>typeof o=="object").reduce((o,s)=>mt(mt({},o),s),{}),e.stringifyOptions),time:Date.now()}}function ja(t,e,n,r){var i,o,s,a;let c=r!=null?r:e,l=Yo(c),u={};e instanceof Error&&(e=e.message,e.cause&&(u={"exception.cause":e.cause}));let h=pR(l);t({error:c,event:rn(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?rn(u):void 0})}var hR=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};let n=window.onerror=(s,a,c,l,u)=>{ja(t,s,a,u)},r=window.onunhandledrejection=s=>{if(s.reason){let a=s.promise;a.getStack?ja(t,s.reason,s.type,a.getStack()):ja(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}},pR=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},gd=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],bd=["websocket error",'\\"ResizeObserver loop'],dR=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},cn="1.9.0",vd=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function fR(t){var e=new Set([t]),n=new Set,r=t.match(vd);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(vd);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 mR=fR(cn),yR=cn.split(".")[0],Mr=Symbol.for("opentelemetry.js.api."+yR),Pr=dR;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:cn};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!==cn){var s=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+t+" does not match previously registered API v"+cn);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+cn+"."),!0}function pn(t){var e,n,r=(e=Pr[Mr])===null||e===void 0?void 0:e.version;if(!(!r||!mR(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"+cn+".");var n=Pr[Mr];n&&delete n[t]}var gR=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},bR=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))},vR=(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=pn("diag");if(r)return n.unshift(e),r[t].apply(r,bR([],gR(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 SR(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 wR=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},IR=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))},TR="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=pn("diag");if(a)return a[i].apply(a,IR([],wR(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=pn("diag"),h=SR((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(TR,n)},n.createComponentLogger=function(i){return new vR(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})(),ER=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},RR=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.")},CR=(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=ER(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=RR(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})(),ZR=Symbol("BaggageEntryMetadata"),kR=ve.instance();function VR(t){return t===void 0&&(t={}),new CR(new Map(Object.entries(t)))}function xR(t){return typeof t!="string"&&(kR.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:ZR,toString:function(){return t}}}function yc(t){return Symbol.for(t)}var NR=(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})(),on=new NR,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)}})(),OR=(function(){function t(){}return t.prototype.createGauge=function(e,n){return AR},t.prototype.createHistogram=function(e,n){return JR},t.prototype.createCounter=function(e,n){return FR},t.prototype.createUpDownCounter=function(e,n){return DR},t.prototype.createObservableGauge=function(e,n){return KR},t.prototype.createObservableCounter=function(e,n){return YR},t.prototype.createObservableUpDownCounter=function(e,n){return _R},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t})(),Ko=(function(){function t(){}return t})(),GR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(Ko),LR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e})(Ko),XR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(Ko),WR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e})(Ko),gc=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),UR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(gc),MR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(gc),PR=(function(t){yn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(gc),fm=new OR,FR=new GR,AR=new XR,JR=new WR,DR=new LR,YR=new UR,KR=new MR,_R=new PR;function HR(){return fm}var De;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(De||(De={}));var zR={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},BR={set:function(t,e,n){t!=null&&(t[e]=n)}},jR=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},QR=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))},$R=(function(){function t(){}return t.prototype.active=function(){return on},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,QR([r],jR(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})(),qR=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},tC=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))},Qa="context",eC=new $R,_o=(function(){function t(){}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalContextManager=function(e){return Kr(Qa,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,tC([e,n,r],qR(o),!1))},t.prototype.bind=function(e,n){return this.Ir().bind(e,n)},t.prototype.Ir=function(){return pn(Qa)||eC},t.prototype.disable=function(){this.Ir().disable(),_r(Qa,ve.instance())},t})(),Ve;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(Ve||(Ve={}));var mm="0000000000000000",ym="00000000000000000000000000000000",gm={traceId:ym,spanId:mm,traceFlags:Ve.NONE},Nr=(function(){function t(e){e===void 0&&(e=gm),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})(),bc=yc("OpenTelemetry Context Key SPAN");function vc(t){return t.getValue(bc)||void 0}function nC(){return vc(_o.getInstance().active())}function Sc(t,e){return t.setValue(bc,e)}function rC(t){return t.deleteValue(bc)}function iC(t,e){return Sc(t,new Nr(e))}function bm(t){var e;return(e=vc(t))===null||e===void 0?void 0:e.spanContext()}var oC=/^([0-9a-f]{32})$/i,sC=/^[0-9a-f]{16}$/i;function vm(t){return oC.test(t)&&t!==ym}function aC(t){return sC.test(t)&&t!==mm}function Ho(t){return vm(t.traceId)&&aC(t.spanId)}function lC(t){return new Nr(t)}var $a=_o.getInstance(),Sm=(function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=$a.active());var i=!!(n!=null&&n.root);if(i)return new Nr;var o=r&&bm(r);return cC(o)&&Ho(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:$a.active(),l=this.startSpan(e,o,c),u=Sc(c,l);return $a.with(u,a,void 0,l)}},t})();function cC(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var uC=new Sm,hC=(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):uC},t})(),pC=(function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new Sm},t})(),dC=new pC,Sd=(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 hC(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:dC},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})(),Zo;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Zo||(Zo={}));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 ko;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(ko||(ko={}));var tt=_o.getInstance(),X=ve.instance(),fC=(function(){function t(){}return t.prototype.getMeter=function(e,n,r){return fm},t})(),mC=new fC,qa="metrics",yC=(function(){function t(){}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalMeterProvider=function(e){return Kr(qa,e,ve.instance())},t.prototype.getMeterProvider=function(){return pn(qa)||mC},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){_r(qa,ve.instance())},t})(),Ce=yC.getInstance(),gC=(function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t})(),wc=yc("OpenTelemetry Baggage Key");function wm(t){return t.getValue(wc)||void 0}function bC(){return wm(_o.getInstance().active())}function vC(t,e){return t.setValue(wc,e)}function SC(t){return t.deleteValue(wc)}var tl="propagation",wC=new gC,IC=(function(){function t(){this.createBaggage=VR,this.getBaggage=wm,this.getActiveBaggage=bC,this.setBaggage=vC,this.deleteBaggage=SC}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalPropagator=function(e){return Kr(tl,e,ve.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=BR),this.Dr().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=zR),this.Dr().extract(e,n,r)},t.prototype.fields=function(){return this.Dr().fields()},t.prototype.disable=function(){_r(tl,ve.instance())},t.prototype.Dr=function(){return pn(tl)||wC},t})(),Qt=IC.getInstance(),el="trace",TC=(function(){function t(){this.Tr=new Sd,this.wrapSpanContext=lC,this.isSpanContextValid=Ho,this.deleteSpan=rC,this.getSpan=vc,this.getActiveSpan=nC,this.getSpanContext=bm,this.setSpan=Sc,this.setSpanContext=iC}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalTracerProvider=function(e){var n=Kr(el,this.Tr,ve.instance());return n&&this.Tr.setDelegate(e),n},t.prototype.getTracerProvider=function(){return pn(el)||this.Tr},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){_r(el,ve.instance()),this.Tr=new Sd},t})(),ut=TC.getInstance(),Im=yc("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Tm(t){return t.setValue(Im,!0)}function Ic(t){return t.getValue(Im)===!0}var EC="=",Pl=";",Fl=",",nl="baggage",RC=180,CC=4096,ZC=8192,kC=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 VC(t){return t.reduce(function(e,n){var r=""+e+(e!==""?Fl:"")+n;return r.length>ZC?e:r},"")}function xC(t){return t.getAllEntries().map(function(e){var n=kC(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Pl+i.metadata.toString()),o})}function NC(t){var e=t.split(Pl);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(EC);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(Pl))),{key:i,value:o,metadata:s}}}}}var Em=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=Qt.getBaggage(e);if(!(!i||Ic(e))){var o=xC(i).filter(function(a){return a.length<=CC}).slice(0,RC),s=VC(o);s.length>0&&r.set(n,nl,s)}},t.prototype.extract=function(e,n,r){var i=r.get(n,nl),o=Array.isArray(i)?i.join(Fl):i;if(!o)return e;var s={};if(o.length===0)return e;var a=o.split(Fl);return a.forEach(function(c){var l=NC(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[nl]},t})(),Rm=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.")},OC=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 fo(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=Rm(Object.entries(t)),o=i.next();!o.done;o=i.next()){var s=OC(o.value,2),a=s[0],c=s[1];if(!GC(a)){X.warn("Invalid attribute key: "+a);continue}if(!Cm(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 GC(t){return typeof t=="string"&&t.length>0}function Cm(t){return t==null?!0:Array.isArray(t)?LC(t):Zm(t)}function LC(t){var e,n,r;try{for(var i=Rm(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!=null){if(!r){if(Zm(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 Zm(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function XC(){return function(t){X.error(WC(t))}}function WC(t){return typeof t=="string"?t:JSON.stringify(UC(t))}function UC(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 MC=XC();function Ye(t){try{MC(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 PC=",",FC=["OTEL_SDK_DISABLED"];function AC(t){return FC.indexOf(t)>-1}var JC=["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 DC(t){return JC.indexOf(t)>-1}var YC=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function KC(t){return YC.indexOf(t)>-1}var mo=1/0,yo=128,_C=128,HC=128,km={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:mo,OTEL_ATTRIBUTE_COUNT_LIMIT:yo,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:mo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:yo,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:mo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:yo,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:_C,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:HC,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 zC(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function BC(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 jC(t,e,n,r){r===void 0&&(r=PC);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var QC={ALL:St.ALL,VERBOSE:St.VERBOSE,DEBUG:St.DEBUG,INFO:St.INFO,WARN:St.WARN,ERROR:St.ERROR,NONE:St.NONE};function $C(t,e,n){var r=n[t];if(typeof r=="string"){var i=QC[r.toUpperCase()];i!=null&&(e[t]=i)}}function Vm(t){var e={};for(var n in km){var r=n;switch(r){case"OTEL_LOG_LEVEL":$C(r,e,t);break;default:if(AC(r))zC(r,e,t);else if(DC(r))BC(r,e,t);else if(KC(r))jC(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=Vm(Or);return Object.assign({},km,t)}function qC(){return Vm(Or)}function wd(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Tc(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var i=wd(t.charCodeAt(r)),o=wd(t.charCodeAt(r+1));e[n++]=i<<4|o}return e}var te=performance,tZ="1.30.1",eZ="process.runtime.name",nZ="telemetry.sdk.name",rZ="telemetry.sdk.language",iZ="telemetry.sdk.version",oZ=eZ,sZ=nZ,aZ=rZ,lZ=iZ,cZ="webjs",uZ=cZ,Wn,rl=(Wn={},Wn[sZ]="opentelemetry",Wn[oZ]="browser",Wn[aZ]=uZ,Wn[lZ]=tZ,Wn),hZ=9,pZ=6,dZ=Math.pow(10,pZ),Vo=Math.pow(10,hZ);function $t(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*dZ);return[n,r]}function Ec(){var t=te.timeOrigin;if(typeof t!="number"){var e=te;t=e.timing&&e.timing.fetchStart}return t}function dn(t){var e=$t(Ec()),n=$t(typeof t=="number"?t:te.now());return xm(e,n)}function Gr(t){if(Rc(t))return t;if(typeof t=="number")return t<Ec()?dn(t):$t(t);if(t instanceof Date)return $t(t.getTime());throw TypeError("Invalid input type")}function fZ(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=Vo),[n,r]}function Ze(t){return t[0]*Vo+t[1]}function Bi(t){return t[0]*1e6+t[1]/1e3}function Rc(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Id(t){return Rc(t)||typeof t=="number"||t instanceof Date}function xm(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Vo&&(n[1]-=Vo,n[0]+=1),n}var kt;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(kt||(kt={}));var mZ=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.")},Nm=(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=mZ(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})(),Al="[_0-9a-z-*/]",yZ="[a-z]"+Al+"{0,255}",gZ="[a-z0-9]"+Al+"{0,240}@[a-z]"+Al+"{0,13}",bZ=new RegExp("^(?:"+yZ+"|"+gZ+")$"),vZ=/^[ -~]{0,255}[!-~]$/,SZ=/,|=/;function wZ(t){return bZ.test(t)}function IZ(t){return vZ.test(t)&&!SZ.test(t)}var Td=32,TZ=512,Ed=",",Rd="=",EZ=(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+Rd+e.get(r)),n},[]).join(Ed)},t.prototype.Hs=function(e){e.length>TZ||(this._e=e.split(Ed).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Rd);if(o!==-1){var s=i.slice(0,o),a=i.slice(o+1,r.length);wZ(s)&&IZ(a)&&n.set(s,a)}return n},new Map),this._e.size>Td&&(this._e=new Map(Array.from(this._e.entries()).reverse().slice(0,Td))))},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})(),go="traceparent",il="tracestate",RZ="00",CZ="(?!ff)[\\da-f]{2}",ZZ="(?![0]{32})[\\da-f]{32}",kZ="(?![0]{16})[\\da-f]{16}",VZ="[\\da-f]{2}",xZ=new RegExp("^\\s?("+CZ+")-("+ZZ+")-("+kZ+")-("+VZ+")(-.*)?\\s?$");function NZ(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 Om=(function(){function t(){}return t.prototype.inject=function(e,n,r){var i=ut.getSpanContext(e);if(!(!i||Ic(e)||!Ho(i))){var o=RZ+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||Ve.NONE).toString(16);r.set(n,go,o),i.traceState&&r.set(n,il,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,go);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var s=NZ(o);if(!s)return e;s.isRemote=!0;var a=r.get(n,il);if(a){var c=Array.isArray(a)?a.join(","):a;s.traceState=new EZ(typeof c=="string"?c:void 0)}return ut.setSpanContext(e,s)},t.prototype.fields=function(){return[go,il]},t})(),OZ="[object Object]",GZ="[object Null]",LZ="[object Undefined]",XZ=Function.prototype,Gm=XZ.toString,WZ=Gm.call(Object),UZ=MZ(Object.getPrototypeOf,Object),Lm=Object.prototype,Xm=Lm.hasOwnProperty,sn=Symbol?Symbol.toStringTag:void 0,Wm=Lm.toString;function MZ(t,e){return function(n){return t(e(n))}}function Cd(t){if(!PZ(t)||FZ(t)!==OZ)return!1;var e=UZ(t);if(e===null)return!0;var n=Xm.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Gm.call(n)===WZ}function PZ(t){return t!=null&&typeof t=="object"}function FZ(t){return t==null?t===void 0?LZ:GZ:sn&&sn in Object(t)?AZ(t):JZ(t)}function AZ(t){var e=Xm.call(t,sn),n=t[sn],r=!1;try{t[sn]=void 0,r=!0}catch(o){}var i=Wm.call(t);return r&&(e?t[sn]=n:delete t[sn]),i}function JZ(t){return Wm.call(t)}var DZ=20;function Um(){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=Mm(n,t.shift(),0,r);return n}function ol(t){return xo(t)?t.slice():t}function Mm(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>DZ)){if(n++,bo(t)||bo(e)||Pm(e))i=ol(e);else if(xo(t)){if(i=t.slice(),xo(e))for(var o=0,s=e.length;o<s;o++)i.push(ol(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]=ol(e[c])}}else if(Ir(t))if(Ir(e)){if(!YZ(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(bo(l))typeof l>"u"?delete i[c]:i[c]=l;else{var u=i[c],h=l;if(Zd(t,c,r)||Zd(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]=Mm(i[c],l,n,r)}}}}else i=e;return i}}function Zd(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 xo(t){return Array.isArray(t)}function Pm(t){return typeof t=="function"}function Ir(t){return!bo(t)&&!xo(t)&&!Pm(t)&&typeof t=="object"}function bo(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function YZ(t,e){return!(!Cd(t)||!Cd(e))}var KZ=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 Fm(t,e){return typeof e=="string"?t===e:!!t.match(e)}function Am(t,e){var n,r;if(!e)return!1;try{for(var i=KZ(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(Fm(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 _Z=(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})(),HZ=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},zZ=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))},BZ=(function(){function t(e,n){this.Qs=e,this.$s=n,this._r=!1,this.or=new _Z}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,zZ([this.$s],HZ(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 jZ(t,e){return new Promise(function(n){tt.with(Tm(tt.active()),function(){t.export(e,function(r){n(r)})})})}var QZ={qs:jZ},Jm=(function(){function t(){}return t.prototype.emit=function(e){},t})(),$Z=new Jm,qZ=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new Jm},t})(),Dm=new qZ,tk=(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):$Z},t})(),kd=(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 tk(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:Dm},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})(),ek=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},ji=Symbol.for("io.opentelemetry.js.api.logs"),Tr=ek;function nk(t,e,n){return function(r){return r===t?e:n}}var Vd=1,rk=(function(){function t(){this.en=new kd}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Tr[ji]?this.getLoggerProvider():(Tr[ji]=nk(Vd,e,Dm),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Tr[ji])===null||e===void 0?void 0:e.call(Tr,Vd))!==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[ji],this.en=new kd},t})(),Ym=rk.getInstance();function ik(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 ok(t){t.forEach(function(e){return e.disable()})}function sk(t){var e,n,r=t.tracerProvider||ut.getTracerProvider(),i=t.meterProvider||Ce.getMeterProvider(),o=t.loggerProvider||Ym.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return ik(s,r,i,o),function(){ok(s)}}function Jl(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&&(Jl(t.logger)?Xt=t.logger:Xt("new logger isn't a function, not replacing"))}function Km(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(!Jl(t[e])||!Jl(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 ak(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){Km(r,i,n)})})}function _m(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 lk(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){_m(n,r)})})}Hr.wrap=Km;Hr.massWrap=ak;Hr.unwrap=_m;Hr.massUnwrap=lk;var qt=Hr,Dl=function(){return Dl=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},Dl.apply(this,arguments)},ck=(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=Ym.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=Dl({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})(),uk=(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)}})(),Hm=(function(t){uk(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})(ck);function xd(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 hk="exception.type",pk="exception.message",dk="exception.stacktrace",sl=hk,al=pk,fk=dk,mk="exception",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)},yk=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.")},Nd=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},gk=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))},bk=(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:ko.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+Ec()),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):Cm(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=yk(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=Nd(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++),Id(n)&&(Id(r)||(r=n),n=void 0);var i=fo(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,gk([],Nd(e),!1)),this},t.prototype.setStatus=function(e){return this.lr()?this:(this.status=Yl({},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=fZ(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 dn(e+this.ea);if(typeof e=="number")return $t(e);if(e instanceof Date)return $t(e.getTime());if(Rc(e))return e;if(this.na)return $t(Date.now());var n=te.now()-this.Mo;return xm(this.startTime,$t(n))},t.prototype.isRecording=function(){return this.ar===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[al]=e:e&&(e.code?r[sl]=e.code.toString():e.name&&(r[sl]=e.name),e.message&&(r[al]=e.message),e.stack&&(r[fk]=e.stack)),r[sl]||r[al]?this.addEvent(mk,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 No=(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})(),ll=(function(){function t(e){var n,r,i,o;this.sn=e.root,this.sn||(Ye(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 No,this.Do=(i=e.localParentSampled)!==null&&i!==void 0?i:new Jn,this.Yo=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new No}return t.prototype.shouldSample=function(e,n,r,i,o,s){var a=ut.getSpanContext(e);return!a||!Ho(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})(),Od=(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:vm(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})(),vk=ye.AlwaysOn,Un=1;function zm(){var t=Yn();return{sampler:Bm(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 Bm(t){switch(t===void 0&&(t=Yn()),t.OTEL_TRACES_SAMPLER){case ye.AlwaysOn:return new Jn;case ye.AlwaysOff:return new No;case ye.ParentBasedAlwaysOn:return new ll({root:new Jn});case ye.ParentBasedAlwaysOff:return new ll({root:new No});case ye.TraceIdRatio:return new Od(Gd(t));case ye.ParentBasedTraceIdRatio:return new ll({root:new Od(Gd(t))});default:return X.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+vk+'".'),new Jn}}function Gd(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 Sk(t){var e={sampler:Bm()},n=zm(),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 wk(t){var e,n,r,i,o,s,a,c,l,u,h,p,f=Object.assign({},t.spanLimits),m=qC();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:yo,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:mo,Object.assign({},t,{spanLimits:f})}var Ik=(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 BZ(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(Tm(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){Ye(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,Ye(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})(),Tk=(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){Tk(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){Ye(i)})},this.Qr=function(){r.forceFlush().catch(function(i){Ye(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})(Ik),Ek=8,Rk=16,Ck=(function(){function t(){this.generateTraceId=Ld(Rk),this.generateSpanId=Ld(Ek)}return t})(),Qi=Array(32);function Ld(t){return function(){for(var e=0;e<t*2;e++)Qi[e]=Math.floor(Math.random()*16)+48,Qi[e]>=58&&(Qi[e]+=39);return String.fromCharCode.apply(null,Qi.slice(0,t*2))}}var Zk=(function(){function t(e,n,r){this.ha=r;var i=Sk(n);this.pa=i.sampler,this.da=i.generalLimits,this.Wn=i.spanLimits,this.Bo=n.idGenerator||new Ck,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(Ic(r)){X.debug("Instrumentation suppressed, returning Noop Span");var c=ut.wrapSpanContext(gm);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:fo(V.attributes)}}),b=fo(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===Zo.RECORD_AND_SAMPLED?Ve.SAMPLED:Ve.NONE,R={traceId:h,spanId:u,traceFlags:I,traceState:p};if(v.decision===Zo.NOT_RECORD){X.debug("Recording is off, propagating context in a non-recording span");var c=ut.wrapSpanContext(R);return c}var E=fo(Object.assign(b,v.attributes)),T=new bk(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})(),kk="service.name",Vk="telemetry.sdk.name",xk="telemetry.sdk.language",Nk="telemetry.sdk.version",Ok=kk,Xd=Vk,Wd=xk,Ud=Nk;function Gk(){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)},Lk=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())})},Xk=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}}},Wk=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[Ok]=Gk(),e[Wd]=rl[Wd],e[Xd]=rl[Xd],e[Ud]=rl[Ud],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 Lk(this,void 0,void 0,function(){return Xk(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=Wk(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})(),$i=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.")},Md=(function(){function t(e){this.xr=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=$i(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){Ye(c||new Error("MultiSpanProcessor: forceFlush failed")),a()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=$i(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=$i(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=$i(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})(),Uk=(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})(),Mk=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},Pk=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))},an;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(an||(an={}));var Fk=(function(){function t(e){e===void 0&&(e={});var n,r;this.Pn=[],this.$r=new Map;var i=Um({},zm(),wk(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=Pk([],Mk(e.spanProcessors),!1),this.activeSpanProcessor=new Md(this.Pn);else{var o=this.fa();if(o!==void 0){var s=new jm(o);this.activeSpanProcessor=s}else this.activeSpanProcessor=new Uk}}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 Zk({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 Md(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=an.timeout},e);r.forceFlush().then(function(){clearTimeout(s),o!==an.timeout&&(o=an.resolved,i(o))}).catch(function(a){clearTimeout(s),o=an.error,i(a)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var s=o.filter(function(a){return a!==an.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 Nm({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 Om}],["baggage",function(){return new Em}]]),t.va=new Map,t})(),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(;!(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},Jk=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=on}return t.prototype.Sa=function(e,n){e===void 0&&(e=on);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=on,this.qr=!1,this},t.prototype.enable=function(){return this.qr?this:(this.qr=!0,this.Xe=on,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||on;try{return n.call.apply(n,Jk([r],Ak(i),!1))}finally{this.Xe=s}},t})(),Dk=(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)}})(),Yk=(function(t){Dk(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})(Fk),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 Kk="http.response_content_length",_k="http.response_content_length_uncompressed",Hk=Kk,zk=_k,cl;function Bk(){return cl||(cl=document.createElement("a")),cl}function Ke(t,e){return e in t}function Rt(t,e,n,r){var i=void 0,o=void 0;Ke(n,e)&&typeof n[e]=="number"&&(i=n[e]);var s=J.FETCH_START;if(Ke(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),Ke(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(Hk,r);var i=e[J.DECODED_BODY_SIZE];i!==void 0&&r!==i&&t.setAttribute(zk,i)}function jk(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 $m(){return typeof location<"u"?location.origin:void 0}function qm(t,e,n,r,i,o){i===void 0&&(i=new WeakSet);var s=Re(t);t=s.toString();var a=$k(t,e,n,r,i,o);if(a.length===0)return{mainRequest:void 0};if(a.length===1)return{mainRequest:a[0]};var c=jk(a);if(s.origin!==$m()&&c.length>1){var l=c[0],u=Qk(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 Qk(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 $k(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=Bk();return e.href=t,e}function ty(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=t1(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=ty(t.parentNode,!1)),r+=n,r}function qk(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 t1(t,e){var n=t.nodeType,r=qk(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 ey(t,e){var n=e||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=Re(t);return r.origin===$m()?!0:n.some(function(i){return Fm(t,i)})}var Lr;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(Lr||(Lr={}));var e1="0.44.0",n1="@opentelemetry/instrumentation-document-load",r1="http.url",i1="http.user_agent",ul=r1,o1=i1,s1="deployment.environment",a1=s1,l1="service.name",c1="telemetry.sdk.name",u1="telemetry.sdk.version",h1="url.full",p1="url.path",d1="url.query",Oo;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Oo||(Oo={}));var f1=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(Ke(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(Ke(s,c)){var l=s[c];typeof l=="number"&&(n[c]=l)}})}}return n},Pd={"first-paint":Oo.FIRST_PAINT,"first-contentful-paint":Oo.FIRST_CONTENTFUL_PAINT},m1=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;Ke(Pd,o)&&t.addEvent(Pd[o],s)})},y1=(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)}})(),g1=(function(t){y1(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,n1,e1,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")===go}),i=f1(),o=r&&r.content||"";tt.with(Qt.extract(on,{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(ul,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(ul,location.href),a.setAttribute(o1,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||m1(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&&(Ke(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(ul,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(Ke(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&&xd(function(){return r(n)},function(o){o&&i.v.error("addCustomAttributesOnSpan",o)})},e.prototype.Ea=function(n,r,i){var o=this;i&&xd(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})(Hm),ny=(function(){function t(){}return t.prototype.emit=function(e){},t})(),b1=new ny,v1=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new ny},t})(),ry=new v1,S1=(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):b1},t})(),Fd=(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 S1(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this.b)!==null&&e!==void 0?e:ry},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})(),w1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},qi=Symbol.for("io.opentelemetry.js.api.logs"),Rr=w1;function I1(t,e,n){return function(r){return r===t?e:n}}var Ad=1,T1=(function(){function t(){this.en=new Fd}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Rr[qi]?this.getLoggerProvider():(Rr[qi]=I1(Ad,e,ry),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Rr[qi])===null||e===void 0?void 0:e.call(Rr,Ad))!==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[qi],this.en=new Fd},t})(),E1=T1.getInstance(),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)},R1=(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=E1.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=Kl({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})(),C1=(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)}})(),Z1=(function(t){C1(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})(R1);function k1(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function V1(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Go;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(Go||(Go={}));var x1="http.method",N1="http.url",O1="http.host",G1="http.scheme",L1="http.status_code",X1="http.user_agent",W1="http.request_content_length_uncompressed",U1=x1,M1=N1,P1=O1,F1=G1,A1=L1,J1=X1,D1=W1,Y1=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())})},K1=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}}},_1=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.")},H1=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},iy=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function z1(){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=B1(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(j1(n.body))}else{var s=t[0];return s!=null&&s.body?s.clone().text().then(function(a){return _l(a)}):Promise.resolve()}}function B1(t){if(!t.pipeThrough)return iy.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 Y1(this,void 0,void 0,function(){var a;return K1(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 j1(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 $1(t);if(t instanceof URLSearchParams)return _l(t.toString());if(typeof t=="string")return _l(t);iy.warn("unknown body type")}var Q1=new TextEncoder;function _l(t){return Q1.encode(t).byteLength}function $1(t){var e,n,r=0;try{for(var i=_1(t.entries()),o=i.next();!o.done;o=i.next()){var s=H1(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",q1=(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)}})(),tV=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},eV=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))},hl,nV=300,Dd=typeof process=="object"&&((hl=process.release)===null||hl===void 0?void 0:hl.name)==="node",rV=(function(t){q1(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",Jd,n)||this;return r.component="fetch",r.version=Jd,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(A1,r.status),r.statusText!=null&&n.setAttribute(Go.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(P1,i.host),n.setAttribute(F1,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(J1,navigator.userAgent)},e.prototype.si=function(n,r){if(!ey(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={}),Am(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[Go.COMPONENT]=this.moduleName,i[U1]=o,i[M1]=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=qm(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=dn();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)},nV)},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&&z1.apply(void 0,eV([],tV(o),!1)).then(function(b){b&&u.setAttribute(D1,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&&k1(function(){return s(n,r,i)},function(a){a&&o.v.error("applyCustomAttributesOnSpan",a)})},e.prototype.Za=function(n){var r=dn(),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(Dd){this.v.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}V1(fetch)&&(this.P(Or,"fetch"),this.v.debug("removing previous patch for constructor")),this.ae(Or,"fetch",this.Ca())},e.prototype.disable=function(){Dd||(this.P(Or,"fetch"),this.un=new WeakSet)},e})(Z1),oy=(function(){function t(){}return t.prototype.emit=function(e){},t})(),iV=new oy,oV=(function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new oy},t})(),sy=new oV,sV=(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):iV},t})(),Yd=(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 sV(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})(),aV=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},to=Symbol.for("io.opentelemetry.js.api.logs"),Cr=aV;function lV(t,e,n){return function(r){return r===t?e:n}}var Kd=1,cV=(function(){function t(){this.en=new Yd}return t.getInstance=function(){return this.V||(this.V=new t),this.V},t.prototype.setGlobalLoggerProvider=function(e){return Cr[to]?this.getLoggerProvider():(Cr[to]=lV(Kd,e,sy),this.en.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Cr[to])===null||e===void 0?void 0:e.call(Cr,Kd))!==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[to],this.en=new Yd},t})(),uV=cV.getInstance(),Hl=function(){return Hl=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},Hl.apply(this,arguments)},hV=(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=uV.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=Hl({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})(),pV=(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)}})(),dV=(function(t){pV(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})(hV);function fV(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function _d(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var mV="http.method",yV="http.url",gV="http.host",bV="http.scheme",vV="http.status_code",SV="http.user_agent",wV="http.request_content_length_uncompressed",IV=mV,TV=yV,EV=gV,RV=bV,CV=vV,ZV=SV,kV=wV,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 VV=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},NV=X.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function OV(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 LV(t);if(t instanceof URLSearchParams)return Hd(t.toString());if(typeof t=="string")return Hd(t);NV.warn("unknown body type")}var GV=new TextEncoder;function Hd(t){return GV.encode(t).byteLength}function LV(t){var e,n,r=0;try{for(var i=VV(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 zd="0.57.1",zl;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(zl||(zl={}));var XV=(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)}})(),WV=300,UV=(function(t){XV(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",zd,n)||this;return r.component="xml-http-request",r.version=zd,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(!ey(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(CV,r.status),r.statusText!==void 0&&n.setAttribute(zl.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(EV,o.host),n.setAttribute(RV,o.protocol.replace(":","")),n.setAttribute(ZV,navigator.userAgent)}},e.prototype.ka=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&fV(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=qm(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(Am(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[IV]=i,o[TV]=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=dn(),m=Date.now();setTimeout(function(){r(u,p,f,m)},WV)}}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=OV(v);I!==void 0&&d.setAttribute(kV,I)}tt.with(ut.setSpan(tt.active(),d),function(){n.wn++,m.sendStartTime=dn(),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),_d(XMLHttpRequest.prototype.open)&&(this.P(XMLHttpRequest.prototype,"open"),this.v.debug("removing previous patch from method open")),_d(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})(dV),MV=(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=>{[...PV,...t].includes(s==null?void 0:s.toLowerCase())&&(o[s]="[REDACTED]")}),o)},PV=["authorization","cookie","proxy-authorization","token"],FV=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],AV=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),JV=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function DV(t){return!!(t.includes("/sdk/evalx")&&t.match(AV)||t.includes("/eval/")&&t.match(JV))}var YV=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),KV=t=>DV(t),_V=(t,e)=>e.some(n=>t.toLocaleLowerCase().includes(n)),HV=(t,e,n)=>!_V(t,e)&&!KV(t)&&!YV(t),zV=(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},Bd=64*1024,BV={"application/json":64*1024*1024,"text/plain":64*1024*1024},ay=(t,e,n,r)=>{var i,o,s;let a=Bd;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=BV[c])!=null?s:Bd}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},jV=(t,e,n)=>Do(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=ay(r,n,e,t.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r}),ly=(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})(),QV=(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)}})(),jd=(function(t){QV(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 $V(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 qV(t){if(t!=null)return function(){return t}}function tx(t,e,n){var r,i,o,s,a,c;return{timeoutMillis:$V((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 ex(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var nx=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())})},rx=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}}},ix=(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 nx(this,void 0,void 0,function(){return rx(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.pr)];case 1:return e.sent(),[2]}})})},t})();function ox(t){return new ix(t.concurrencyLimit)}function sx(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function ax(){return{handleResponse:function(t){t==null||!sx(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||X.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var lx=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())})},cx=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}}},ux=(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 jd("Export failed with retryable status")}):n({code:kt.FAILED,error:new jd("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 lx(this,void 0,void 0,function(){return cx(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 hx(t,e){return new ux(t.transport,t.serializer,ax(),t.promiseHandler,e.timeout)}function cy(t,e,n){return hx({transport:n,serializer:e,promiseHandler:ox(t)},{timeout:t.timeoutMillis})}function uy(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function px(t){var e=Number(BigInt.asUintN(32,t)),n=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:n}}function hy(t){var e=uy(t);return px(e)}function dx(t){var e=uy(t);return e.toString()}var fx=typeof BigInt<"u"?dx:Ze;function Qd(t){return t}function py(t){if(t!==void 0)return Tc(t)}var mx={encodeHrTime:hy,encodeSpanContext:Tc,encodeOptionalSpanContext:py};function dy(t){var e,n;if(t===void 0)return mx;var r=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(n=t.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?hy:fx,encodeSpanContext:i?Qd:Tc,encodeOptionalSpanContext:i?Qd:py}}var yx=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 fy(t){return{attributes:gn(t.attributes),droppedAttributesCount:0}}function my(t){return{name:t.name,version:t.version}}function gn(t){return Object.keys(t).map(function(e){return yy(e,t[e])})}function yy(t,e){return{key:t,value:gy(e)}}function gy(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(gy)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(n){var r=yx(n,2),i=r[0],o=r[1];return yy(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 gx=(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,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())})},qd=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}}},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(;!(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},vx=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))},Sx=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 wx(t){return t!=null}function by(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(n){return[n,t[n]]})))}function Ix(t){var e,n;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((n=t.schemaUrl)!==null&&n!==void 0?n:"")}var vy=(function(t){gx(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 vy("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function Tx(t){return $d(this,void 0,void 0,function(){var e=this;return qd(this,function(n){return[2,Promise.all(t.map(function(r){return $d(e,void 0,void 0,function(){var i,o;return qd(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 Ex(t){return t.status==="rejected"}function tf(t,e){var n=[];return t.forEach(function(r){n.push.apply(n,vx([],bx(e(r)),!1))}),n}function Rx(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=Sx(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 Cx(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 Zx(t,e){return t.toLowerCase()===e.toLowerCase()}var fn;(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"})(fn||(fn={}));var kx=(function(){function t(){this.kind=fn.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 Ox(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:De.DOUBLE,advice:(s=n==null?void 0:n.advice)!==null&&s!==void 0?s:{}}}function Vx(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 Zx(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var Nx=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Ox(t){return t.match(Nx)!=null}var Gx=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 Lx(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 pl=(function(){function t(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=Lx(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=Cx(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})(),Sy=(function(){function t(e,n){this.dr=e,this.xt=n,this.kind=fn.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new pl(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 pl(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 pl(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=Gx(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})(),dl=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},fl=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))},ef=(function(){function t(e,n,r,i){e===void 0&&(e=new Xx),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})(),Xx=(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,fl([r,this.kt.length-n],dl(this.kt.slice(n)),!1)),i.splice.apply(i,fl([0,n],dl(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(fl([],dl(this.kt),!1))},t})(),Wx=52,Ux=2146435072,Mx=1048575,wy=1023,Iy=-1022,Ty=wy,Bl=Math.pow(2,-1022);function Ey(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=(n&Ux)>>20;return r-wy}function Ry(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4),i=(n&Mx)*Math.pow(2,32);return i+r}function jl(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function Px(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var Fx=(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){Fx(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Error),Ax=(function(){function t(e){this.Vn=-e}return t.prototype.mapToIndex=function(e){if(e<Bl)return this.fr();var n=Ey(e),r=this.Ua(Ry(e)-1,Wx);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 jl(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=Iy>>this.Vn;return this.Vn<2&&e--,e},t.prototype.Nr=function(){return Ty>>this.Vn},t.prototype.Ua=function(e,n){return Math.floor(e*Math.pow(2,-n))},t})(),Jx=(function(){function t(e){this.Dn=e,this.io=jl(Math.LOG2E,e),this.Ma=jl(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=Bl)return this.fr()-1;if(Ry(e)===0){var n=Ey(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 Bl;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 Iy<<this.Dn},t.prototype.Nr=function(){return(Ty+1<<this.Dn)-1},t})(),nf=-10,rf=20,Dx=Array.from({length:31},function(t,e){return e>10?new Jx(e-10):new Ax(e-10)});function of(t){if(t>rf||t<nf)throw new Dr("expected scale >= "+nf+" && <= "+rf+", got: "+t);return Dx[t+10]}var Yx=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},eo=(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})(),Kx=20,_x=160,ml=2,Hx=(function(){function t(e,n,r,i,o,s,a,c,l,u,h){e===void 0&&(e=e),n===void 0&&(n=_x),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 ef),u===void 0&&(u=new ef),h===void 0&&(h=of(Kx)),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<ml&&(X.warn("Exponential Histogram Max Size set to "+this.Ze+", changing to the minimum size of: "+ml),this.Ze=ml)}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=Px(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=of(n)}},t.prototype.hs=function(e){var n=Math.min(this.scale,e.scale),r=eo.combine(this.Or(this.positive,this.scale,n),this.Or(e.positive,e.scale,n)),i=eo.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 eo(0,-1);var i=n-r;return new eo(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})(),zx=(function(){function t(e,n){this.Ze=e,this.xt=n,this.kind=fn.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new Hx(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=Yx(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})(),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},yl=(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})(),jx=(function(){function t(){this.kind=fn.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new yl(e)},t.prototype.merge=function(e,n){var r=Bi(n.sampleTime)>=Bi(e.sampleTime)?n:e;return new yl(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(e,n){var r=Bi(n.sampleTime)>=Bi(e.sampleTime)?n:e;return new yl(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=Bx(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t})(),Qx=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})(),sf=(function(){function t(e){this.monotonic=e,this.kind=fn.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=Qx(o,2),a=s[0],c=s[1];return{attributes:a,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t})(),bn=(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 Cy},t.Sum=function(){return Zy},t.LastValue=function(){return ky},t.Histogram=function(){return Vy},t.ExponentialHistogram=function(){return oN},t.Default=function(){return sN},t})(),$x=(function(t){bn(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 kx,e})(xe),qx=(function(t){bn(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 sf(!0),e.NON_MONOTONIC_INSTANCE=new sf(!1),e})(xe),tN=(function(t){bn(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 jx,e})(xe),eN=(function(t){bn(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 Sy([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e})(xe),nN=(function(t){bn(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 Sy(this.dr,this.xt)},e})(xe),rN=(function(t){bn(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 zx(this.Ze,this.xt)},e})(xe),iN=(function(t){bn(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 Zy;case K.GAUGE:case K.OBSERVABLE_GAUGE:return ky;case K.HISTOGRAM:return n.advice.explicitBucketBoundaries?new nN(n.advice.explicitBucketBoundaries):Vy}return X.warn("Unable to recognize instrument type: "+n.type),Cy},e.prototype.createAggregator=function(n){return this.Kr(n).createAggregator(n)},e})(xe),Cy=new $x,Zy=new qx,ky=new tN,Vy=new eN,oN=new rN,sN=new iN,aN=function(t){return xe.Default()},lN=function(t){return ae.CUMULATIVE},gl=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())})},bl=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}}},af=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},cN=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))},uN=(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:aN,this.uo=(r=e==null?void 0:e.aggregationTemporalitySelector)!==null&&r!==void 0?r:lN,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 gl(this,void 0,void 0,function(){var n,r,i,o,s,a;return bl(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(cN([this.ho.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})],af(this.Pa.map(function(l){return l.collect({timeoutMillis:e==null?void 0:e.timeoutMillis})})),!1))];case 1:return n=af.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(tf(i,function(l){return l.errors})),s=r.resourceMetrics.resource,a=r.resourceMetrics.scopeMetrics.concat(tf(i,function(l){return l.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:s,scopeMetrics:a},errors:o}]}})})},t.prototype.shutdown=function(e){return gl(this,void 0,void 0,function(){return bl(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 gl(this,void 0,void 0,function(){return bl(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})(),hN=(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)}})(),no=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}}},pN=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},dN=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))},fN=(function(t){hN(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 no(this,void 0,void 0,function(){var n;return ro(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 vy?(X.error("Export took longer than %s milliseconds and timed out.",this.po),[2]):(Ye(n),[3,3]);case 3:return[2]}})})},e.prototype.Aa=function(){var n,r;return no(this,void 0,void 0,function(){var i,o,s,a,c,l;return ro(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,dN(["PeriodicExportingMetricReader: metrics collection errors"],pN(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),Ye(a),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,QZ.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 no(this,void 0,void 0,function(){return ro(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 no(this,void 0,void 0,function(){return ro(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})(uN),mN=(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})(),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)}})(),zo=(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===De.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})(),yN=(function(t){vn(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})(zo),gN=(function(t){vn(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})(zo),bN=(function(t){vn(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})(zo),vN=(function(t){vn(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})(zo),Bo=(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})(),SN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Bo),wN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Bo),IN=(function(t){vn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Bo);function Ql(t){return t instanceof Bo}var TN=(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 bN(i,r)},t.prototype.createHistogram=function(e,n){var r=Me(e,K.HISTOGRAM,n),i=this.Qe.registerMetricStorage(r);return new vN(i,r)},t.prototype.createCounter=function(e,n){var r=Me(e,K.COUNTER,n),i=this.Qe.registerMetricStorage(r);return new gN(i,r)},t.prototype.createUpDownCounter=function(e,n){var r=Me(e,K.UP_DOWN_COUNTER,n),i=this.Qe.registerMetricStorage(r);return new yN(i,r)},t.prototype.createObservableGauge=function(e,n){var r=Me(e,K.OBSERVABLE_GAUGE,n),i=this.Qe.registerAsyncMetricStorage(r);return new wN(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 SN(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 IN(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})(),xy=(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})(),EN=(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)}})(),lf=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}}},RN=(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 lf(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 lf(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})(),un=(function(t){EN(e,t);function e(){return t.call(this,by)||this}return e})(RN),CN=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},Ny=(function(){function t(e,n){this.cn=e,this.pn=new un,this.Hn=new un,this.fo={"otel.metric.overflow":!0},this.Is=(n!=null?n:2e3)-1,this.Ka=by(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=CN(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 un,e},t})(),vl=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.")},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},Oy=(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=ZN(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=vl(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 un,o=this.zn.get(e);if(this.zn.set(e,[]),o===void 0)return i;try{for(var s=vl(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=cf(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=vl(e.keys()),a=s.next();!a.done;a=s.next()){var c=cf(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 ZN(t){return Array.from(t.entries())}var 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)}})(),VN=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){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 Ny(r,a.bo),a.vo=new Oy(r,o),a}return e.prototype.record=function(n,r){var i=this,o=new un;Array.from(n.entries()).forEach(function(s){var a=VN(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})(xy);function uf(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 NN(t,e){return" - use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function ON(t,e){return" - use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function GN(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 LN(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 pf(t,e){return t.valueType!==e.valueType?NN(t,e):t.unit!==e.unit?ON(t,e):t.type!==e.type?GN(t,e):t.description!==e.description?LN(t,e):""}var 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.")},XN=(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=Sl(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=Sl(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=Sl(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.
637
+ - OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+r}function hf(t,e){return t.valueType!==e.valueType?NN(t,e):t.unit!==e.unit?ON(t,e):t.type!==e.type?GN(t,e):t.description!==e.description?LN(t,e):""}var 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.")},XN=(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=Sl(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=Sl(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=Sl(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
- `,hf(l,e),`The longer description will be used.
640
- To resolve the conflict:`,pf(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.
639
+ `,uf(l,e),`The longer description will be used.
640
+ To resolve the conflict:`,hf(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
- `,hf(l,e),`To resolve the conflict:
643
- `,pf(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})(),WN=(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})(),UN=(function(){function t(e,n){this.Rs=e,this.Ba=n,this.Bn=new un}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===De.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})(),MN=(function(){function t(){this.Bn=new Map}return t.prototype.observe=function(e,n,r){if(r===void 0&&(r={}),!!Ql(e)){var i=this.Bn.get(e);if(i==null&&(i=new un,this.Bn.set(e,i)),typeof n!="number"){X.warn("non-number value provided to metric "+e.rn.name+": "+n);return}e.rn.valueType===De.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})(),wl=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())})},Il=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}}},df=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},ff=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))},PN=(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(Ql));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(Ql)),i=this.Zs(e,r);i<0||this.Ur.splice(i,1)},t.prototype.observe=function(e,n){return wl(this,void 0,void 0,function(){var r,i,o,s;return Il(this,function(a){switch(a.label){case 0:return r=this.ja(e,n),i=this.Qa(e,n),[4,Tx(ff(ff([],df(r),!1),df(i),!1))];case 1:return o=a.sent(),s=o.filter(Ex).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 wl(r,void 0,void 0,function(){var a,c;return Il(this,function(l){switch(l.label){case 0:return a=new UN(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 wl(r,void 0,void 0,function(){var a,c;return Il(this,function(l){switch(l.label){case 0:return a=new MN,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&&Rx(r.instruments,n)})},t})(),FN=(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)}})(),AN=(function(t){FN(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 Oy(r,a.bo),a.vo=new Gy(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})(Ny),Ly=(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)}})(),Cc=(function(){function t(){}return t.Noop=function(){return DN},t})(),JN=(function(t){Ly(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(n,r){return n},e})(Cc);(function(t){Ly(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})(Cc);var DN=new JN,YN=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())})},KN=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}}},_N=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},HN=(function(){function t(e,n){this.wo=e,this.ks=n,this.metricStorageRegistry=new XN,this.observableRegistry=new PN,this.meter=new TN(this)}return t.prototype.registerMetricStorage=function(e){var n=this.Vs(e,AN);return n.length===1?n[0]:new WN(n)},t.prototype.registerAsyncMetricStorage=function(e){var n=this.Vs(e,xN);return n},t.prototype.collect=function(e,n,r){return YN(this,void 0,void 0,function(){var i,o,s;return KN(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(wx),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=Vx(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=_N(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,Cc.Noop(),[u],m);return r.metricStorageRegistry.registerForCollector(u,d),d});o=o.concat(a)}return o},t})(),zN=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.")},BN=(function(){function t(e){this.resource=e,this.viewRegistry=new mN,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var n=Ix(e),r=this.meterSharedStates.get(n);return r==null&&(r=new HN(this,e),this.meterSharedStates.set(n,r)),r},t.prototype.selectAggregations=function(e){var n,r,i=[];try{for(var o=zN(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})(),io=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())})},oo=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}}},jN=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},QN=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))},$N=(function(){function t(e,n){this.dn=e,this.gr=n}return t.prototype.collect=function(e){return io(this,void 0,void 0,function(){var n,r,i,o,s=this;return oo(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 io(s,void 0,void 0,function(){var l;return oo(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,QN([],jN(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 io(this,void 0,void 0,function(){return oo(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 io(this,void 0,void 0,function(){return oo(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})(),mf=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())})},yf=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}}},gf=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 qN(t,e){var n=e!=null?e:Ar.empty();return t?Ar.default().merge(n):n}var tO=(function(){function t(e){var n,r,i,o,s;if(this.nn=!1,this.dn=new BN(qN((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=gf(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=gf(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"),HR()):this.dn.getMeterSharedState({name:e,version:n,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var n=new $N(this.dn,e);e.setMetricProducer(n),this.dn.metricCollectors.push(n)},t.prototype.shutdown=function(e){return mf(this,void 0,void 0,function(){return yf(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 mf(this,void 0,void 0,function(){return yf(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 eO(t,e){var n=fy(e);return{resource:my(t.resource),schemaUrl:void 0,scopeMetrics:nO(t.scopeMetrics,n)}}function nO(t,e){return Array.from(t.map(function(n){return{scope:yy(n.scope),metrics:n.metrics.map(function(r){return rO(r,e)}),schemaUrl:n.scope.schemaUrl}}))}function rO(t,e){var n={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},r=aO(t.aggregationTemporality);switch(t.dataPointType){case be.SUM:n.sum={aggregationTemporality:r,isMonotonic:t.isMonotonic,dataPoints:bf(t,e)};break;case be.GAUGE:n.gauge={dataPoints:bf(t,e)};break;case be.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:oO(t,e)};break;case be.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:sO(t,e)};break}return n}function iO(t,e,n){var r={attributes:gn(t.attributes),startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)};switch(e){case De.INT:r.asInt=t.value;break;case De.DOUBLE:r.asDouble=t.value;break}return r}function bf(t,e){return t.dataPoints.map(function(n){return iO(n,t.descriptor.valueType,e)})}function oO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:gn(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 sO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:gn(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 aO(t){switch(t){case ae.DELTA:return 1;case ae.CUMULATIVE:return 2}}function lO(t,e){return{resourceMetrics:t.map(function(n){return eO(n,e)})}}var cO=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.")},uO=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 hO(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:gn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return dO(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return pO(o,e)}),droppedLinksCount:t.droppedLinksCount}}function pO(t,e){var n;return{attributes:t.attributes?gn(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 dO(t,e){return{attributes:t.attributes?gn(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function fO(t,e){var n=fy(e);return{resourceSpans:yO(t,n)}}function mO(t){var e,n,r=new Map;try{for(var i=cO(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 yO(t,e){for(var n=mO(t),r=[],i=n.entries(),o=i.next();!o.done;){for(var s=uO(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 hO(d,e)});l.push({scope:yy(p[0].instrumentationLibrary),spans:f,schemaUrl:p[0].instrumentationLibrary.schemaUrl})}h=u.next()}var m={resource:my(a),scopeSpans:l,schemaUrl:void 0};r.push(m),o=i.next()}return r}var gO={serializeRequest:function(t){var e=lO([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))}},bO={serializeRequest:function(t){var e=fO(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))}},vO=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}}},wO=5,IO=1e3,TO=5e3,EO=1.5,vf=.2;function RO(){return Math.random()*(2*vf)-vf}var CO=(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 vO(this,void 0,void 0,function(){var i,o,s,a,c,l,u;return SO(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=wO,a=IO,h.label=2;case 2:return o.status==="retryable"&&s>0?(s--,c=Math.max(Math.min(a,TO)+RO(),0),a=a*EO,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 Xy(t){return new CO(t.transport)}function ZO(t){var e=[429,502,503,504];return e.includes(t)}function kO(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 VO=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=VO(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&&ZO(o.status)?i({status:"retryable",retryInMillis:kO(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 NO(t){return new xO(t)}var OO=(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 GO(t){return new OO(t)}function LO(t,e){return uy(t,e,Xy({transport:NO(t)}))}function XO(t,e){return uy(t,e,Xy({transport:GO({url:t.url,blobType:t.headers()["Content-Type"]})}))}var WO=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 UO(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=WO(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 mn=function(){return mn=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},mn.apply(this,arguments)};function MO(t,e,n){var r=mn({},n()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,r)}}function PO(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 FO(t,e,n){var r,i,o,s;return mn(mn({},tx(t,e,n)),{headers:MO(UO(t.headers),e.headers,n.headers),url:(i=(r=PO(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 AO(t,e){return mn(mn({},ex()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function JO(t,e,n){return FO({url:t.url,timeoutMillis:t.timeoutMillis,headers:qV(t.headers),concurrencyLimit:t.concurrencyLimit},{},AO(n,e))}function Wy(t,e,n,r){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=JO(t,n,r);return i?LO(o,e):XO(o,e)}var DO=(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)}})(),YO=(function(t){DO(e,t);function e(n){return n===void 0&&(n={}),t.call(this,Wy(n,bO,"v1/traces",{"Content-Type":"application/json"}))||this}return e})(cy),Lo;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(Lo||(Lo={}));var KO=(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)}})(),$l=function(){return ae.CUMULATIVE},Uy=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}},My=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 _O(){var t=Yn(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?$l:e==="delta"?Uy:e==="lowmemory"?My:(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."),$l)}function HO(t){return t!=null?t===Lo.DELTA?Uy:t===Lo.LOWMEMORY?My:$l:_O()}function zO(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return xe.Default()}}var BO=(function(t){KO(e,t);function e(n,r){var i=t.call(this,n)||this;return i.co=zO(r),i.uo=HO(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})(cy),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)}})(),QO=(function(t){jO(e,t);function e(n){return t.call(this,Wy(n!=null?n:{},gO,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return e})(BO);function $O(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:Mm(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 qO(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]=$O(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 ql=class extends YO{constructor(e,n){super(At(mt({},e),{headers:{}})),this.sampler=n}export(e,n){let r=qO(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>dc)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,fc+mc*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)}},tc=class extends QO{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>dc)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,fc+mc*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)}},tG="OT_ZONE_CONTEXT",eG="Navigation:",nG=["click","input","submit"];function rG(){return!1}var ec=class en extends zm{constructor(e={}){var n;super(en.moduleName,en.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:nG),this.tl=typeof(e==null?void 0:e.shouldPreventSpanCreation)=="function"?e.shouldPreventSpanCreation:rG}init(){}el(e,n){let r=this.jn.get(n);r&&(e.source==="setTimeout"?r.hrTimeLastTimeout=dn():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=ey(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(tG);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(`${eG} ${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",en.moduleName,en.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",en.moduleName,en.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(ec,"version","0.1.0"),yt(ec,"moduleName","user-interaction");var iG=ec,nn={},Pe,Xo="highlight.record",oG="highlight.session_id",sG="launchdarkly.js.log",aG=(t,e)=>{var n,r,i,o,s,a,c,l,u;if(nn.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:[],...FV],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 ql(m,e),b=new nc(d,{maxExportBatchSize:100,maxQueueSize:1e3,exportTimeoutMillis:m.timeoutMillis,scheduledDelayMillis:m.timeoutMillis}),v=new Ar({[l1]:(o=t.serviceName)!=null?o:"highlight-browser",[a1]:f,"highlight.project_id":t.projectId});nn.tracerProvider=new Yk({resource:v,spanProcessors:[b]}),ut.setGlobalTracerProvider(nn.tracerProvider);let I=new tc(At(mt({},m),{url:t.otlpEndpoint+"/v1/metrics"})),R=new fN({exporter:I,exportIntervalMillis:m.timeoutMillis,exportTimeoutMillis:m.timeoutMillis});nn.meterProvider=new tO({resource:v,readers:[R]}),Ce.setGlobalMeterProvider(nn.meterProvider);let E=[];((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&E.push(new g1({applyCustomAttributesOnSpan:{documentLoad:Tf,documentFetch:Tf,resourceFetch:cG}})),((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-user-interaction"])!==!1&&E.push(new iG({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled&&(((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1&&E.push(new rV({propagateTraceHeaderCorsUrls:Ef(t.tracingOrigins),applyCustomAttributesOnSpan:(V,N,U)=>Do(void 0,null,function*(){var C,x,M;if(!V.attributes)return;let ot=V;if(ot.attributes[Xo]===!1)return;let lt=ot.attributes["http.url"],y=(C=N.method)!=null?C:"GET";if(V.updateName(wf(lt,y,N.body)),!(U instanceof Response)){V.setAttributes({"http.response.error":U.message,"http.response.status":U.status});return}If(V,N.body,N.headers,t.networkRecordingOptions);let g=yield jV(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 UV({propagateTraceHeaderCorsUrls:Ef(t.tracingOrigins),applyCustomAttributesOnSpan:(V,N)=>{var U,C;let x=N;if(!V.attributes||V.attributes[Xo]===!1)return;let M=wf(x.Cl,x.Zl,N.responseText);V.updateName(M),If(V,x.pl,x.dl,t.networkRecordingOptions);let ot=ly(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)}}))),sk({instrumentations:E});let T=new $m;T.enable(),nn.tracerProvider.register({contextManager:T,propagator:new Om({propagators:[new Rm,new rc({backendUrl:h,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:p})]})})},nc=class extends Qm{onStart(e,n){e.setAttribute(oG,Fe()),super.onStart(e,n)}onEnd(e){e.attributes[Xo]!==!1&&super.onEnd(e)}},rc=class extends Gm{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"&&(lG(s,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Xo,!1),!zV(s,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,n,r)}},Py="highlight-browser",so=Py,Sf=()=>{var t;return(t=nn.tracerProvider)==null?void 0:t.getTracer(Py)},wf=(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=lc(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},If=(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=MV((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,[h1]:s,[p1]:a.pathname,[d1]:a.search}),a.searchParams.size>0&&t.setAttributes({"url.query_params":JSON.stringify(Object.fromEntries(a.searchParams))})},lG=(t,e,n,r)=>r!=null&&r.some(i=>t.toLowerCase().includes(i))?!1:HV(t,e),Tf=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:hm,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`,Fy(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 cG=(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`,Fy(i))})},Fy=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`},Ef=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,uG=30,hG=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(n=>t(n-e)))),pG=()=>Do(void 0,null,function*(){let t=[];for(let e=0;e<uG;e++)t.push(yield hG());return t.reduce((e,n)=>e+n,0)/t.length}),dG=(t,e)=>{let n={},r=16.666666666666668;pG().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?QE(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},fG=typeof window<"u",Rf=fG&&"performance"in window&&"memory"in performance?performance:{memory:{}},mG=(t,e)=>{let n=0,r=0,i=()=>{let l=(new Date().getTime()-e)/1e3,u=Rf.memory.jsHeapSizeLimit||0,h=Rf.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,Ay,Wo,ic,Jy=-1,Sn=function(t){addEventListener("pageshow",function(e){e.persisted&&(Jy=e.timeStamp,t(e))},!0)},Zc=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},jo=function(){var t=Zc();return t&&t.activationStart||0},ee=function(t,e){var n=Zc(),r="navigate";return Jy>=0?r="back-forward-cache":n&&(document.prerendering||jo()>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))}},kc=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},Qo=function(t){var e=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||t(n)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},Vc=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},Fn=-1,Cf=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Uo=function(t){document.visibilityState==="hidden"&&Fn>-1&&(Fn=t.type==="visibilitychange"?t.timeStamp:0,yG())},Zf=function(){addEventListener("visibilitychange",Uo,!0),addEventListener("prerenderingchange",Uo,!0)},yG=function(){removeEventListener("visibilitychange",Uo,!0),removeEventListener("prerenderingchange",Uo,!0)},xc=function(){return Fn<0&&(Fn=Cf(),Zf(),Sn(function(){setTimeout(function(){Fn=Cf(),Zf()},0)})),{get firstHiddenTime(){return Fn}}},zr=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},kf=[1800,3e3],Dy=function(t,e){e=e||{},zr(function(){var n,r=xc(),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-jo(),0),i.entries.push(a),n(!0)))})});o&&(n=ne(t,i,kf,e.reportAllChanges),Sn(function(s){i=ee("FCP"),n=ne(t,i,kf,e.reportAllChanges),kc(function(){i.value=performance.now()-s.timeStamp,n(!0)})}))})},Vf=[.1,.25],gG=function(t,e){e=e||{},Dy(Vc(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,Vf,e.reportAllChanges),Qo(function(){s(a.takeRecords()),n(!0)}),Sn(function(){i=0,r=ee("CLS",0),n=ne(t,r,Vf,e.reportAllChanges),kc(function(){return n()})}),setTimeout(n,0))}))},Vr={passive:!0,capture:!0},bG=new Date,xf=function(t,e){Je||(Je=e,Xr=t,Ay=new Date,Ky(removeEventListener),Yy())},Yy=function(){if(Xr>=0&&Xr<Ay-bG){var t={entryType:"first-input",name:Je.type,target:Je.target,cancelable:Je.cancelable,startTime:Je.timeStamp,processingStart:Je.timeStamp+Xr};Wo.forEach(function(e){e(t)}),Wo=[]}},vG=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(){xf(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):xf(e,t)}},Ky=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,vG,Vr)})},Nf=[100,300],SG=function(t,e){e=e||{},zr(function(){var n,r=xc(),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,Nf,e.reportAllChanges),a&&Qo(Vc(function(){s(a.takeRecords()),a.disconnect()})),a&&Sn(function(){var c;i=ee("FID"),n=ne(t,i,Nf,e.reportAllChanges),Wo=[],Xr=-1,Je=null,Ky(addEventListener),c=o,Wo.push(c),Yy()})})},_y=0,Tl=1/0,ao=0,wG=function(t){t.forEach(function(e){e.interactionId&&(Tl=Math.min(Tl,e.interactionId),ao=Math.max(ao,e.interactionId),_y=ao?(ao-Tl)/7+1:0)})},Hy=function(){return ic?_y:performance.interactionCount||0},IG=function(){"interactionCount"in performance||ic||(ic=zn("event",wG,{type:"event",buffered:!0,durationThreshold:0}))},Of=[200,500],zy=0,Gf=function(){return Hy()-zy},ge=[],El={},Lf=function(t){var e=ge[ge.length-1],n=El[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]};El[r.id]=r,ge.push(r)}ge.sort(function(i,o){return o.latency-i.latency}),ge.splice(10).forEach(function(i){delete El[i.id]})}},TG=function(t,e){e=e||{},zr(function(){var n;IG();var r,i=ee("INP"),o=function(a){a.forEach(function(u){u.interactionId&&Lf(u),u.entryType==="first-input"&&!ge.some(function(h){return h.entries.some(function(p){return u.duration===p.duration&&u.startTime===p.startTime})})&&Lf(u)});var c,l=(c=Math.min(ge.length-1,Math.floor(Gf()/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,Of,e.reportAllChanges),s&&("interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),Qo(function(){o(s.takeRecords()),i.value<0&&Gf()>0&&(i.value=0,i.entries=[]),r(!0)}),Sn(function(){ge=[],zy=Hy(),i=ee("INP"),r=ne(t,i,Of,e.reportAllChanges)}))})},Xf=[2500,4e3],Rl={},EG=function(t,e){e=e||{},zr(function(){var n,r=xc(),i=ee("LCP"),o=function(c){var l=c[c.length-1];l&&l.startTime<r.firstHiddenTime&&(i.value=Math.max(l.startTime-jo(),0),i.entries=[l],n())},s=zn("largest-contentful-paint",o);if(s){n=ne(t,i,Xf,e.reportAllChanges);var a=Vc(function(){Rl[i.id]||(o(s.takeRecords()),s.disconnect(),Rl[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(a,0)},!0)}),Qo(a),Sn(function(c){i=ee("LCP"),n=ne(t,i,Xf,e.reportAllChanges),kc(function(){i.value=performance.now()-c.timeStamp,Rl[i.id]=!0,n(!0)})})}})},Wf=[800,1800],RG=function t(e){document.prerendering?zr(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},CG=function(t,e){e=e||{};var n=ee("TTFB"),r=ne(t,n,Wf,e.reportAllChanges);RG(function(){var i=Zc();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-jo(),0),n.entries=[i],r(!0),Sn(function(){n=ee("TTFB",0),(r=ne(t,n,Wf,e.reportAllChanges))(!0)})}})},ZG=t=>(gG(t),Dy(t),SG(t),EG(t),CG(t),TG(t),()=>{}),Mn=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},kG=(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)}},VG=()=>{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=Cl(t.memory.jsHeapSizeLimit),n=Cl(t.memory.totalJSHeapSize),r=Cl(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}},Cl=t=>t/Math.pow(1e3,2),xG=t=>1024*t,NG="launchdarkly.js.log",OG="log.severity",GG="log.message",Uf="launchdarkly.sampling.ratio";function LG(t){return"regexValue"in t}function XG(t){return"matchValue"in t}function WG(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}var oc=class{constructor(e=WG){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===NG?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(XG(e))return e.matchValue===n;if(LG(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[OG];if(typeof r=="string"&&!this.matchesValue(e.severityText,r))return!1}if(e.message){let r=n[GG];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:{[Uf]: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:{[Uf]:r.samplingRatio}}}return{sample:!0}}},Mf=()=>{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},sc=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 oc),yt(this,"graphqlSDK"),typeof e.projectId=="string"?this.organizationID=e.projectId:this.organizationID=e.projectId.toString(),aG(At(mt({},e),{getIntegrations:()=>this.Gn}),this.sampler);let n=new $T(`${e.backendUrl}`,{headers:{}});this.graphqlSDK=SE(n,LE()),this.configureSampling(),this.setupListeners(e)}configureSampling(){return Do(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(sG,i=>{let o=typeof e=="string"?e:rn(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:ko.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=Yo(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(so),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(so),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(so),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(so),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=Sf();if(!o){let a=Mf();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=Sf();if(!o){let s=Mf();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 jE(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:tn.ViewportHeight,value:e,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:tn.ViewportWidth,value:n,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:tn.ScreenHeight,value:r,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:tn.ScreenWidth,value:i,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:tn.ViewportArea,value:e*n,attributes:{category:jt.Device,group:window.location.href}})}setupListeners(e){var n;e.disableConsoleRecording||cR(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=rn(i.value);if(bd.includes(h)||vd.some(f=>h.includes(f)))return;let p=new Error(h);p.stack=rn(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(rn(i.value),"error",{})},{level:(n=e.consoleMethodsToRecord)!=null?n:[],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),e.enablePerformanceRecording!==!1&&(mG(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),dG(i=>{this.recordGauge({name:"Jank",value:i.jankAmount,attributes:{category:jt.WebVital,group:i.querySelector}})},0)),hR(i=>{var o;if(bd.includes(i.event)||vd.some(c=>i.event.includes(c)))return;let s=new Error(i.event);s.stack=rn(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}),ZG(i=>{let{name:o,value:s}=i;this.recordGauge({name:o,value:s,attributes:{group:window.location.href,category:jt.WebVital}})}),$E(i=>{this.submitViewportMetrics(i)}),kG(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}=VG();r&&this.recordGauge({name:tn.DeviceMemory,value:r().deviceMemory,attributes:{category:jt.Device,group:window.location.href}})}},Mo=class extends tR{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 sc(h),ln.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({[c1]:e.sdk.name,[u1]:e.sdk.version,[WE]:e.clientSideId,[AE]:"LaunchDarkly"},(n=e.application)!=null&&n.id?{[DE]:e.application.id}:{}),(r=e.application)!=null&&r.version?{[YE]: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:pd(o.context),context:JSON.stringify(dd(o.context)),timeout:o.timeout,[zE]: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({[UE]:o.flagKey,[FE]:JSON.stringify(a.value)},a.variationIndex?{[JE]:a.variationIndex}:{});if(a.reason)for(let d in ud){let b=d,v=a.reason[b];v&&(f[ud[b]]=v)}o.context&&(f[ME]=JSON.stringify(dd(o.context)),f[PE]=pd(o.context));let m=mt(mt({},i),f);return(p=this.observe)==null||p.startSpan(XE,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:{}))}}]}};Nc();function yJ(t,e,n){var i,o;let r=Ah(Fh({},n),{plugins:[...(n==null?void 0:n.plugins)||[],new Mo((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 ed(t,e,r)}export{ln as LDObserve,In as LDRecord,YF as basicLogger,yJ as createClient};
642
+ `,uf(l,e),`To resolve the conflict:
643
+ `,hf(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})(),WN=(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})(),UN=(function(){function t(e,n){this.Rs=e,this.Ba=n,this.Bn=new un}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===De.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})(),MN=(function(){function t(){this.Bn=new Map}return t.prototype.observe=function(e,n,r){if(r===void 0&&(r={}),!!Ql(e)){var i=this.Bn.get(e);if(i==null&&(i=new un,this.Bn.set(e,i)),typeof n!="number"){X.warn("non-number value provided to metric "+e.rn.name+": "+n);return}e.rn.valueType===De.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})(),wl=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())})},Il=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}}},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(;!(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},df=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))},PN=(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(Ql));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(Ql)),i=this.Zs(e,r);i<0||this.Ur.splice(i,1)},t.prototype.observe=function(e,n){return wl(this,void 0,void 0,function(){var r,i,o,s;return Il(this,function(a){switch(a.label){case 0:return r=this.ja(e,n),i=this.Qa(e,n),[4,Tx(df(df([],pf(r),!1),pf(i),!1))];case 1:return o=a.sent(),s=o.filter(Ex).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 wl(r,void 0,void 0,function(){var a,c;return Il(this,function(l){switch(l.label){case 0:return a=new UN(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 wl(r,void 0,void 0,function(){var a,c;return Il(this,function(l){switch(l.label){case 0:return a=new MN,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&&Rx(r.instruments,n)})},t})(),FN=(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)}})(),AN=(function(t){FN(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 Ny(r,a.bo),a.vo=new Oy(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})(xy),Gy=(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)}})(),Cc=(function(){function t(){}return t.Noop=function(){return DN},t})(),JN=(function(t){Gy(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(n,r){return n},e})(Cc);(function(t){Gy(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})(Cc);var DN=new JN,YN=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())})},KN=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}}},_N=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},HN=(function(){function t(e,n){this.wo=e,this.ks=n,this.metricStorageRegistry=new XN,this.observableRegistry=new PN,this.meter=new TN(this)}return t.prototype.registerMetricStorage=function(e){var n=this.Vs(e,AN);return n.length===1?n[0]:new WN(n)},t.prototype.registerAsyncMetricStorage=function(e){var n=this.Vs(e,xN);return n},t.prototype.collect=function(e,n,r){return YN(this,void 0,void 0,function(){var i,o,s;return KN(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(wx),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=Vx(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=_N(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,Cc.Noop(),[u],m);return r.metricStorageRegistry.registerForCollector(u,d),d});o=o.concat(a)}return o},t})(),zN=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.")},BN=(function(){function t(e){this.resource=e,this.viewRegistry=new mN,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var n=Ix(e),r=this.meterSharedStates.get(n);return r==null&&(r=new HN(this,e),this.meterSharedStates.set(n,r)),r},t.prototype.selectAggregations=function(e){var n,r,i=[];try{for(var o=zN(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})(),io=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())})},oo=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}}},jN=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},QN=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))},$N=(function(){function t(e,n){this.dn=e,this.gr=n}return t.prototype.collect=function(e){return io(this,void 0,void 0,function(){var n,r,i,o,s=this;return oo(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 io(s,void 0,void 0,function(){var l;return oo(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,QN([],jN(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 io(this,void 0,void 0,function(){return oo(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 io(this,void 0,void 0,function(){return oo(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})(),ff=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())})},mf=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}}},yf=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 qN(t,e){var n=e!=null?e:Ar.empty();return t?Ar.default().merge(n):n}var tO=(function(){function t(e){var n,r,i,o,s;if(this.nn=!1,this.dn=new BN(qN((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=yf(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=yf(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"),HR()):this.dn.getMeterSharedState({name:e,version:n,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var n=new $N(this.dn,e);e.setMetricProducer(n),this.dn.metricCollectors.push(n)},t.prototype.shutdown=function(e){return ff(this,void 0,void 0,function(){return mf(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 ff(this,void 0,void 0,function(){return mf(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 eO(t,e){var n=dy(e);return{resource:fy(t.resource),schemaUrl:void 0,scopeMetrics:nO(t.scopeMetrics,n)}}function nO(t,e){return Array.from(t.map(function(n){return{scope:my(n.scope),metrics:n.metrics.map(function(r){return rO(r,e)}),schemaUrl:n.scope.schemaUrl}}))}function rO(t,e){var n={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},r=aO(t.aggregationTemporality);switch(t.dataPointType){case be.SUM:n.sum={aggregationTemporality:r,isMonotonic:t.isMonotonic,dataPoints:gf(t,e)};break;case be.GAUGE:n.gauge={dataPoints:gf(t,e)};break;case be.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:oO(t,e)};break;case be.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:sO(t,e)};break}return n}function iO(t,e,n){var r={attributes:gn(t.attributes),startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)};switch(e){case De.INT:r.asInt=t.value;break;case De.DOUBLE:r.asDouble=t.value;break}return r}function gf(t,e){return t.dataPoints.map(function(n){return iO(n,t.descriptor.valueType,e)})}function oO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:gn(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 sO(t,e){return t.dataPoints.map(function(n){var r=n.value;return{attributes:gn(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 aO(t){switch(t){case ae.DELTA:return 1;case ae.CUMULATIVE:return 2}}function lO(t,e){return{resourceMetrics:t.map(function(n){return eO(n,e)})}}var cO=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.")},uO=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 hO(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:gn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return dO(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return pO(o,e)}),droppedLinksCount:t.droppedLinksCount}}function pO(t,e){var n;return{attributes:t.attributes?gn(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 dO(t,e){return{attributes:t.attributes?gn(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function fO(t,e){var n=dy(e);return{resourceSpans:yO(t,n)}}function mO(t){var e,n,r=new Map;try{for(var i=cO(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 yO(t,e){for(var n=mO(t),r=[],i=n.entries(),o=i.next();!o.done;){for(var s=uO(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 hO(d,e)});l.push({scope:my(p[0].instrumentationLibrary),spans:f,schemaUrl:p[0].instrumentationLibrary.schemaUrl})}h=u.next()}var m={resource:fy(a),scopeSpans:l,schemaUrl:void 0};r.push(m),o=i.next()}return r}var gO={serializeRequest:function(t){var e=lO([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))}},bO={serializeRequest:function(t){var e=fO(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))}},vO=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}}},wO=5,IO=1e3,TO=5e3,EO=1.5,bf=.2;function RO(){return Math.random()*(2*bf)-bf}var CO=(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 vO(this,void 0,void 0,function(){var i,o,s,a,c,l,u;return SO(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=wO,a=IO,h.label=2;case 2:return o.status==="retryable"&&s>0?(s--,c=Math.max(Math.min(a,TO)+RO(),0),a=a*EO,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 Ly(t){return new CO(t.transport)}function ZO(t){var e=[429,502,503,504];return e.includes(t)}function kO(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 VO=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=VO(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&&ZO(o.status)?i({status:"retryable",retryInMillis:kO(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 NO(t){return new xO(t)}var OO=(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 GO(t){return new OO(t)}function LO(t,e){return cy(t,e,Ly({transport:NO(t)}))}function XO(t,e){return cy(t,e,Ly({transport:GO({url:t.url,blobType:t.headers()["Content-Type"]})}))}var WO=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 UO(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=WO(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 mn=function(){return mn=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},mn.apply(this,arguments)};function MO(t,e,n){var r=mn({},n()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,r)}}function PO(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 FO(t,e,n){var r,i,o,s;return mn(mn({},tx(t,e,n)),{headers:MO(UO(t.headers),e.headers,n.headers),url:(i=(r=PO(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 AO(t,e){return mn(mn({},ex()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function JO(t,e,n){return FO({url:t.url,timeoutMillis:t.timeoutMillis,headers:qV(t.headers),concurrencyLimit:t.concurrencyLimit},{},AO(n,e))}function Xy(t,e,n,r){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=JO(t,n,r);return i?LO(o,e):XO(o,e)}var DO=(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)}})(),YO=(function(t){DO(e,t);function e(n){return n===void 0&&(n={}),t.call(this,Xy(n,bO,"v1/traces",{"Content-Type":"application/json"}))||this}return e})(ly),Lo;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(Lo||(Lo={}));var KO=(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)}})(),$l=function(){return ae.CUMULATIVE},Wy=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}},Uy=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 _O(){var t=Yn(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?$l:e==="delta"?Wy:e==="lowmemory"?Uy:(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."),$l)}function HO(t){return t!=null?t===Lo.DELTA?Wy:t===Lo.LOWMEMORY?Uy:$l:_O()}function zO(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return xe.Default()}}var BO=(function(t){KO(e,t);function e(n,r){var i=t.call(this,n)||this;return i.co=zO(r),i.uo=HO(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})(ly),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)}})(),QO=(function(t){jO(e,t);function e(n){return t.call(this,Xy(n!=null?n:{},gO,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return e})(BO);function $O(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:Um(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 qO(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]=$O(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 ql=class extends YO{constructor(e,n){super(At(mt({},e),{headers:{}})),this.sampler=n}export(e,n){let r=qO(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>dc)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,fc+mc*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)}},tc=class extends QO{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>dc)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,fc+mc*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)}},tG="OT_ZONE_CONTEXT",eG="Navigation:",nG=["click","input","submit"];function rG(){return!1}var ec=class en extends Hm{constructor(e={}){var n;super(en.moduleName,en.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:nG),this.tl=typeof(e==null?void 0:e.shouldPreventSpanCreation)=="function"?e.shouldPreventSpanCreation:rG}init(){}el(e,n){let r=this.jn.get(n);r&&(e.source==="setTimeout"?r.hrTimeLastTimeout=dn():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=ty(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(tG);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(`${eG} ${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",en.moduleName,en.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",en.moduleName,en.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(ec,"version","0.1.0"),yt(ec,"moduleName","user-interaction");var iG=ec,nn={},Pe,Xo="highlight.record",oG="highlight.session_id",sG="launchdarkly.js.log",aG=(t,e)=>{var n,r,i,o,s,a,c,l,u;if(nn.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:[],...FV],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 ql(m,e),b=new nc(d,{maxExportBatchSize:100,maxQueueSize:1e3,exportTimeoutMillis:m.timeoutMillis,scheduledDelayMillis:m.timeoutMillis}),v=new Ar({[l1]:(o=t.serviceName)!=null?o:"highlight-browser",[a1]:f,"highlight.project_id":t.projectId});nn.tracerProvider=new Yk({resource:v,spanProcessors:[b]}),ut.setGlobalTracerProvider(nn.tracerProvider);let I=new tc(At(mt({},m),{url:t.otlpEndpoint+"/v1/metrics"})),R=new fN({exporter:I,exportIntervalMillis:m.timeoutMillis,exportTimeoutMillis:m.timeoutMillis});nn.meterProvider=new tO({resource:v,readers:[R]}),Ce.setGlobalMeterProvider(nn.meterProvider);let E=[];((s=t.instrumentations)==null?void 0:s["@opentelemetry/instrumentation-document-load"])!==!1&&E.push(new g1({applyCustomAttributesOnSpan:{documentLoad:If,documentFetch:If,resourceFetch:cG}})),((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-user-interaction"])!==!1&&E.push(new iG({eventNames:t.eventNames})),(c=t.networkRecordingOptions)!=null&&c.enabled&&(((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1&&E.push(new rV({propagateTraceHeaderCorsUrls:Tf(t.tracingOrigins),applyCustomAttributesOnSpan:(V,N,U)=>Do(void 0,null,function*(){var C,x,M;if(!V.attributes)return;let ot=V;if(ot.attributes[Xo]===!1)return;let lt=ot.attributes["http.url"],y=(C=N.method)!=null?C:"GET";if(V.updateName(Sf(lt,y,N.body)),!(U instanceof Response)){V.setAttributes({"http.response.error":U.message,"http.response.status":U.status});return}wf(V,N.body,N.headers,t.networkRecordingOptions);let g=yield jV(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 UV({propagateTraceHeaderCorsUrls:Tf(t.tracingOrigins),applyCustomAttributesOnSpan:(V,N)=>{var U,C;let x=N;if(!V.attributes||V.attributes[Xo]===!1)return;let M=Sf(x.Cl,x.Zl,N.responseText);V.updateName(M),wf(V,x.pl,x.dl,t.networkRecordingOptions);let ot=ay(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)}}))),sk({instrumentations:E});let T=new Qm;T.enable(),nn.tracerProvider.register({contextManager:T,propagator:new Nm({propagators:[new Em,new rc({backendUrl:h,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:p})]})})},nc=class extends jm{onStart(e,n){e.setAttribute(oG,Fe()),super.onStart(e,n)}onEnd(e){e.attributes[Xo]!==!1&&super.onEnd(e)}},rc=class extends Om{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"&&(lG(s,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Xo,!1),!zV(s,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,n,r)}},My="highlight-browser",so=My,vf=()=>{var t;return(t=nn.tracerProvider)==null?void 0:t.getTracer(My)},Sf=(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=lc(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},wf=(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=MV((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,[h1]:s,[p1]:a.pathname,[d1]:a.search}),a.searchParams.size>0&&t.setAttributes({"url.query_params":JSON.stringify(Object.fromEntries(a.searchParams))})},lG=(t,e,n,r)=>r!=null&&r.some(i=>t.toLowerCase().includes(i))?!1:HV(t,e),If=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:um,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`,Py(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 cG=(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`,Py(i))})},Py=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`},Tf=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,uG=30,hG=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(n=>t(n-e)))),pG=()=>Do(void 0,null,function*(){let t=[];for(let e=0;e<uG;e++)t.push(yield hG());return t.reduce((e,n)=>e+n,0)/t.length}),dG=(t,e)=>{let n={},r=16.666666666666668;pG().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?QE(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},fG=typeof window<"u",Ef=fG&&"performance"in window&&"memory"in performance?performance:{memory:{}},mG=(t,e)=>{let n=0,r=0,i=()=>{let l=(new Date().getTime()-e)/1e3,u=Ef.memory.jsHeapSizeLimit||0,h=Ef.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,Fy,Wo,ic,Ay=-1,Sn=function(t){addEventListener("pageshow",function(e){e.persisted&&(Ay=e.timeStamp,t(e))},!0)},Zc=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},jo=function(){var t=Zc();return t&&t.activationStart||0},ee=function(t,e){var n=Zc(),r="navigate";return Ay>=0?r="back-forward-cache":n&&(document.prerendering||jo()>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))}},kc=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},Qo=function(t){var e=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||t(n)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},Vc=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},Fn=-1,Rf=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Uo=function(t){document.visibilityState==="hidden"&&Fn>-1&&(Fn=t.type==="visibilitychange"?t.timeStamp:0,yG())},Cf=function(){addEventListener("visibilitychange",Uo,!0),addEventListener("prerenderingchange",Uo,!0)},yG=function(){removeEventListener("visibilitychange",Uo,!0),removeEventListener("prerenderingchange",Uo,!0)},xc=function(){return Fn<0&&(Fn=Rf(),Cf(),Sn(function(){setTimeout(function(){Fn=Rf(),Cf()},0)})),{get firstHiddenTime(){return Fn}}},zr=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},Zf=[1800,3e3],Jy=function(t,e){e=e||{},zr(function(){var n,r=xc(),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-jo(),0),i.entries.push(a),n(!0)))})});o&&(n=ne(t,i,Zf,e.reportAllChanges),Sn(function(s){i=ee("FCP"),n=ne(t,i,Zf,e.reportAllChanges),kc(function(){i.value=performance.now()-s.timeStamp,n(!0)})}))})},kf=[.1,.25],gG=function(t,e){e=e||{},Jy(Vc(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,kf,e.reportAllChanges),Qo(function(){s(a.takeRecords()),n(!0)}),Sn(function(){i=0,r=ee("CLS",0),n=ne(t,r,kf,e.reportAllChanges),kc(function(){return n()})}),setTimeout(n,0))}))},Vr={passive:!0,capture:!0},bG=new Date,Vf=function(t,e){Je||(Je=e,Xr=t,Fy=new Date,Yy(removeEventListener),Dy())},Dy=function(){if(Xr>=0&&Xr<Fy-bG){var t={entryType:"first-input",name:Je.type,target:Je.target,cancelable:Je.cancelable,startTime:Je.timeStamp,processingStart:Je.timeStamp+Xr};Wo.forEach(function(e){e(t)}),Wo=[]}},vG=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(){Vf(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):Vf(e,t)}},Yy=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,vG,Vr)})},xf=[100,300],SG=function(t,e){e=e||{},zr(function(){var n,r=xc(),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,xf,e.reportAllChanges),a&&Qo(Vc(function(){s(a.takeRecords()),a.disconnect()})),a&&Sn(function(){var c;i=ee("FID"),n=ne(t,i,xf,e.reportAllChanges),Wo=[],Xr=-1,Je=null,Yy(addEventListener),c=o,Wo.push(c),Dy()})})},Ky=0,Tl=1/0,ao=0,wG=function(t){t.forEach(function(e){e.interactionId&&(Tl=Math.min(Tl,e.interactionId),ao=Math.max(ao,e.interactionId),Ky=ao?(ao-Tl)/7+1:0)})},_y=function(){return ic?Ky:performance.interactionCount||0},IG=function(){"interactionCount"in performance||ic||(ic=zn("event",wG,{type:"event",buffered:!0,durationThreshold:0}))},Nf=[200,500],Hy=0,Of=function(){return _y()-Hy},ge=[],El={},Gf=function(t){var e=ge[ge.length-1],n=El[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]};El[r.id]=r,ge.push(r)}ge.sort(function(i,o){return o.latency-i.latency}),ge.splice(10).forEach(function(i){delete El[i.id]})}},TG=function(t,e){e=e||{},zr(function(){var n;IG();var r,i=ee("INP"),o=function(a){a.forEach(function(u){u.interactionId&&Gf(u),u.entryType==="first-input"&&!ge.some(function(h){return h.entries.some(function(p){return u.duration===p.duration&&u.startTime===p.startTime})})&&Gf(u)});var c,l=(c=Math.min(ge.length-1,Math.floor(Of()/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,Nf,e.reportAllChanges),s&&("interactionId"in PerformanceEventTiming.prototype&&s.observe({type:"first-input",buffered:!0}),Qo(function(){o(s.takeRecords()),i.value<0&&Of()>0&&(i.value=0,i.entries=[]),r(!0)}),Sn(function(){ge=[],Hy=_y(),i=ee("INP"),r=ne(t,i,Nf,e.reportAllChanges)}))})},Lf=[2500,4e3],Rl={},EG=function(t,e){e=e||{},zr(function(){var n,r=xc(),i=ee("LCP"),o=function(c){var l=c[c.length-1];l&&l.startTime<r.firstHiddenTime&&(i.value=Math.max(l.startTime-jo(),0),i.entries=[l],n())},s=zn("largest-contentful-paint",o);if(s){n=ne(t,i,Lf,e.reportAllChanges);var a=Vc(function(){Rl[i.id]||(o(s.takeRecords()),s.disconnect(),Rl[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(a,0)},!0)}),Qo(a),Sn(function(c){i=ee("LCP"),n=ne(t,i,Lf,e.reportAllChanges),kc(function(){i.value=performance.now()-c.timeStamp,Rl[i.id]=!0,n(!0)})})}})},Xf=[800,1800],RG=function t(e){document.prerendering?zr(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},CG=function(t,e){e=e||{};var n=ee("TTFB"),r=ne(t,n,Xf,e.reportAllChanges);RG(function(){var i=Zc();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-jo(),0),n.entries=[i],r(!0),Sn(function(){n=ee("TTFB",0),(r=ne(t,n,Xf,e.reportAllChanges))(!0)})}})},ZG=t=>(gG(t),Jy(t),SG(t),EG(t),CG(t),TG(t),()=>{}),Mn=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},kG=(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)}},VG=()=>{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=Cl(t.memory.jsHeapSizeLimit),n=Cl(t.memory.totalJSHeapSize),r=Cl(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}},Cl=t=>t/Math.pow(1e3,2),xG=t=>1024*t,NG="launchdarkly.js.log",OG="log.severity",GG="log.message",Wf="launchdarkly.sampling.ratio";function LG(t){return"regexValue"in t}function XG(t){return"matchValue"in t}function WG(t){let e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}var oc=class{constructor(e=WG){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===NG?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(XG(e))return e.matchValue===n;if(LG(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[OG];if(typeof r=="string"&&!this.matchesValue(e.severityText,r))return!1}if(e.message){let r=n[GG];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:{[Wf]: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:{[Wf]:r.samplingRatio}}}return{sample:!0}}},Uf=()=>{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},sc=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 oc),yt(this,"graphqlSDK"),typeof e.projectId=="string"?this.organizationID=e.projectId:this.organizationID=e.projectId.toString(),aG(At(mt({},e),{getIntegrations:()=>this.Gn}),this.sampler);let n=new $T(`${e.backendUrl}`,{headers:{}});this.graphqlSDK=SE(n,LE()),this.configureSampling(),this.setupListeners(e)}configureSampling(){return Do(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(sG,i=>{let o=typeof e=="string"?e:rn(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:ko.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=Yo(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(so),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(so),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(so),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(so),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=vf();if(!o){let a=Uf();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=vf();if(!o){let s=Uf();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 jE(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:tn.ViewportHeight,value:e,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:tn.ViewportWidth,value:n,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:tn.ScreenHeight,value:r,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:tn.ScreenWidth,value:i,attributes:{category:jt.Device,group:window.location.href}}),this.recordGauge({name:tn.ViewportArea,value:e*n,attributes:{category:jt.Device,group:window.location.href}})}setupListeners(e){var n;e.disableConsoleRecording||cR(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=rn(i.value);if(gd.includes(h)||bd.some(f=>h.includes(f)))return;let p=new Error(h);p.stack=rn(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(rn(i.value),"error",{})},{level:(n=e.consoleMethodsToRecord)!=null?n:[],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),e.enablePerformanceRecording!==!1&&(mG(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),dG(i=>{this.recordGauge({name:"Jank",value:i.jankAmount,attributes:{category:jt.WebVital,group:i.querySelector}})},0)),hR(i=>{var o;if(gd.includes(i.event)||bd.some(c=>i.event.includes(c)))return;let s=new Error(i.event);s.stack=rn(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}),ZG(i=>{let{name:o,value:s}=i;this.recordGauge({name:o,value:s,attributes:{group:window.location.href,category:jt.WebVital}})}),$E(i=>{this.submitViewportMetrics(i)}),kG(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}=VG();r&&this.recordGauge({name:tn.DeviceMemory,value:r().deviceMemory,attributes:{category:jt.Device,group:window.location.href}})}},Mo=class extends tR{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 sc(h),ln.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({[c1]:e.sdk.name,[u1]:e.sdk.version,[WE]:e.clientSideId,[AE]:"LaunchDarkly"},(n=e.application)!=null&&n.id?{[DE]:e.application.id}:{}),(r=e.application)!=null&&r.version?{[YE]: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:hd(o.context),context:JSON.stringify(pd(o.context)),timeout:o.timeout,[zE]: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({[UE]:o.flagKey,[FE]:JSON.stringify(a.value)},a.variationIndex?{[JE]:a.variationIndex}:{});if(a.reason)for(let d in cd){let b=d,v=a.reason[b];v&&(f[cd[b]]=v)}o.context&&(f[ME]=JSON.stringify(pd(o.context)),f[PE]=hd(o.context));let m=mt(mt({},i),f);return(p=this.observe)==null||p.startSpan(XE,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:{}))}}]}};Nc();function yJ(t,e,n){var i,o;let r=Ah(Fh({},n),{plugins:[...(n==null?void 0:n.plugins)||[],new Mo((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 td(t,e,r)}export{ln as LDObserve,In as LDRecord,YF as basicLogger,yJ as createClient};
644
644
  /*! Bundled license information:
645
645
 
646
646
  @launchdarkly/session-replay/dist/index-B27CYB0H.js: