@bdelab/roar-levante-tasks 0.3.0 → 1.0.3

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.
@@ -0,0 +1,17 @@
1
+ ;{try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="34706c64-743b-4222-b7f9-b19a2448f45a",e._sentryDebugIdIdentifier="sentry-dbid-34706c64-743b-4222-b7f9-b19a2448f45a")}catch(e){}};import e from"stream";import t from"path";("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"bf57c3bb62c191444e19ff4f96d5843f001a616f"};var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s=function(){this.__data__=[],this.size=0};var o=function(e,t){return e===t||e!=e&&t!=t},a=o;var r=function(e,t){for(var n=e.length;n--;)if(a(e[n][0],t))return n;return-1},c=r,l=Array.prototype.splice;var u=function(e){var t=this.__data__,n=c(t,e);return!(n<0)&&(n==t.length-1?t.pop():l.call(t,n,1),--this.size,!0)},p=r;var d=function(e){var t=this.__data__,n=p(t,e);return n<0?void 0:t[n][1]},m=r;var h=function(e){return m(this.__data__,e)>-1},f=r;var g=function(e,t){var n=this.__data__,i=f(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},v=s,y=u,b=d,x=h,_=g;function w(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}w.prototype.clear=v,w.prototype.delete=y,w.prototype.get=b,w.prototype.has=x,w.prototype.set=_;var k=w,S=k;var T=function(){this.__data__=new S,this.size=0};var E=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var C=function(e){return this.__data__.get(e)};var I=function(e){return this.__data__.has(e)},O="object"==typeof n&&n&&n.Object===Object&&n,j=O,A="object"==typeof self&&self&&self.Object===Object&&self,L=j||A||Function("return this")(),P=L.Symbol,R=P,M=Object.prototype,N=M.hasOwnProperty,D=M.toString,F=R?R.toStringTag:void 0;var B=function(e){var t=N.call(e,F),n=e[F];try{e[F]=void 0;var i=!0}catch(e){}var s=D.call(e);return i&&(t?e[F]=n:delete e[F]),s},$=Object.prototype.toString;var z=B,q=function(e){return $.call(e)},U=P?P.toStringTag:void 0;var H=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":U&&U in Object(e)?z(e):q(e)};var V=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},K=H,W=V;var G,Y=function(e){if(!W(e))return!1;var t=K(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},J=L["__core-js_shared__"],Z=(G=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"";var X=function(e){return!!Z&&Z in e},Q=Function.prototype.toString;var ee=function(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""},te=Y,ne=X,ie=V,se=ee,oe=/^\[object .+?Constructor\]$/,ae=Function.prototype,re=Object.prototype,ce=ae.toString,le=re.hasOwnProperty,ue=RegExp("^"+ce.call(le).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var pe=function(e,t){return null==e?void 0:e[t]},de=function(e){return!(!ie(e)||ne(e))&&(te(e)?ue:oe).test(se(e))},me=pe;var he=function(e,t){var n=me(e,t);return de(n)?n:void 0},fe=he(L,"Map"),ge=he(Object,"create"),ve=ge;var ye=function(){this.__data__=ve?ve(null):{},this.size=0};var be=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},xe=ge,_e=Object.prototype.hasOwnProperty;var we=function(e){var t=this.__data__;if(xe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return _e.call(t,e)?t[e]:void 0},ke=ge,Se=Object.prototype.hasOwnProperty;var Te=function(e){var t=this.__data__;return ke?void 0!==t[e]:Se.call(t,e)},Ee=ge;var Ce=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ee&&void 0===t?"__lodash_hash_undefined__":t,this},Ie=ye,Oe=be,je=we,Ae=Te,Le=Ce;function Pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Pe.prototype.clear=Ie,Pe.prototype.delete=Oe,Pe.prototype.get=je,Pe.prototype.has=Ae,Pe.prototype.set=Le;var Re=Pe,Me=k,Ne=fe;var De=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Fe=function(e,t){var n=e.__data__;return De(t)?n["string"==typeof t?"string":"hash"]:n.map},Be=Fe;var $e=function(e){var t=Be(this,e).delete(e);return this.size-=t?1:0,t},ze=Fe;var qe=function(e){return ze(this,e).get(e)},Ue=Fe;var He=function(e){return Ue(this,e).has(e)},Ve=Fe;var Ke=function(e,t){var n=Ve(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},We=function(){this.size=0,this.__data__={hash:new Re,map:new(Ne||Me),string:new Re}},Ge=$e,Ye=qe,Je=He,Ze=Ke;function Xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Xe.prototype.clear=We,Xe.prototype.delete=Ge,Xe.prototype.get=Ye,Xe.prototype.has=Je,Xe.prototype.set=Ze;var Qe=Xe,et=k,tt=fe,nt=Qe;var it=function(e,t){var n=this.__data__;if(n instanceof et){var i=n.__data__;if(!tt||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new nt(i)}return n.set(e,t),this.size=n.size,this},st=k,ot=T,at=E,rt=C,ct=I,lt=it;function ut(e){var t=this.__data__=new st(e);this.size=t.size}ut.prototype.clear=ot,ut.prototype.delete=at,ut.prototype.get=rt,ut.prototype.has=ct,ut.prototype.set=lt;var pt=ut;var dt=Qe,mt=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ht=function(e){return this.__data__.has(e)};function ft(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new dt;++t<n;)this.add(e[t])}ft.prototype.add=ft.prototype.push=mt,ft.prototype.has=ht;var gt=ft;var vt=function(e,t){return e.has(t)},yt=gt,bt=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1},xt=vt;var _t=function(e,t,n,i,s,o){var a=1&n,r=e.length,c=t.length;if(r!=c&&!(a&&c>r))return!1;var l=o.get(e),u=o.get(t);if(l&&u)return l==t&&u==e;var p=-1,d=!0,m=2&n?new yt:void 0;for(o.set(e,t),o.set(t,e);++p<r;){var h=e[p],f=t[p];if(i)var g=a?i(f,h,p,t,e,o):i(h,f,p,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(m){if(!bt(t,function(e,t){if(!xt(m,t)&&(h===e||s(h,e,n,i,o)))return m.push(t)})){d=!1;break}}else if(h!==f&&!s(h,f,n,i,o)){d=!1;break}}return o.delete(e),o.delete(t),d},wt=L.Uint8Array;var kt=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n};var St=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},Tt=wt,Et=o,Ct=_t,It=kt,Ot=St,jt=P?P.prototype:void 0,At=jt?jt.valueOf:void 0;var Lt=function(e,t,n,i,s,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Tt(e),new Tt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Et(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var r=It;case"[object Set]":var c=1&i;if(r||(r=Ot),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;i|=2,a.set(e,t);var u=Ct(r(e),r(t),i,s,o,a);return a.delete(e),u;case"[object Symbol]":if(At)return At.call(e)==At.call(t)}return!1};var Pt=function(e,t){for(var n=-1,i=t.length,s=e.length;++n<i;)e[s+n]=t[n];return e},Rt=Array.isArray,Mt=Pt,Nt=Rt;var Dt=function(e,t,n){var i=t(e);return Nt(e)?i:Mt(i,n(e))};var Ft=function(e,t){for(var n=-1,i=null==e?0:e.length,s=0,o=[];++n<i;){var a=e[n];t(a,n,e)&&(o[s++]=a)}return o};var Bt=function(){return[]},$t=Ft,zt=Bt,qt=Object.prototype.propertyIsEnumerable,Ut=Object.getOwnPropertySymbols,Ht=Ut?function(e){return null==e?[]:(e=Object(e),$t(Ut(e),function(t){return qt.call(e,t)}))}:zt;var Vt=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i};var Kt=function(e){return null!=e&&"object"==typeof e},Wt=H,Gt=Kt;var Yt=function(e){return Gt(e)&&"[object Arguments]"==Wt(e)},Jt=Kt,Zt=Object.prototype,Xt=Zt.hasOwnProperty,Qt=Zt.propertyIsEnumerable,en=Yt(function(){return arguments}())?Yt:function(e){return Jt(e)&&Xt.call(e,"callee")&&!Qt.call(e,"callee")},tn={exports:{}};var nn=function(){return!1};!function(e,t){var n=L,i=nn,s=t&&!t.nodeType&&t,o=s&&e&&!e.nodeType&&e,a=o&&o.exports===s?n.Buffer:void 0,r=(a?a.isBuffer:void 0)||i;e.exports=r}(tn,tn.exports);var sn=tn.exports,on=/^(?:0|[1-9]\d*)$/;var an=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&on.test(e))&&e>-1&&e%1==0&&e<t};var rn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},cn=H,ln=rn,un=Kt,pn={};pn["[object Float32Array]"]=pn["[object Float64Array]"]=pn["[object Int8Array]"]=pn["[object Int16Array]"]=pn["[object Int32Array]"]=pn["[object Uint8Array]"]=pn["[object Uint8ClampedArray]"]=pn["[object Uint16Array]"]=pn["[object Uint32Array]"]=!0,pn["[object Arguments]"]=pn["[object Array]"]=pn["[object ArrayBuffer]"]=pn["[object Boolean]"]=pn["[object DataView]"]=pn["[object Date]"]=pn["[object Error]"]=pn["[object Function]"]=pn["[object Map]"]=pn["[object Number]"]=pn["[object Object]"]=pn["[object RegExp]"]=pn["[object Set]"]=pn["[object String]"]=pn["[object WeakMap]"]=!1;var dn=function(e){return un(e)&&ln(e.length)&&!!pn[cn(e)]};var mn=function(e){return function(t){return e(t)}},hn={exports:{}};!function(e,t){var n=O,i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,o=s&&s.exports===i&&n.process,a=function(){try{var e=s&&s.require&&s.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a}(hn,hn.exports);var fn=hn.exports,gn=dn,vn=mn,yn=fn&&fn.isTypedArray,bn=yn?vn(yn):gn,xn=Vt,_n=en,wn=Rt,kn=sn,Sn=an,Tn=bn,En=Object.prototype.hasOwnProperty;var Cn=function(e,t){var n=wn(e),i=!n&&_n(e),s=!n&&!i&&kn(e),o=!n&&!i&&!s&&Tn(e),a=n||i||s||o,r=a?xn(e.length,String):[],c=r.length;for(var l in e)!t&&!En.call(e,l)||a&&("length"==l||s&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Sn(l,c))||r.push(l);return r},In=Object.prototype;var On=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||In)};var jn=function(e,t){return function(n){return e(t(n))}},An=jn(Object.keys,Object),Ln=On,Pn=An,Rn=Object.prototype.hasOwnProperty;var Mn=function(e){if(!Ln(e))return Pn(e);var t=[];for(var n in Object(e))Rn.call(e,n)&&"constructor"!=n&&t.push(n);return t},Nn=Y,Dn=rn;var Fn=function(e){return null!=e&&Dn(e.length)&&!Nn(e)},Bn=Cn,$n=Mn,zn=Fn;var qn=function(e){return zn(e)?Bn(e):$n(e)},Un=Dt,Hn=Ht,Vn=qn;var Kn=function(e){return Un(e,Vn,Hn)},Wn=Kn,Gn=Object.prototype.hasOwnProperty;var Yn=function(e,t,n,i,s,o){var a=1&n,r=Wn(e),c=r.length;if(c!=Wn(t).length&&!a)return!1;for(var l=c;l--;){var u=r[l];if(!(a?u in t:Gn.call(t,u)))return!1}var p=o.get(e),d=o.get(t);if(p&&d)return p==t&&d==e;var m=!0;o.set(e,t),o.set(t,e);for(var h=a;++l<c;){var f=e[u=r[l]],g=t[u];if(i)var v=a?i(g,f,u,t,e,o):i(f,g,u,e,t,o);if(!(void 0===v?f===g||s(f,g,n,i,o):v)){m=!1;break}h||(h="constructor"==u)}if(m&&!h){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return o.delete(e),o.delete(t),m},Jn=he(L,"DataView"),Zn=he(L,"Promise"),Xn=he(L,"Set"),Qn=Jn,ei=fe,ti=Zn,ni=Xn,ii=he(L,"WeakMap"),si=H,oi=ee,ai="[object Map]",ri="[object Promise]",ci="[object Set]",li="[object WeakMap]",ui="[object DataView]",pi=oi(Qn),di=oi(ei),mi=oi(ti),hi=oi(ni),fi=oi(ii),gi=si;(Qn&&gi(new Qn(new ArrayBuffer(1)))!=ui||ei&&gi(new ei)!=ai||ti&&gi(ti.resolve())!=ri||ni&&gi(new ni)!=ci||ii&&gi(new ii)!=li)&&(gi=function(e){var t=si(e),n="[object Object]"==t?e.constructor:void 0,i=n?oi(n):"";if(i)switch(i){case pi:return ui;case di:return ai;case mi:return ri;case hi:return ci;case fi:return li}return t});var vi=gi,yi=pt,bi=_t,xi=Lt,_i=Yn,wi=vi,ki=Rt,Si=sn,Ti=bn,Ei="[object Arguments]",Ci="[object Array]",Ii="[object Object]",Oi=Object.prototype.hasOwnProperty;var ji=function(e,t,n,i,s,o){var a=ki(e),r=ki(t),c=a?Ci:wi(e),l=r?Ci:wi(t),u=(c=c==Ei?Ii:c)==Ii,p=(l=l==Ei?Ii:l)==Ii,d=c==l;if(d&&Si(e)){if(!Si(t))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new yi),a||Ti(e)?bi(e,t,n,i,s,o):xi(e,t,c,n,i,s,o);if(!(1&n)){var m=u&&Oi.call(e,"__wrapped__"),h=p&&Oi.call(t,"__wrapped__");if(m||h){var f=m?e.value():e,g=h?t.value():t;return o||(o=new yi),s(f,g,n,i,o)}}return!!d&&(o||(o=new yi),_i(e,t,n,i,s,o))},Ai=Kt;var Li=function e(t,n,i,s,o){return t===n||(null==t||null==n||!Ai(t)&&!Ai(n)?t!=t&&n!=n:ji(t,n,i,s,e,o))},Pi=pt,Ri=Li;var Mi=function(e,t,n,i){var s=n.length,o=s,a=!i;if(null==e)return!o;for(e=Object(e);s--;){var r=n[s];if(a&&r[2]?r[1]!==e[r[0]]:!(r[0]in e))return!1}for(;++s<o;){var c=(r=n[s])[0],l=e[c],u=r[1];if(a&&r[2]){if(void 0===l&&!(c in e))return!1}else{var p=new Pi;if(i)var d=i(l,u,c,e,t,p);if(!(void 0===d?Ri(u,l,3,i,p):d))return!1}}return!0},Ni=V;var Di=function(e){return e==e&&!Ni(e)},Fi=Di,Bi=qn;var $i=function(e){for(var t=Bi(e),n=t.length;n--;){var i=t[n],s=e[i];t[n]=[i,s,Fi(s)]}return t};var zi=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},qi=Mi,Ui=$i,Hi=zi;var Vi=function(e){var t=Ui(e);return 1==t.length&&t[0][2]?Hi(t[0][0],t[0][1]):function(n){return n===e||qi(n,e,t)}},Ki=H,Wi=Kt;var Gi=function(e){return"symbol"==typeof e||Wi(e)&&"[object Symbol]"==Ki(e)},Yi=Rt,Ji=Gi,Zi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xi=/^\w*$/;var Qi=function(e,t){if(Yi(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ji(e))||(Xi.test(e)||!Zi.test(e)||null!=t&&e in Object(t))},es=Qe;function ts(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=n.cache;if(o.has(s))return o.get(s);var a=e.apply(this,i);return n.cache=o.set(s,a)||o,a};return n.cache=new(ts.Cache||es),n}ts.Cache=es;var ns=ts;var is=function(e){var t=ns(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t},ss=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,os=/\\(\\)?/g,as=is(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ss,function(e,n,i,s){t.push(i?s.replace(os,"$1"):n||e)}),t});var rs=function(e,t){for(var n=-1,i=null==e?0:e.length,s=Array(i);++n<i;)s[n]=t(e[n],n,e);return s},cs=rs,ls=Rt,us=Gi,ps=P?P.prototype:void 0,ds=ps?ps.toString:void 0;var ms=function e(t){if("string"==typeof t)return t;if(ls(t))return cs(t,e)+"";if(us(t))return ds?ds.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},hs=ms;var fs=function(e){return null==e?"":hs(e)},gs=Rt,vs=Qi,ys=as,bs=fs;var xs=function(e,t){return gs(e)?e:vs(e,t)?[e]:ys(bs(e))},_s=Gi;var ws=function(e){if("string"==typeof e||_s(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},ks=xs,Ss=ws;var Ts=function(e,t){for(var n=0,i=(t=ks(t,e)).length;null!=e&&n<i;)e=e[Ss(t[n++])];return n&&n==i?e:void 0},Es=Ts;var Cs=function(e,t,n){var i=null==e?void 0:Es(e,t);return void 0===i?n:i};var Is=function(e,t){return null!=e&&t in Object(e)},Os=xs,js=en,As=Rt,Ls=an,Ps=rn,Rs=ws;var Ms=function(e,t,n){for(var i=-1,s=(t=Os(t,e)).length,o=!1;++i<s;){var a=Rs(t[i]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++i!=s?o:!!(s=null==e?0:e.length)&&Ps(s)&&Ls(a,s)&&(As(e)||js(e))},Ns=Is,Ds=Ms;var Fs=function(e,t){return null!=e&&Ds(e,t,Ns)},Bs=Li,$s=Cs,zs=Fs,qs=Qi,Us=Di,Hs=zi,Vs=ws;var Ks=function(e,t){return qs(e)&&Us(t)?Hs(Vs(e),t):function(n){var i=$s(n,e);return void 0===i&&i===t?zs(n,e):Bs(t,i,3)}};var Ws=function(e){return e};var Gs=function(e){return function(t){return null==t?void 0:t[e]}},Ys=Ts;var Js=function(e){return function(t){return Ys(t,e)}},Zs=Gs,Xs=Js,Qs=Qi,eo=ws;var to=function(e){return Qs(e)?Zs(eo(e)):Xs(e)},no=Vi,io=Ks,so=Ws,oo=Rt,ao=to;var ro=function(e){return"function"==typeof e?e:null==e?so:"object"==typeof e?oo(e)?io(e[0],e[1]):no(e):ao(e)};var co=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}},lo=he,uo=function(){try{var e=lo(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),po=uo;var mo=function(e,t,n){"__proto__"==t&&po?po(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},ho=mo,fo=o,go=Object.prototype.hasOwnProperty;var vo=function(e,t,n){var i=e[t];go.call(e,t)&&fo(i,n)&&(void 0!==n||t in e)||ho(e,t,n)},yo=vo,bo=xs,xo=an,_o=V,wo=ws;var ko=function(e,t,n,i){if(!_o(e))return e;for(var s=-1,o=(t=bo(t,e)).length,a=o-1,r=e;null!=r&&++s<o;){var c=wo(t[s]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(s!=a){var u=r[c];void 0===(l=i?i(u,c,r):void 0)&&(l=_o(u)?u:xo(t[s+1])?[]:{})}yo(r,c,l),r=r[c]}return e},So=Ts,To=ko,Eo=xs;var Co=function(e,t,n){for(var i=-1,s=t.length,o={};++i<s;){var a=t[i],r=So(e,a);n(r,a)&&To(o,Eo(a,e),r)}return o},Io=jn(Object.getPrototypeOf,Object),Oo=Pt,jo=Io,Ao=Ht,Lo=Bt,Po=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Oo(t,Ao(e)),e=jo(e);return t}:Lo;var Ro=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Mo=V,No=On,Do=Ro,Fo=Object.prototype.hasOwnProperty;var Bo=function(e){if(!Mo(e))return Do(e);var t=No(e),n=[];for(var i in e)("constructor"!=i||!t&&Fo.call(e,i))&&n.push(i);return n},$o=Cn,zo=Bo,qo=Fn;var Uo=function(e){return qo(e)?$o(e,!0):zo(e)},Ho=Dt,Vo=Po,Ko=Uo;var Wo=function(e){return Ho(e,Ko,Vo)},Go=rs,Yo=ro,Jo=Co,Zo=Wo;var Xo=function(e,t){if(null==e)return{};var n=Go(Zo(e),function(e){return[e]});return t=Yo(t),Jo(e,n,function(e,n){return t(e,n[0])})},Qo=ro,ea=co,ta=Xo;var na=i(function(e,t){return ta(e,ea(Qo(t)))});var ia=i(function(e){return null===e});var sa=i(function(e){return void 0===e});function oa(e){return oa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oa(e)}function aa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ra(e){var t=function(e,t){if("object"!=oa(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=oa(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==oa(t)?t:t+""}function ca(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ra(i.key),i)}}function la(e,t,n){return t&&ca(e.prototype,t),n&&ca(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ua(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pa(e,t){return pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pa(e,t)}function da(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pa(e,t)}function ma(e,t){if(t&&("object"==oa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ua(e)}function ha(e){return ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ha(e)}function fa(e,t,n){return(t=ra(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ga(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function va(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ga(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ga(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ba(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ya(Object(n),!0).forEach(function(t){fa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ya(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var xa={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},_a=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};aa(this,e),this.init(t,n)}return la(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||xa,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,i){return i&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,ba(ba({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),wa=new _a,ka=function(){function e(){aa(this,e),this.observers={}}return la(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)}),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter(function(e){return e!==t}):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,n)});this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(n))})}}]),e}();function Sa(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function Ta(e){return null==e?"":""+e}function Ea(e,t,n){function i(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function s(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(s())return{};var a=i(o.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return s()?{}:{obj:e,k:i(o.shift())}}function Ca(e,t,n){var i=Ea(e,t,Object);i.obj[i.k]=n}function Ia(e,t){var n=Ea(e,t),i=n.obj,s=n.k;if(i)return i[s]}function Oa(e,t,n){for(var i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof t[i]||t[i]instanceof String?n&&(e[i]=t[i]):Oa(e[i],t[i],n):e[i]=t[i]);return e}function ja(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Aa={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function La(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return Aa[e]}):e}var Pa="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Ra=[" ",",","?","!",";"];function Ma(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var i=t.split(n),s=e,o=0;o<i.length;++o){if(!s)return;if("string"==typeof s[i[o]]&&o+1<i.length)return;if(void 0===s[i[o]]){for(var a=2,r=i.slice(o,o+a).join(n),c=s[r];void 0===c&&i.length>o+a;)a++,c=s[r=i.slice(o,o+a).join(n)];if(void 0===c)return;if(null===c)return null;if(t.endsWith(r)){if("string"==typeof c)return c;if(r&&"string"==typeof c[r])return c[r]}var l=i.slice(o+a).join(n);return l?Ma(c,l,n):void 0}s=s[i[o]]}return s}}function Na(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Da(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Na(Object(n),!0).forEach(function(t){fa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Na(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,i=ha(e);if(t){var s=ha(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return ma(this,n)}}var Ba=function(){da(t,ka);var e=Fa(t);function t(n){var i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return aa(this,t),i=e.call(this),Pa&&ka.call(ua(i)),i.data=n||{},i.options=s,void 0===i.options.keySeparator&&(i.options.keySeparator="."),void 0===i.options.ignoreJSONStructure&&(i.options.ignoreJSONStructure=!0),i}return la(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,o=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(s?n.split(s):n)),e.indexOf(".")>-1&&(a=e.split("."));var r=Ia(this.data,a);return r||!o||"string"!=typeof n?r:Ma(this.data&&this.data[e]&&this.data[e][t],n,s)}},{key:"addResource",value:function(e,t,n,i){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=t,t=(a=e.split("."))[1]),this.addNamespaces(t),Ca(this.data,a,i),s.silent||this.emit("added",e,t,n,i)}},{key:"addResources",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var s in n)"string"!=typeof n[s]&&"[object Array]"!==Object.prototype.toString.apply(n[s])||this.addResource(e,t,s,n[s],{silent:!0});i.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,i,s){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(i=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var r=Ia(this.data,a)||{};i?Oa(r,n,s):r=Da(Da({},r),n),Ca(this.data,a,r),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?Da(Da({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),t}(),$a={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,s){var o=this;return e.forEach(function(e){o.processors[e]&&(t=o.processors[e].process(t,n,i,s))}),t}};function za(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function qa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?za(Object(n),!0).forEach(function(t){fa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):za(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ua(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,i=ha(e);if(t){var s=ha(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return ma(this,n)}}var Ha={},Va=function(){da(t,ka);var e=Ua(t);function t(n){var i,s,o,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return aa(this,t),i=e.call(this),Pa&&ka.call(ua(i)),s=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=n,a=ua(i),s.forEach(function(e){o[e]&&(a[e]=o[e])}),i.options=r,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=wa.create("translator"),i}return la(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var i=Ra.filter(function(e){return t.indexOf(e)<0&&n.indexOf(e)<0});if(0===i.length)return!0;var s=new RegExp("(".concat(i.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),o=!s.test(e);if(!o){var a=e.indexOf(n);a>0&&!s.test(e.substring(0,a))&&(o=!0)}return o}(e,n,i));if(o&&!a){var r=e.match(this.interpolator.nestingRegexp);if(r&&r.length>0)return{key:e,namespaces:s};var c=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),e=c.join(i)}return"string"==typeof s&&(s=[s]),{key:e,namespaces:s}}},{key:"translate",value:function(e,n,i){var s=this;if("object"!==oa(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"===oa(n)&&(n=qa({},n)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,r=this.extractFromKey(e[e.length-1],n),c=r.key,l=r.namespaces,u=l[l.length-1],p=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(d){var m=n.nsSeparator||this.options.nsSeparator;return o?{res:"".concat(u).concat(m).concat(c),usedKey:c,exactUsedKey:c,usedLng:p,usedNS:u}:"".concat(u).concat(m).concat(c)}return o?{res:c,usedKey:c,exactUsedKey:c,usedLng:p,usedNS:u}:c}var h=this.resolve(e,n),f=h&&h.res,g=h&&h.usedKey||c,v=h&&h.exactUsedKey||c,y=Object.prototype.toString.apply(f),b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject;if(x&&f&&("string"!=typeof f&&"boolean"!=typeof f&&"number"!=typeof f)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(y)<0&&("string"!=typeof b||"[object Array]"!==y)){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,f,qa(qa({},n),{},{ns:l})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return o?(h.res=_,h):_}if(a){var w="[object Array]"===y,k=w?[]:{},S=w?v:g;for(var T in f)if(Object.prototype.hasOwnProperty.call(f,T)){var E="".concat(S).concat(a).concat(T);k[T]=this.translate(E,qa(qa({},n),{joinArrays:!1,ns:l})),k[T]===E&&(k[T]=f[T])}f=k}}else if(x&&"string"==typeof b&&"[object Array]"===y)(f=f.join(b))&&(f=this.extendTranslation(f,e,n,i));else{var C=!1,I=!1,O=void 0!==n.count&&"string"!=typeof n.count,j=t.hasDefaultValue(n),A=O?this.pluralResolver.getSuffix(p,n.count,n):"",L=n["defaultValue".concat(A)]||n.defaultValue;!this.isValidLookup(f)&&j&&(C=!0,f=L),this.isValidLookup(f)||(I=!0,f=c);var P=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&I?void 0:f,R=j&&L!==f&&this.options.updateMissing;if(I||C||R){if(this.logger.log(R?"updateKey":"missingKey",p,u,c,R?L:f),a){var M=this.resolve(c,qa(qa({},n),{},{keySeparator:!1}));M&&M.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var N=[],D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&D&&D[0])for(var F=0;F<D.length;F++)N.push(D[F]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(n.lng||this.language):N.push(n.lng||this.language);var B=function(e,t,i){var o=j&&i!==f?i:P;s.options.missingKeyHandler?s.options.missingKeyHandler(e,u,t,o,R,n):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(e,u,t,o,R,n),s.emit("missingKey",e,u,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?N.forEach(function(e){s.pluralResolver.getSuffixes(e,n).forEach(function(t){B([e],c+t,n["defaultValue".concat(t)]||L)})}):B(N,c,L))}f=this.extendTranslation(f,e,n,h,i),I&&f===c&&this.options.appendNamespaceToMissingKey&&(f="".concat(u,":").concat(c)),(I||C)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(c):c,C?f:void 0):this.options.parseMissingKeyHandler(f))}return o?(h.res=f,h):f}},{key:"extendTranslation",value:function(e,t,n,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,qa(qa({},this.options.interpolation.defaultVariables),n),i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(qa(qa({},n),{interpolation:qa(qa({},this.options.interpolation),n.interpolation)}));var a,r="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(r){var c=e.match(this.interpolator.nestingRegexp);a=c&&c.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=qa(qa({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),r){var u=e.match(this.interpolator.nestingRegexp);a<(u&&u.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&i&&i.res&&(n.lng=i.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return s&&s[0]===i[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(i[0]," in key: ").concat(t[0])),null):o.translate.apply(o,i.concat([t]))},n)),n.interpolation&&this.interpolator.reset()}var p=n.postProcess||this.options.postProcess,d="string"==typeof p?[p]:p;return null!=e&&d&&d.length&&!1!==n.applyPostProcessor&&(e=$a.handle(d,e,t,this.options&&this.options.postProcessPassResolved?qa({i18nResolved:i},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,i,s,o,a=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,r),l=c.key;n=l;var u=c.namespaces;a.options.fallbackNS&&(u=u.concat(a.options.fallbackNS));var p=void 0!==r.count&&"string"!=typeof r.count,d=p&&!r.ordinal&&0===r.count&&a.pluralResolver.shouldUseIntlApi(),m=void 0!==r.context&&("string"==typeof r.context||"number"==typeof r.context)&&""!==r.context,h=r.lngs?r.lngs:a.languageUtils.toResolveHierarchy(r.lng||a.language,r.fallbackLng);u.forEach(function(e){a.isValidLookup(t)||(o=e,!Ha["".concat(h[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(Ha["".concat(h[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(function(n){if(!a.isValidLookup(t)){s=n;var o,c=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(c,l,n,e,r);else{var u;p&&(u=a.pluralResolver.getSuffix(n,r.count,r));var h="".concat(a.options.pluralSeparator,"zero");if(p&&(c.push(l+u),d&&c.push(l+h)),m){var f="".concat(l).concat(a.options.contextSeparator).concat(r.context);c.push(f),p&&(c.push(f+u),d&&c.push(f+h))}}for(;o=c.pop();)a.isValidLookup(t)||(i=o,t=a.getResource(n,e,o,r))}}))})}}),{res:t,usedKey:n,exactUsedKey:i,usedLng:s,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}]),t}();function Ka(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Wa=function(){function e(t){aa(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wa.create("languageUtils")}return la(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Ka(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Ka(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Ka(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach(function(e){if(!t){var i=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(i)||(t=i)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var i=n.getLanguagePartFromCode(e);if(n.isSupportedCode(i))return t=i;t=n.options.supportedLngs.find(function(e){return e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:0===e.indexOf(i)?e:void 0})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],o=function(e){e&&(n.isSupportedCode(e)?s.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),i.forEach(function(e){s.indexOf(e)<0&&o(n.formatLanguageCode(e))}),s}}]),e}(),Ga=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Ya={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},Ja=["v1","v2","v3"],Za={zero:0,one:1,two:2,few:3,many:4,other:5};var Xa=function(){function e(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};aa(this,e),this.languageUtils=t,this.options=i,this.logger=wa.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(n={},Ga.forEach(function(e){e.lngs.forEach(function(t){n[t]={numbers:e.nr,plurals:Ya[e.fc]}})}),n)}return la(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort(function(e,t){return Za[e]-Za[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):i.numbers.map(function(i){return t.getSuffix(e,i,n)}):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getRule(e,n);return i?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.select(t)):this.getSuffixRetroCompatible(i,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,i=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),s=e.numbers[i];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var o=function(){return n.options.prepend&&s.toString()?n.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}},{key:"shouldUseIntlApi",value:function(){return!Ja.includes(this.options.compatibilityJSON)}}]),e}();function Qa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function er(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qa(Object(n),!0).forEach(function(t){fa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tr(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=function(e,t,n){var i=Ia(e,n);return void 0!==i?i:Ia(t,n)}(e,t,n);return!o&&s&&"string"==typeof n&&void 0===(o=Ma(e,n,i))&&(o=Ma(t,n,i)),o}var nr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};aa(this,e),this.logger=wa.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return la(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:La,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?ja(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?ja(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?ja(t.nestingPrefix):t.nestingPrefixEscaped||ja("$t("),this.nestingSuffix=t.nestingSuffix?ja(t.nestingSuffix):t.nestingSuffixEscaped||ja(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,i){var s,o,a,r=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(r.formatSeparator)<0){var s=tr(t,c,e,r.options.keySeparator,r.options.ignoreJSONStructure);return r.alwaysFormat?r.format(s,void 0,n,er(er(er({},i),t),{},{interpolationkey:e})):s}var o=e.split(r.formatSeparator),a=o.shift().trim(),l=o.join(r.formatSeparator).trim();return r.format(tr(t,c,a,r.options.keySeparator,r.options.ignoreJSONStructure),l,n,er(er(er({},i),t),{},{interpolationkey:a}))};this.resetRegExp();var p=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&void 0!==i.interpolation.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return r.escapeValue?l(r.escape(e)):l(e)}}].forEach(function(t){for(a=0;s=t.regex.exec(e);){var n=s[1].trim();if(void 0===(o=u(n)))if("function"==typeof p){var c=p(e,s,i);o="string"==typeof c?c:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))o="";else{if(d){o=s[0];continue}r.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else"string"==typeof o||r.useRawValueToEscape||(o=Ta(o));var l=t.safeValue(o);if(e=e.replace(s[0],l),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,++a>=r.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var n,i,s,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function r(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var i=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(i[1]);e=i[0];var a=(o=this.interpolate(o,s)).match(/'/g),r=o.match(/"/g);(a&&a.length%2==0&&!r||r.length%2!=0)&&(o=o.replace(/'/g,'"'));try{s=JSON.parse(o),t&&(s=er(er({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete s.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){var c=[];(s=(s=er({},a)).replace&&"string"!=typeof s.replace?s.replace:s).applyPostProcessor=!1,delete s.defaultValue;var l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map(function(e){return e.trim()});n[1]=u.shift(),c=u,l=!0}if((i=t(r.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof i)return i;"string"!=typeof i&&(i=Ta(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),i=""),l&&(i=c.reduce(function(e,t){return o.format(e,t,a.lng,er(er({},a),{},{interpolationkey:n[1].trim()}))},i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}]),e}();function ir(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function sr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ir(Object(n),!0).forEach(function(t){fa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ir(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function or(e){var t={};return function(n,i,s){var o=i+JSON.stringify(s),a=t[o];return a||(a=e(i,s),t[o]=a),a(n)}}var ar=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};aa(this,e),this.logger=wa.create("formatter"),this.options=t,this.formats={number:or(function(e,t){var n=new Intl.NumberFormat(e,sr({},t));return function(e){return n.format(e)}}),currency:or(function(e,t){var n=new Intl.NumberFormat(e,sr(sr({},t),{},{style:"currency"}));return function(e){return n.format(e)}}),datetime:or(function(e,t){var n=new Intl.DateTimeFormat(e,sr({},t));return function(e){return n.format(e)}}),relativetime:or(function(e,t){var n=new Intl.RelativeTimeFormat(e,sr({},t));return function(e){return n.format(e,t.range||"day")}}),list:or(function(e,t){var n=new Intl.ListFormat(e,sr({},t));return function(e){return n.format(e)}})},this.init(t)}return la(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=or(t)}},{key:"format",value:function(e,t,n){var i=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.split(this.formatSeparator).reduce(function(e,t){var o=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var i=e.split("(");t=i[0].toLowerCase().trim();var s=i[1].substring(0,i[1].length-1);"currency"===t&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):"relativetime"===t&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(function(e){if(e){var t=va(e.split(":")),i=t[0],s=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[i.trim()]||(n[i.trim()]=s),"false"===s&&(n[i.trim()]=!1),"true"===s&&(n[i.trim()]=!0),isNaN(s)||(n[i.trim()]=parseInt(s,10))}})}return{formatName:t,formatOptions:n}}(t),a=o.formatName,r=o.formatOptions;if(i.formats[a]){var c=e;try{var l=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},u=l.locale||l.lng||s.locale||s.lng||n;c=i.formats[a](e,u,sr(sr(sr({},r),s),l))}catch(e){i.logger.warn(e)}return c}return i.logger.warn("there was no format function for ".concat(a)),e},e);return o}}]),e}();function rr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rr(Object(n),!0).forEach(function(t){fa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,i=ha(e);if(t){var s=ha(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return ma(this,n)}}var ur=function(){da(t,ka);var e=lr(t);function t(n,i,s){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return aa(this,t),o=e.call(this),Pa&&ka.call(ua(o)),o.backend=n,o.store=i,o.services=s,o.languageUtils=s.languageUtils,o.options=a,o.logger=wa.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=a.maxParallelReads||10,o.readingCalls=0,o.maxRetries=a.maxRetries>=0?a.maxRetries:5,o.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(s,a.backend,a),o}return la(t,[{key:"queueLoad",value:function(e,t,n,i){var s=this,o={},a={},r={},c={};return e.forEach(function(e){var i=!0;t.forEach(function(t){var r="".concat(e,"|").concat(t);!n.reload&&s.store.hasResourceBundle(e,t)?s.state[r]=2:s.state[r]<0||(1===s.state[r]?void 0===a[r]&&(a[r]=!0):(s.state[r]=1,i=!1,void 0===a[r]&&(a[r]=!0),void 0===o[r]&&(o[r]=!0),void 0===c[t]&&(c[t]=!0)))}),i||(r[e]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(e,t,n){var i=e.split("|"),s=i[0],o=i[1];t&&this.emit("failedLoading",s,o,t),n&&this.store.addResourceBundle(s,o,n),this.state[e]=t?-1:2;var a={};this.queue.forEach(function(n){!function(e,t,n,i){var s=Ea(e,t,Object),o=s.obj,a=s.k;o[a]=o[a]||[],i&&(o[a]=o[a].concat(n)),i||o[a].push(n)}(n.loaded,[s],o),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach(function(t){void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var i=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:o,callback:a});else{this.readingCalls++;var r=function(r,c){if(i.readingCalls--,i.waitingReads.length>0){var l=i.waitingReads.shift();i.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}r&&c&&s<i.maxRetries?setTimeout(function(){i.read.call(i,e,t,n,s+1,2*o,a)},o):a(r,c)},c=this.backend[n].bind(this.backend);if(2!==c.length)return c(e,t,r);try{var l=c(e,t);l&&"function"==typeof l.then?l.then(function(e){return r(null,e)}).catch(r):r(null,l)}catch(e){r(e)}}}},{key:"prepareLoading",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,i,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(function(e){n.loadOne(e)})}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),s=i[0],o=i[1];this.read(s,o,"read",void 0,void 0,function(i,a){i&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(s," failed"),i),!i&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(s),a),t.loaded(e,i,a)})}},{key:"saveMissing",value:function(e,t,n,i,s){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){var r=cr(cr({},o),{},{isUpdate:s}),c=this.backend.create.bind(this.backend);if(c.length<6)try{var l;(l=5===c.length?c(e,t,n,i,r):c(e,t,n,i))&&"function"==typeof l.then?l.then(function(e){return a(null,e)}).catch(a):a(null,l)}catch(e){a(e)}else c(e,t,n,i,a,r)}e&&e[0]&&this.store.addResource(e[0],t,n,i)}}}]),t}();function pr(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===oa(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===oa(e[2])||"object"===oa(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function dr(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function mr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mr(Object(n),!0).forEach(function(t){fa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,i=ha(e);if(t){var s=ha(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return ma(this,n)}}function gr(){}var vr=function(){da(t,ka);var e=fr(t);function t(){var n,i,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(aa(this,t),n=e.call(this),Pa&&ka.call(ua(n)),n.options=dr(s),n.services={},n.logger=wa,n.modules={external:[]},i=ua(n),Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach(function(e){"function"==typeof i[e]&&(i[e]=i[e].bind(i))}),o&&!n.isInitialized&&!s.isClone){if(!n.options.initImmediate)return n.init(s,o),ma(n,ua(n));setTimeout(function(){n.init(s,o)},0)}return n}return la(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var i=pr();function s(e){return e?"function"==typeof e?new e:e:null}if(this.options=hr(hr(hr({},i),this.options),dr(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=hr(hr({},i.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?wa.init(s(this.modules.logger),this.options):wa.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=ar);var a=new Wa(this.options);this.store=new Ba(this.options.resources,this.options);var r=this.services;r.logger=wa,r.resourceStore=this.store,r.languageUtils=a,r.pluralResolver=new Xa(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format||(r.formatter=s(o),r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new nr(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new ur(s(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];e.emit.apply(e,[t].concat(i))}),this.modules.languageDetector&&(r.languageDetector=s(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=s(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new Va(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];e.emit.apply(e,[t].concat(i))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,n||(n=gr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}});var l=Sa(),u=function(){var t=function(t,i){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(i),n(t,i)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gr,i="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return n();var s=[],o=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){s.indexOf(e)<0&&s.push(e)})};if(i)o(i);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return o(e)});this.options.preload&&this.options.preload.forEach(function(e){return o(e)}),this.services.backendConnector.load(s,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,n){var i=Sa();return e||(e=this.languages),t||(t=this.options.ns),n||(n=gr),this.services.backendConnector.reload(e,t,function(e){i.resolve(),n(e)}),i}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&$a.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var i=Sa();this.emit("languageChanging",e);var s=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},o=function(o){e||o||!n.services.languageDetector||(o=[]);var a="string"==typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);a&&(n.language||s(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,function(e){!function(e,o){o?(s(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,i.resolve(function(){return n.t.apply(n,arguments)}),t&&t(e,function(){return n.t.apply(n,arguments)})}(e,a)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(e,t,n){var i=this,s=function e(t,s){var o;if("object"!==oa(s)){for(var a=arguments.length,r=new Array(a>2?a-2:0),c=2;c<a;c++)r[c-2]=arguments[c];o=i.options.overloadTranslationOptionHandler([t,s].concat(r))}else o=hr({},s);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||n||e.keyPrefix;var l,u=i.options.keySeparator||".";return l=o.keyPrefix&&Array.isArray(t)?t.map(function(e){return"".concat(o.keyPrefix).concat(u).concat(e)}):o.keyPrefix?"".concat(o.keyPrefix).concat(u).concat(t):t,i.t(l,o)};return"string"==typeof e?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=n.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var a=function(e,n){var i=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===i||2===i};if(n.precheck){var r=n.precheck(this,a);if(void 0!==r)return r}return!!this.hasResourceBundle(i,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(i,e)||s&&!a(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,i=Sa();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)}),this.loadResources(function(e){i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=Sa();"string"==typeof e&&(e=[e]);var i=this.options.preload||[],s=e.filter(function(e){return i.indexOf(e)<0});return s.length?(this.options.preload=i.concat(s),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";var t=this.services&&this.services.languageUtils||new Wa(pr());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gr,s=hr(hr(hr({},this.options),n),{isClone:!0}),o=new t(s);void 0===n.debug&&void 0===n.prefix||(o.logger=o.logger.clone(n));return["store","services","language"].forEach(function(t){o[t]=e[t]}),o.services=hr({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new Va(o.services,o.options),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];o.emit.apply(o,[e].concat(n))}),o.init(s,i),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),t}();fa(vr,"createInstance",function(){return new vr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)});var yr=vr.createInstance();yr.createInstance=vr.createInstance,yr.createInstance,yr.dir,yr.init,yr.loadResources,yr.reloadResources,yr.use,yr.changeLanguage,yr.getFixedT,yr.t,yr.exists,yr.setDefaultNamespace,yr.hasLoadedNamespace,yr.loadNamespaces,yr.loadLanguages;const br=["gse-yeatmanlab","gse-roar-assessment","gse-roar-assessment-dev","gse-roar-admin","gse-roar-admin-dev"];function xr(e){var t,n,i,s;const o=null!==(s=null===(i=null===(n=null===(t=null==e?void 0:e.firebaseProject)||void 0===t?void 0:t.firebaseApp)||void 0===n?void 0:n.options)||void 0===i?void 0:i.projectId)&&void 0!==s?s:"";return br.includes(o)}function _r(e){return e.replace(/^([A-Z])|[\s-_](\w)/g,function(e,t,n,i){return n?n.toUpperCase():t.toLowerCase()})}function wr(e,t){const n=new Date,i=12*(n.getFullYear()-t)+(n.getMonth()+1-e);return Math.floor(i/12)}const kr=(e,t=0)=>{if(null==e)return t;if("number"==typeof e)return e;const n=e.trim();return""!==n?Number.isNaN(Number(n))?t:Number(n):t};var Sr={exports:{}};
2
+ /* @license
3
+ Papa Parse
4
+ v5.5.3
5
+ https://github.com/mholt/PapaParse
6
+ License: MIT
7
+ */Sr.exports=function t(){var n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:{};function i(){var e=n.URL||n.webkitURL||null,i=t.toString();return c.BLOB_URL||(c.BLOB_URL=e.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",i,")();"],{type:"text/javascript"})))}var s=!n.document&&!!n.postMessage,o=n.IS_PAPA_WORKER||!1,a={},r=0,c={};if(c.parse=u,c.unparse=p,c.RECORD_SEP=String.fromCharCode(30),c.UNIT_SEP=String.fromCharCode(31),c.BYTE_ORDER_MARK="\ufeff",c.BAD_DELIMITERS=["\r","\n",'"',c.BYTE_ORDER_MARK],c.WORKERS_SUPPORTED=!s&&!!n.Worker,c.NODE_STREAM_INPUT=1,c.LocalChunkSize=10485760,c.RemoteChunkSize=5242880,c.DefaultDelimiter=",",c.Parser=x,c.ParserHandle=y,c.NetworkStreamer=m,c.FileStreamer=h,c.StringStreamer=f,c.ReadableStreamStreamer=g,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(c.DuplexStreamStreamer=v),n.jQuery){var l=n.jQuery;l.fn.parse=function(e){var t=e.config||{},i=[];return this.each(function(e){if("INPUT"!==l(this).prop("tagName").toUpperCase()||"file"!==l(this).attr("type").toLowerCase()||!n.FileReader||!this.files||0===this.files.length)return!0;for(var s=0;s<this.files.length;s++)i.push({file:this.files[s],inputElem:this,instanceConfig:l.extend({},t)})}),s(),this;function s(){if(0!==i.length){var t=i[0];if(I(e.before)){var n=e.before(t.file,t.inputElem);if("object"==typeof n){if("abort"===n.action)return void o("AbortError",t.file,t.inputElem,n.reason);if("skip"===n.action)return void a();"object"==typeof n.config&&(t.instanceConfig=l.extend(t.instanceConfig,n.config))}else if("skip"===n)return void a()}var s=t.instanceConfig.complete;t.instanceConfig.complete=function(e){I(s)&&s(e,t.file,t.inputElem),a()},c.parse(t.file,t.instanceConfig)}else I(e.complete)&&e.complete()}function o(t,n,i,s){I(e.error)&&e.error({name:t},n,i,s)}function a(){i.splice(0,1),s()}}}function u(e,t){var i=(t=t||{}).dynamicTyping||!1;if(I(i)&&(t.dynamicTypingFunction=i,i={}),t.dynamicTyping=i,t.transform=!!I(t.transform)&&t.transform,t.worker&&c.WORKERS_SUPPORTED){var s=_();return s.userStep=t.step,s.userChunk=t.chunk,s.userComplete=t.complete,s.userError=t.error,t.step=I(t.step),t.chunk=I(t.chunk),t.complete=I(t.complete),t.error=I(t.error),delete t.worker,void s.postMessage({input:e,config:t,workerId:s.id})}var o=null;return e===c.NODE_STREAM_INPUT&&"undefined"==typeof PAPA_BROWSER_CONTEXT?(o=new v(t)).getStream():("string"==typeof e?(e=a(e),o=t.download?new m(t):new f(t)):!0===e.readable&&I(e.read)&&I(e.on)?o=new g(t):(n.File&&e instanceof File||e instanceof Object)&&(o=new h(t)),o.stream(e));function a(e){return 65279===e.charCodeAt(0)?e.slice(1):e}}function p(e,t){var n=!1,i=!0,s=",",o="\r\n",a='"',r=a+a,l=!1,u=null,p=!1;m();var d=new RegExp(b(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,l);if("object"==typeof e[0])return h(u||Object.keys(e[0]),e,l)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||u),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],l);throw new Error("Unable to serialize unrecognized input");function m(){if("object"==typeof t){if("string"!=typeof t.delimiter||c.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(s=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(l=t.skipEmptyLines),"string"==typeof t.newline&&(o=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(i=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(r=t.escapeChar+a),t.escapeFormulae instanceof RegExp?p=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(p=/^[=+\-@\t\r].*$/)}}function h(e,t,n){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var r=Array.isArray(e)&&e.length>0,c=!Array.isArray(t[0]);if(r&&i){for(var l=0;l<e.length;l++)l>0&&(a+=s),a+=f(e[l],l);t.length>0&&(a+=o)}for(var u=0;u<t.length;u++){var p=r?e.length:t[u].length,d=!1,m=r?0===Object.keys(t[u]).length:0===t[u].length;if(n&&!r&&(d="greedy"===n?""===t[u].join("").trim():1===t[u].length&&0===t[u][0].length),"greedy"===n&&r){for(var h=[],g=0;g<p;g++){var v=c?e[g]:g;h.push(t[u][v])}d=""===h.join("").trim()}if(!d){for(var y=0;y<p;y++){y>0&&!m&&(a+=s);var b=r&&c?e[y]:y;a+=f(t[u][b],y)}u<t.length-1&&(!n||p>0&&!m)&&(a+=o)}}return a}function f(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var i=!1;p&&"string"==typeof e&&p.test(e)&&(e="'"+e,i=!0);var o=e.toString().replace(d,r);return(i=i||!0===n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||g(o,c.BAD_DELIMITERS)||o.indexOf(s)>-1||" "===o.charAt(0)||" "===o.charAt(o.length-1))?a+o+a:o}function g(e,t){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return!0;return!1}}function d(e){function t(e){var t=E(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new y(t),this._handle.streamer=this,this._config=t}this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},t.call(this,e),this.parseChunk=function(e,t){const i=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&i>0){let t=this._config.newline;if(!t){const n=this._config.quoteChar||'"';t=this._handle.guessLineEndings(e,n)}const n=e.split(t);e=[...n.slice(i)].join(t)}if(this.isFirstChunk&&I(this._config.beforeFirstChunk)){var s=this._config.beforeFirstChunk(e);void 0!==s&&(e=s)}this.isFirstChunk=!1,this._halted=!1;var a=this._partialLine+e;this._partialLine="";var r=this._handle.parse(a,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=r.meta.cursor;this._finished||(this._partialLine=a.substring(l-this._baseIndex),this._baseIndex=l),r&&r.data&&(this._rowCount+=r.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)n.postMessage({results:r,workerId:c.WORKER_ID,finished:u});else if(I(this._config.chunk)&&!t){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);r=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!u||!I(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(e){I(this._config.error)?this._config.error(e):o&&this._config.error&&n.postMessage({workerId:c.WORKER_ID,error:e,finished:!1})}}function m(e){var t;function n(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(e=e||{}).chunkSize||(e.chunkSize=c.RemoteChunkSize),d.call(this,e),this._nextChunk=s?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),s||(t.onload=C(this._chunkLoaded,this),t.onerror=C(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!s),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var n in e)t.setRequestHeader(n,e[n])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+i)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}s&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||t.status>=400?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=n(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function h(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=c.LocalChunkSize),d.call(this,e);var i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,i?((t=new FileReader).onload=C(this._chunkLoaded,this),t.onerror=C(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var s=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,s)}var o=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:o}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function f(e){var t;e=e||{},d.call(this,e),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function g(e){e=e||{},d.call(this,e);var t=[],n=!0,i=!1;this.pause=function(){d.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){d.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=C(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=C(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=C(function(){this._streamCleanUp(),i=!0,this._streamData("")},this),this._streamCleanUp=C(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function v(t){var n=e.Duplex,i=E(t),s=!0,o=!1,a=[],r=null;this._onCsvData=function(e){var t=e.data;r.push(t)||this._handle.paused()||this._handle.pause()},this._onCsvComplete=function(){r.push(null)},i.step=C(this._onCsvData,this),i.complete=C(this._onCsvComplete,this),d.call(this,i),this._nextChunk=function(){o&&1===a.length&&(this._finished=!0),a.length?a.shift()():s=!0},this._addToParseQueue=function(e,t){a.push(C(function(){if(this.parseChunk("string"==typeof e?e:e.toString(i.encoding)),I(t))return t()},this)),s&&(s=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(e,t,n){this._addToParseQueue(e,n)},this._onWriteComplete=function(){o=!0,this._addToParseQueue("")},this.getStream=function(){return r},(r=new n({readableObjectMode:!0,decodeStrings:!1,read:C(this._onRead,this),write:C(this._onWrite,this)})).once("finish",C(this._onWriteComplete,this))}function y(e){var t,n,i,s=Math.pow(2,53),o=-s,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,r=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,l=this,u=0,p=0,d=!1,m=!1,h=[],f={data:[],errors:[],meta:{}};if(I(e.step)){var g=e.step;e.step=function(t){if(f=t,w())_();else{if(_(),0===f.data.length)return;u+=t.data.length,e.preview&&u>e.preview?n.abort():(f.data=f.data[0],g(f,l))}}}function v(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function y(e){if(a.test(e)){var t=parseFloat(e);if(t>o&&t<s)return!0}return!1}function _(){return f&&i&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines&&(f.data=f.data.filter(function(e){return!v(e)})),w()&&k(),C()}function w(){return e.header&&0===h.length}function k(){if(f)if(Array.isArray(f.data[0])){for(var t=0;w()&&t<f.data.length;t++)f.data[t].forEach(n);f.data.splice(0,1)}else f.data.forEach(n);function n(t,n){I(e.transformHeader)&&(t=e.transformHeader(t,n)),h.push(t)}}function S(t){return e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)}function T(e,t){return S(e)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(y(t)?parseFloat(t):r.test(t)?new Date(t):""===t?null:t):t}function C(){if(!f||!e.header&&!e.dynamicTyping&&!e.transform)return f;function t(t,n){var i,s=e.header?{}:[];for(i=0;i<t.length;i++){var o=i,a=t[i];e.header&&(o=i>=h.length?"__parsed_extra":h[i]),e.transform&&(a=e.transform(a,o)),a=T(o,a),"__parsed_extra"===o?(s[o]=s[o]||[],s[o].push(a)):s[o]=a}return e.header&&(i>h.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+h.length+" fields but parsed "+i,p+n):i<h.length&&j("FieldMismatch","TooFewFields","Too few fields: expected "+h.length+" fields but parsed "+i,p+n)),s}var n=1;return!f.data.length||Array.isArray(f.data[0])?(f.data=f.data.map(t),n=f.data.length):f.data=t(f.data,0),e.header&&f.meta&&(f.meta.fields=h),p+=n,f}function O(t,n,i,s,o){var a,r,l,u;o=o||[",","\t","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var p=0;p<o.length;p++){var d=o[p],m=0,h=0,f=0;l=void 0;for(var g=new x({comments:s,delimiter:d,newline:n,preview:10}).parse(t),y=0;y<g.data.length;y++)if(i&&v(g.data[y]))f++;else{var b=g.data[y].length;h+=b,void 0!==l?b>0&&(m+=Math.abs(b-l),l=b):l=b}g.data.length>0&&(h/=g.data.length-f),(void 0===r||m<=r)&&(void 0===u||h>u)&&h>1.99&&(r=m,a=d,u=h)}return e.delimiter=a,{successful:!!a,bestDelimiter:a}}function j(e,t,n,i){var s={type:e,code:t,message:n};void 0!==i&&(s.row=i),f.errors.push(s)}this.parse=function(s,o,a){var r=e.quoteChar||'"';if(e.newline||(e.newline=this.guessLineEndings(s,r)),i=!1,e.delimiter)I(e.delimiter)&&(e.delimiter=e.delimiter(s),f.meta.delimiter=e.delimiter);else{var l=O(s,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);l.successful?e.delimiter=l.bestDelimiter:(i=!0,e.delimiter=c.DefaultDelimiter),f.meta.delimiter=e.delimiter}var u=E(e);return e.preview&&e.header&&u.preview++,t=s,n=new x(u),f=n.parse(t,o,a),_(),d?{meta:{paused:!0}}:f||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,n.abort(),t=I(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){l.streamer._halted?(d=!1,l.streamer.parseChunk(t,!0)):setTimeout(l.resume,3)},this.aborted=function(){return m},this.abort=function(){m=!0,n.abort(),f.meta.aborted=!0,I(e.complete)&&e.complete(f),t=""},this.guessLineEndings=function(e,t){e=e.substring(0,1048576);var n=new RegExp(b(t)+"([^]*?)"+b(t),"gm"),i=(e=e.replace(n,"")).split("\r"),s=e.split("\n"),o=s.length>1&&s[0].length<i[0].length;if(1===i.length||o)return"\n";for(var a=0,r=0;r<i.length;r++)"\n"===i[r][0]&&a++;return a>=i.length/2?"\r\n":"\r"}}function b(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function x(e){var t,n=(e=e||{}).delimiter,i=e.newline,s=e.comments,o=e.step,a=e.preview,r=e.fastMode,l=null,u=!1,p=t=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(p=e.escapeChar),("string"!=typeof n||c.BAD_DELIMITERS.indexOf(n)>-1)&&(n=","),s===n)throw new Error("Comment character same as delimiter");!0===s?s="#":("string"!=typeof s||c.BAD_DELIMITERS.indexOf(s)>-1)&&(s=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var d=0,m=!1;this.parse=function(c,h,f){if("string"!=typeof c)throw new Error("Input must be a string");var g=c.length,v=n.length,y=i.length,x=s.length,_=I(o);d=0;var w=[],k=[],S=[],T=0;if(!c)return B();if(r||!1!==r&&-1===c.indexOf(t)){for(var E=c.split(i),C=0;C<E.length;C++){if(S=E[C],d+=S.length,C!==E.length-1)d+=i.length;else if(f)return B();if(!s||S.substring(0,x)!==s){if(_){if(w=[],M(S.split(n)),$(),m)return B()}else M(S.split(n));if(a&&C>=a)return w=w.slice(0,a),B(!0)}}return B()}for(var O=c.indexOf(n,d),j=c.indexOf(i,d),A=new RegExp(b(p)+b(t),"g"),L=c.indexOf(t,d);;)if(c[d]!==t)if(s&&0===S.length&&c.substring(d,d+x)===s){if(-1===j)return B();d=j+y,j=c.indexOf(i,d),O=c.indexOf(n,d)}else if(-1!==O&&(O<j||-1===j))S.push(c.substring(d,O)),d=O+v,O=c.indexOf(n,d);else{if(-1===j)break;if(S.push(c.substring(d,j)),F(j+y),_&&($(),m))return B();if(a&&w.length>=a)return B(!0)}else for(L=d,d++;;){if(-1===(L=c.indexOf(t,L+1)))return f||k.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:d}),D();if(L===g-1)return D(c.substring(d,L).replace(A,t));if(t!==p||c[L+1]!==p){if(t===p||0===L||c[L-1]!==p){-1!==O&&O<L+1&&(O=c.indexOf(n,L+1)),-1!==j&&j<L+1&&(j=c.indexOf(i,L+1));var P=N(-1===j?O:Math.min(O,j));if(c.substr(L+1+P,v)===n){S.push(c.substring(d,L).replace(A,t)),d=L+1+P+v,c[L+1+P+v]!==t&&(L=c.indexOf(t,d)),O=c.indexOf(n,d),j=c.indexOf(i,d);break}var R=N(j);if(c.substring(L+1+R,L+1+R+y)===i){if(S.push(c.substring(d,L).replace(A,t)),F(L+1+R+y),O=c.indexOf(n,d),L=c.indexOf(t,d),_&&($(),m))return B();if(a&&w.length>=a)return B(!0);break}k.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:d}),L++}}else L++}return D();function M(e){w.push(e),T=d}function N(e){var t=0;if(-1!==e){var n=c.substring(L+1,e);n&&""===n.trim()&&(t=n.length)}return t}function D(e){return f||(void 0===e&&(e=c.substring(d)),S.push(e),d=g,M(S),_&&$()),B()}function F(e){d=e,M(S),S=[],j=c.indexOf(i,d)}function B(t){if(e.header&&!h&&w.length&&!u){const t=w[0],n=Object.create(null),i=new Set(t);let s=!1;for(let o=0;o<t.length;o++){let a=t[o];if(I(e.transformHeader)&&(a=e.transformHeader(a,o)),n[a]){let e,r=n[a];do{e=`${a}_${r}`,r++}while(i.has(e));i.add(e),t[o]=e,n[a]++,s=!0,null===l&&(l={}),l[e]=a}else n[a]=1,t[o]=a;i.add(a)}s&&console.warn("Duplicate headers found and renamed."),u=!0}return{data:w,errors:k,meta:{delimiter:n,linebreak:i,aborted:m,truncated:!!t,cursor:T+(h||0),renamedHeaders:l}}}function $(){o(B()),w=[],k=[]}},this.abort=function(){m=!0},this.getCharIndex=function(){return d}}function _(){if(!c.WORKERS_SUPPORTED)return!1;var e=i(),t=new n.Worker(e);return t.onmessage=w,t.id=r++,a[t.id]=t,t}function w(e){var t=e.data,n=a[t.workerId],i=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){i=!0,k(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:S,resume:S};if(I(n.userStep)){for(var o=0;o<t.results.data.length&&(n.userStep({data:t.results.data[o],errors:t.results.errors,meta:t.results.meta},s),!i);o++);delete t.results}else I(n.userChunk)&&(n.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!i&&k(t.workerId,t.results)}function k(e,t){var n=a[e];I(n.userComplete)&&n.userComplete(t),n.terminate(),delete a[e]}function S(){throw new Error("Not implemented.")}function T(e){var t=e.data;if(void 0===c.WORKER_ID&&t&&(c.WORKER_ID=t.workerId),"string"==typeof t.input)n.postMessage({workerId:c.WORKER_ID,results:c.parse(t.input,t.config),finished:!0});else if(n.File&&t.input instanceof File||t.input instanceof Object){var i=c.parse(t.input,t.config);i&&n.postMessage({workerId:c.WORKER_ID,results:i,finished:!0})}}function E(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=E(e[n]);return t}function C(e,t){return function(){e.apply(t,arguments)}}function I(e){return"function"==typeof e}return o&&(n.onmessage=T),m.prototype=Object.create(d.prototype),m.prototype.constructor=m,h.prototype=Object.create(d.prototype),h.prototype.constructor=h,f.prototype=Object.create(f.prototype),f.prototype.constructor=f,g.prototype=Object.create(d.prototype),g.prototype.constructor=g,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(v.prototype=Object.create(d.prototype),v.prototype.constructor=v),c}();var Tr=Sr.exports,Er=i(Tr);var Cr=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e},Ir=/\s/;var Or=function(e){for(var t=e.length;t--&&Ir.test(e.charAt(t)););return t},jr=/^\s+/;var Ar=function(e){return e?e.slice(0,Or(e)+1).replace(jr,""):e},Lr=V,Pr=Gi,Rr=/^[-+]0x[0-9a-f]+$/i,Mr=/^0b[01]+$/i,Nr=/^0o[0-7]+$/i,Dr=parseInt;var Fr=function(e){if("number"==typeof e)return e;if(Pr(e))return NaN;if(Lr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Lr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ar(e);var n=Mr.test(e);return n||Nr.test(e)?Dr(e.slice(2),n?2:8):Rr.test(e)?NaN:+e},Br=i(Fr),$r=Cr,zr=Fr;var qr=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=zr(n))==n?n:0),void 0!==t&&(t=(t=zr(t))==t?t:0),$r(zr(e),t,n)},Ur=i(qr);const Hr={trog:{1:{startSelect:"random",nStartItems:10,priorDist:"norm",itemSelect:"mfi",method:"eap"}},"roar-inference":{1:{startSelect:"random",nStartItems:3,itemSelect:"mfi",method:"eap"}}},Vr={trog:{1:{catsToUpdate:["composite","new","composite_comprehension"],catToSelect:"composite",catOrderMap:{0:"practice",1:"composite",2:"new"}}},"roar-inference":{1:{catsToUpdate:["composite","composite_comprehension"],catToSelect:"composite",catOrderMap:{0:"composite"}}}},Kr={trog:{1:{requiredItems:{composite:25,new:5},logicalOperation:"and"}},"roar-inference":{1:{requiredItems:{composite:25},logicalOperation:"and"}}},Wr={trog:{1:{csvUrl:"https://storage.googleapis.com/roar-syntax/scores/trog_hyperparameters_v1.csv",catsScaled:["composite","composite_comprehension"]}},"roar-inference":{1:{csvUrl:"https://storage.googleapis.com/roar-inference/scores/inference_hyperparameters_v1.csv",catsScaled:["composite","composite_comprehension"]}}},Gr={trog:{1:{corpus:"roar-syntax-item-2026-05-14-v3.csv",catNames:["practice","composite","new","composite_comprehension"],delimiter:"."}},"roar-inference":{1:{corpus:"inference-2026-05-14-v2.csv",catNames:["composite","composite_comprehension"],delimiter:"."}}},Yr=e=>isNaN(e)||e<=0?Number.MIN_VALUE:Ur(e,Number.MIN_VALUE,Number.MAX_VALUE),Jr=e=>new Promise((t,n)=>{Er.parse(e,{download:!0,header:!0,skipEmptyLines:!0,dynamicTyping:!0,complete:function(e){t((e=>{if(e.length>1&&!e[0].trial_type)throw new Error("Multiple hyperparameter rows found but no trial_type column found");return e.reduce((e,t)=>(e[t.trial_type?t.trial_type.toLowerCase():"composite"]={minTheta:Number(t["theta.min"]),maxTheta:Number(t["theta.max"]),priorPar:[Number(t["theta.mean"]),Number(t["theta.sd"])],transformationScale:Number(t["transformation.scale"]),transformationShift:Number(t["transformation.shift"])},e),{})})(e.data))},error:function(e){n(e)}})}),Zr={playAudioOnLoad:!0,staggered:{enabled:!1,trialTypes:[]},classOverrides:{buttonContainerClassList:["lev-response-row","multi-4"],buttonClassList:["image"],promptClassList:["lev-row-container","instruction"],stimulusContainerClassList:["lev-stim-content-x-3"]},prompt:{enabled:!0,aboveStimulus:!0},equalSizeStim:!1,disableButtonsWhenAudioPlaying:!1,isPracticeTrial:!1,isInstructionTrial:!1,randomizeChoiceOrder:!1,isStaggered:!1,isImageButtonResponse:!1,showStimImage:!0,response:{target:"",displayValues:["OK"],values:["OK"],targetIndex:0},inCorrectTrialConfig:{onIncorrectTrial:"end"},disableOkButton:!1},Xr={egmaMath:"math-item-bank",matrixReasoning:"matrix-reasoning-item-bank",mentalRotation:"mental-rotation-item-bank",sameDifferentSelection:"same-different-selection-item-bank",trog:"roar-syntax-item-2026-05-14-v3",theoryOfMind:"theory-of-mind-item-bank",vocab:"vocab-item-bank",roarInference:"inference-2026-05-14-v2",adultReasoning:"adult-reasoning-item-bank",hostileAttribution:"hostile-attribution-item-bank",childSurvey:"child-survey-item-bank"},Qr=async(e,t,n)=>{const i=na(na({...t,...n},ia),sa),{userMetadata:s={},birthMonth:o,birthYear:a,audioFeedback:r,language:c,skipInstructions:l,sequentialPractice:u,sequentialStimulus:p,corpus:d,buttonLayout:m,numberOfTrials:h,taskName:f,stimulusBlocks:g,numOfPracticeTrials:v,maxIncorrect:y,keyHelpers:b,age:x,maxTime:_,storeItemId:w,cat:k,heavyInstructions:S,experimenterButtons:T,inferenceNumStories:E,numberOfStories:C,semThreshold:I,startingTheta:O,storyOption:j,grade:A,demoMode:L,debug:P,version:R,taskVersion:M,isPaused:N,scoringVersion:D,randomSeed:F}=i,B=Number(D),$={userMetadata:{...s,grade:A,age:Number(x)||wr(Number(o),Number(a))},audioFeedback:r||"neutral",skipInstructions:!!l,startTime:new Date,firekit:e,sequentialPractice:null==u||u,sequentialStimulus:null==p||p,corpus:d,buttonLayout:m||"default",numberOfTrials:null!=h?h:300,task:null!=f?f:"egma-math",stimulusBlocks:Number(g)||1,numOfPracticeTrials:Number(v)||2,maxIncorrect:Number(y)||3,keyHelpers:!!b,language:null!=c?c:yr.language,maxTime:Number(_)||100,storeItemId:!!w,isRoarApp:xr(e),cat:!!k,heavyInstructions:!!S,experimenterButtons:!!T,inferenceNumStories:kr(E,33),numberOfStories:Number(C)||3,semThreshold:Number(I),startingTheta:Number(O),storyOption:j,demoMode:!1,debug:!!P,version:Number((null!=R?R:M)||1),displayPromptDurations:{},taskTimer:null,isPaused:!1,scoringVersion:null==D||isNaN(B)?Hr[f]?1:0:B,randomSeed:F};$.corpus||($.corpus=Xr[_r(f)]);const z=Object.fromEntries(Object.entries(t).map(([e,t])=>{var n;return[e,null!==(n=$[e])&&void 0!==n?n:t]}));return await $.firekit.updateTaskParams(z),$};!function(e){var t=function(e){var t,n=Object.prototype,i=n.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",r=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),r=new j(i||[]);return s(a,"_invoke",{value:E(e,n,r)}),a}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",m="suspendedYield",h="executing",f="completed",g={};function v(){}function y(){}function b(){}var x={};l(x,a,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(A([])));w&&w!==n&&i.call(w,a)&&(x=w);var k=b.prototype=v.prototype=Object.create(x);function S(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function T(e,t){function n(s,o,a,r){var c=p(e[s],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==typeof u&&i.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,a,r)},function(e){n("throw",e,a,r)}):t.resolve(u).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,r)})}r(c.arg)}var o;s(this,"_invoke",{value:function(e,i){function s(){return new t(function(t,s){n(e,i,t,s)})}return o=o?o.then(s,s):s()}})}function E(e,t,n){var i=d;return function(s,o){if(i===h)throw new Error("Generator is already running");if(i===f){if("throw"===s)throw o;return L()}for(n.method=s,n.arg=o;;){var a=n.delegate;if(a){var r=C(a,n);if(r){if(r===g)continue;return r}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=h;var c=p(e,t,n);if("normal"===c.type){if(i=n.done?f:m,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=f,n.method="throw",n.arg=c.arg)}}}function C(e,n){var i=n.method,s=e.iterator[i];if(s===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),g;var o=p(s,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function A(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var s=-1,o=function n(){for(;++s<e.length;)if(i.call(e,s))return n.value=e[s],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:L}}function L(){return{value:t,done:!0}}return y.prototype=b,s(k,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},S(T.prototype),l(T.prototype,r,function(){return this}),e.AsyncIterator=T,e.async=function(t,n,i,s,o){void 0===o&&(o=Promise);var a=new T(u(t,n,i,s),o);return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},S(k),l(k,c,"Generator"),l(k,a,function(){return this}),l(k,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=A,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function s(i,s){return r.type="throw",r.arg=e,n.next=i,s&&(n.method="next",n.arg=t),!!s}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],r=a.completion;if("root"===a.tryLoc)return s("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return s(a.catchLoc,!0);if(this.prev<a.finallyLoc)return s(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return s(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return s(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var s=this.tryEntries[n];if(s.tryLoc<=this.prev&&i.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var o=s;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var s=i.arg;O(n)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}({exports:{}});var ec=[],tc=ec.forEach,nc=ec.slice;var ic=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,sc=function(e,t,n,i){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+60*n*1e3)),i&&(s.domain=i),document.cookie=function(e,t,n){var i=n||{};i.path=i.path||"/";var s=encodeURIComponent(t),o="".concat(e,"=").concat(s);if(i.maxAge>0){var a=i.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(a))}if(i.domain){if(!ic.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!ic.test(i.path))throw new TypeError("option path is invalid");o+="; Path=".concat(i.path)}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o}(e,encodeURIComponent(t),s)},oc=function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),i=0;i<n.length;i++){for(var s=n[i];" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(t))return s.substring(t.length,s.length)}return null},ac={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=oc(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&sc(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},rc={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=n.substring(1).split("&"),s=0;s<i.length;s++){var o=i[s].indexOf("=");if(o>0)i[s].substring(0,o)===e.lookupQuerystring&&(t=i[s].substring(o+1))}}return t}},cc=null,lc=function(){if(null!==cc)return cc;try{cc="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){cc=!1}return cc},uc={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&lc()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&lc()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},pc=null,dc=function(){if(null!==pc)return pc;try{pc="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){pc=!1}return pc},mc={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&dc()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&dc()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},hc={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},fc={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},gc={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},vc={name:"subdomain",lookup:function(e){var t="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,n="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}},yc=!1;try{document.cookie,yc=!0}catch(e){}var bc=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];yc||bc.splice(1,1);var xc=function(){return la(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};aa(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)},[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=function(e){return tc.call(nc.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:bc,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(e){return e.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(ac),this.addDetector(rc),this.addDetector(uc),this.addDetector(mc),this.addDetector(hc),this.addDetector(fc),this.addDetector(gc),this.addDetector(vc)}},{key:"addDetector",value:function(e){return this.detectors[e.name]=e,this}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach(function(e){if(t.detectors[e]){var i=t.detectors[e].lookup(t.options);i&&"string"==typeof i&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(function(e){return t.options.convertDetectedLanguage(e)}),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)}))}}])}();xc.type="languageDetector";function _c(e){const t={};for(const n of e)if("instructions"!==n.trialType&&"practice_response"!==n.assessmentStage){const e=n.trialType;t[e]||(t[e]=[]),t[e].push(n)}for(const e in t){const n=wc(t[e]);t[e]=n}let n=0;for(const i of e){if("instructions"!==i.trialType&&"practice_response"!==i.assessmentStage){const s=i.trialType;e[n]=t[s].shift()}n++}return e}function wc(e){for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e}(new xc).addDetector({name:"defaultToEnglish",lookup:e=>"en-US"}),yr.use(xc).init({debug:!1,fallbackLng:"en-US",detection:{order:["defaultToEnglish","querystring"]},resources:{en:{translation:{}}}});var kc=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t},Sc=Math.floor,Tc=Math.random;var Ec=function(e,t){return e+Sc(Tc()*(t-e+1))};var Cc=function(e,t){var n=-1,i=e.length,s=i-1;for(t=void 0===t?i:t;++n<t;){var o=Ec(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e},Ic=kc,Oc=Cc;var jc=rs;var Ac=function(e,t){return jc(t,function(t){return e[t]})},Lc=Ac,Pc=qn;var Rc=Cc,Mc=function(e){return null==e?[]:Lc(e,Pc(e))};var Nc=function(e){return Oc(Ic(e))},Dc=function(e){return Rc(Mc(e))},Fc=Rt;var Bc=i(function(e){return(Fc(e)?Nc:Dc)(e)});var $c,zc={exports:{}};
8
+ /*! store2 - v2.14.4 - 2024-12-26
9
+ * Copyright (c) 2024 Nathan Bubna; Licensed MIT */$c=zc,function(e,t){var n={version:"2.14.4",areas:{},apis:{},nsdelim:".",inherit:function(e,t){for(var n in e)t.hasOwnProperty(n)||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n));return t},stringify:function(e,t){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e,t||n.replace)},parse:function(e,t){try{return JSON.parse(e,t||n.revive)}catch(t){return e}},fn:function(e,t){for(var i in n.storeAPI[e]=t,n.apis)n.apis[i][e]=t},get:function(e,t){return e.getItem(t)},set:function(e,t,n){e.setItem(t,n)},remove:function(e,t){e.removeItem(t)},key:function(e,t){return e.key(t)},length:function(e){return e.length},clear:function(e){e.clear()},Store:function(e,t,i){var s=n.inherit(n.storeAPI,function(e,t,n){return 0===arguments.length?s.getAll():"function"==typeof t?s.transact(e,t,n):void 0!==t?s.set(e,t,n):"string"==typeof e||"number"==typeof e?s.get(e):"function"==typeof e?s.each(e):e?s.setAll(e,t):s.clear()});s._id=e;try{var o="__store2_test";t.setItem(o,"ok"),s._area=t,t.removeItem(o)}catch(e){s._area=n.storage("fake")}return s._ns=i||"",n.areas[e]||(n.areas[e]=s._area),n.apis[s._ns+s._id]||(n.apis[s._ns+s._id]=s),s},storeAPI:{area:function(e,t){var i=this[e];return i&&i.area||(i=n.Store(e,t,this._ns),this[e]||(this[e]=i)),i},namespace:function(e,t,i){if(i=i||this._delim||n.nsdelim,!e)return this._ns?this._ns.substring(0,this._ns.length-i.length):"";var s=e,o=this[s];if(!(o&&o.namespace||((o=n.Store(this._id,this._area,this._ns+s+i))._delim=i,this[s]||(this[s]=o),t)))for(var a in n.areas)o.area(a,n.areas[a]);return o},isFake:function(e){return e?(this._real=this._area,this._area=n.storage("fake")):!1===e&&(this._area=this._real||this._area),"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(e){return this._area.has?this._area.has(this._in(e)):!!(this._in(e)in this._area)},size:function(){return this.keys().length},each:function(e,t){for(var i=0,s=n.length(this._area);i<s;i++){var o=this._out(n.key(this._area,i));if(void 0!==o&&!1===e.call(this,o,this.get(o),t))break;s>n.length(this._area)&&(s--,i--)}return t||this},keys:function(e){return this.each(function(e,t,n){n.push(e)},e||[])},get:function(e,t){var i,s=n.get(this._area,this._in(e));return"function"==typeof t&&(i=t,t=null),null!==s?n.parse(s,i):null!=t?t:s},getAll:function(e){return this.each(function(e,t,n){n[e]=t},e||{})},transact:function(e,t,n){var i=this.get(e,n),s=t(i);return this.set(e,void 0===s?i:s),this},set:function(e,t,i){var s,o=this.get(e);return null!=o&&!1===i?t:("function"==typeof i&&(s=i,i=void 0),n.set(this._area,this._in(e),n.stringify(t,s),i)||o)},setAll:function(e,t){var n,i;for(var s in e)i=e[s],this.set(s,i,t)!==i&&(n=!0);return n},add:function(e,t,i){var s=this.get(e);if(s instanceof Array)t=s.concat(t);else if(null!==s){var o=typeof s;if(o===typeof t&&"object"===o){for(var a in t)s[a]=t[a];t=s}else t=s+t}return n.set(this._area,this._in(e),n.stringify(t,i)),t},remove:function(e,t){var i=this.get(e,t);return n.remove(this._area,this._in(e)),i},clear:function(){return this._ns?this.each(function(e){n.remove(this._area,this._in(e))},1):n.clear(this._area),this},clearAll:function(){var e=this._area;for(var t in n.areas)n.areas.hasOwnProperty(t)&&(this._area=n.areas[t],this.clear());return this._area=e,this},_in:function(e){return"string"!=typeof e&&(e=n.stringify(e)),this._ns?this._ns+e:e},_out:function(e){return this._ns?e&&0===e.indexOf(this._ns)?e.substring(this._ns.length):void 0:e}},storage:function(e){return n.inherit(n.storageAPI,{items:{},name:e})},storageAPI:{length:0,has:function(e){return this.items.hasOwnProperty(e)},key:function(e){var t=0;for(var n in this.items)if(this.has(n)&&e===t++)return n},setItem:function(e,t){this.has(e)||this.length++,this.items[e]=t},removeItem:function(e){this.has(e)&&(delete this.items[e],this.length--)},getItem:function(e){return this.has(e)?this.items[e]:null},clear:function(){for(var e in this.items)this.removeItem(e)}}},i=n.Store("local",function(){try{return localStorage}catch(e){}}());i.local=i,i._=n,i.area("session",function(){try{return sessionStorage}catch(e){}}()),i.area("page",n.storage("page")),"function"==typeof t&&void 0!==t.amd?t("store2",[],function(){return i}):$c.exports?$c.exports=i:(e.store&&(n.conflict=e.store),e.store=i)}(n,n&&n.define);var qc=i(zc.exports);const Uc=qc.page.namespace("taskStore"),Hc=e=>{var t;let n=!0;const i=e.storyOption?e.storyOption.toLowerCase():"";if("true"===i||"false"===i)n=function(e,t=!1){if(null==e)return t;return"true"===e.trim().toLowerCase()}(i);else if("grade-based"===i&&e.userMetadata.grade){const t=Number(e.userMetadata.grade);n=Number.isNaN(t)||t<5}const s=e.heavyInstructions||e.userMetadata.age<=4;Uc({itemSelect:"mfi",trialNumSubtask:0,testTrialCount:0,totalTrialCount:0,numIncorrect:0,totalCorrect:0,correctItems:[],audioFeedback:e.audioFeedback,skipInstructions:e.skipInstructions,corpusId:e.corpusId,corpus:e.corpus,buttonLayout:e.buttonLayout,task:e.task,maxIncorrect:e.maxIncorrect,keyHelpers:e.keyHelpers,runCat:e.cat,heavyInstructions:s&&JO(e.language),semThreshold:e.semThreshold,startingTheta:e.startingTheta,storeItemId:e.storeItemId,isRoarApp:e.isRoarApp,numOfBlocks:e.userMetadata.age>4?9:4,blockSize:e.userMetadata.age>4?30:50,stimulusBlocks:e.stimulusBlocks,gridSize:e.userMetadata.age>4?3:2,maxTimeReached:!1,taskComplete:!1,stimulus:"heart",stimulusSide:"left",stimulusPosition:0,isCorrect:!1,inferenceNumStories:e.inferenceNumStories,numberOfStories:e.numberOfStories,testPhase:!1,story:n,maxTime:e.maxTime,demoMode:e.demoMode,experimenterButtons:e.experimenterButtons&&s,debug:e.debug,version:e.version||1,currentStoryGroup:0,taskTimer:null,taskTimerPausedMs:0,taskTimerPauseBeganAt:null,isPaused:!1,previousItem:void 0,previousAnswer:void 0,nextStimulus:void 0,scoringVersion:e.scoringVersion,irtEstimates:{},randomSeed:null!==(t=e.randomSeed)&&void 0!==t?t:null})},Vc={audio:"levante-assets-dev/audio",visual:"levante-assets-dev/visual",corpus:"levante-assets-dev/corpus",translations:"levante-assets-dev/translations"},Kc={audio:"levante-assets-prod/audio",visual:"levante-assets-prod/visual",corpus:"levante-assets-prod/corpus",translations:"levante-assets-prod/translations"},Wc={intro:"intro-levante",vocab:"vocab-test",memoryGame:"roar-memory-game",roarInference:"roar-inference",adultReasoning:"egma-math",heartsAndFlowers:"roar-hearts-and-flowers",egmaMath:"egma-math",matrixReasoning:"matrix-reasoning",sameDifferentSelection:"same-different-selection",trog:"roar-syntax",mentalRotation:"mental-rotation",theoryOfMind:"theory-of-mind",shared:"levante-tasks-shared-prod"};function Gc(e,t,n,i,s){if(s)return`roar-levante-tasks/${n}/${"audio"===n?i:e}`;return`${t||"hostile-attribution"===e?Vc[n]:Kc[n]}/${"audio"===n?i:e}`}const Yc=()=>{const{task:e,scoringVersion:t,isRoarApp:n}=Uc(),i=Hr[e];return Boolean(n&&(null==i?void 0:i[t]))};let Jc=0,Zc=0,Xc=[],Qc=[];function el(e){if("math"===e.task&&e.trial_type.includes("Number Line")){return e.item.split(",").map(e=>Br(e))}return e.item}const tl=(e,t,n)=>{const i=[];if(e.forEach(e=>{var t,n,s;e.block_threshold&&!i.includes(e.block_threshold)&&i.push(e.block_threshold);const o={source:e.source,block_index:parseInt(e.block_index),task:e.task,prompt:e.prompt,item:el(e),origItemNum:e.orig_item_num,trialType:e.trial_type,image:(null===(t=null==e?void 0:e.image)||void 0===t?void 0:t.includes(","))?e.image.replace(" ","").split(","):null==e?void 0:e.image,timeLimit:e.time_limit,answer:Br(e.answer)||e.answer,assessmentStage:e.assessment_stage,chanceLevel:Br(e.chance_level),itemId:e.item_id,itemUid:e.item_uid,distractors:"roar-inference"===e.task?e.response_alternatives.split(",").map(e=>e.replace(/"/g,"")):"child-survey"===e.task?function(){const e=Uc().translations;return(e.childSurveyRespoonses||e.childSurveyResponses).split(";")}():(a=e.response_alternatives,/[a-zA-Z\/]/.test(a)||"adult-reasoning"===e.task&&e.response_alternatives.includes(";")?e.response_alternatives.split(","):function(e){const t=e.trim();return""===t?[]:t.split(",").map(e=>parseFloat(e))}(e.response_alternatives)),audioFile:(null===(n=e.audio_file)||void 0===n?void 0:n.includes(","))?e.audio_file.split(","):e.audio_file,difficulty:Uc().runCat?parseFloat(e.d||e.difficulty):NaN,randomize:e.randomize,trialNumber:e.trial_num,downex:"TRUE"===(null===(s=e.downex)||void 0===s?void 0:s.toUpperCase()),storyGroup:Br(e.story_group)};var a;if("same-different-selection"===e.task&&(o.requiredSelections=Br(e.required_selections)),"Mental Rotation"===e.task&&(o.item=_r(o.item),o.answer=_r(o.answer),o.distractors=o.distractors.map(e=>_r(e))),"same-different-selection"===e.task&&(o.requiredSelections=parseInt(e.required_selections)),o.trialType,Yc()){const t=Object.fromEntries(Object.entries(e).filter(([e])=>e.includes(".")));Object.assign(o,t)}o.downex?(Qc.push(o),Zc+=1):(Xc.push(o),Jc+=1)}),Uc("blockThresholds",i.sort((e,t)=>e-t)),"roar-inference"===n&&!Uc().scoringVersion){const e=Uc().inferenceNumStories,t=Uc().stimulusBlocks;return void(Xc=function(e,t,n,i,s){const o=[],a={};e.forEach(e=>{const t=e[n];t in a||i.includes(t)||(a[t]=!0)});const r=Object.keys(a),c=Bc(r);for(let i=0;i<t;i+=1){const t=c[i],a=e.filter(e=>e[n]===t);if(1===s){const e=Bc(a)[0];e&&o.push({...e,itemId:`${e.itemId}_1`})}else{const e=a.filter(e=>"literal"===e.trialType),t=a.filter(e=>"literal"!==e.trialType),n=[];e.length>0&&n.push(e[0]);const i=Bc(t.concat(e.slice(1))),r=s-n.length;n.push(...i.slice(0,r));const c=Bc(n);for(let e=0;e<s;e+=1)c[e]&&o.push({...c[e],itemId:`${c[e].itemId}_${e+1}`})}}return[...e.filter(e=>i.includes(e[n])),...o]}(Xc,e,"itemId",["introduction","practice"],t))}t||(Xc=_c(Xc),Qc.length>0&&(Qc=_c(Qc)))},nl=async(e,t)=>{var n;const{corpus:i,task:s,sequentialStimulus:o}=e;let a=`https://storage.googleapis.com/${Gc(s,t,"corpus")}/${i}.csv?alt=media`;if("roar-inference"===s){const t=(null!==(n=e.language)&&void 0!==n?n:"en").split("-")[0];a=`https://storage.googleapis.com/roar-inference/${t}/corpora/${i}.csv`}else"trog"===s&&(a=`https://storage.googleapis.com/roar-syntax/shared/corpora/${i}.csv`);async function r(e){const t=e.map((e,t)=>function(e){return new Promise((t,n)=>{Er.parse(e,{download:!0,header:!0,skipEmptyLines:!0,complete:function(e){tl(e.data,o,s),t(e.data)},error:function(e){n(e)}})})}(e));return Promise.all(t)}await async function(){const e=[a];try{await r(e),Uc("totalTrials",Jc),Uc("totalDownexTrials",Zc)}catch(e){console.error("Error:",e)}}();Uc("corpora",{stimulus:Xc,downex:Qc})};let il={};const sl=async(e,t,n)=>{async function i(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch translations (${t.status}): ${e}`);const n=await t.json();return function(e){for(const[t,n]of Object.entries(e))il[_r(t.trim())]=n}(n),n}"adult-reasoning"===t&&(t="egma-math"),await async function(){const s=[`https://storage.googleapis.com/levante-assets-${e?"dev":"prod"}/translations/itembank/general/${n}/item-bank-translations.json`];"hearts-and-flowers"===t&&Uc().isRoarApp?"hearts-and-flowers"===t&&Uc().isRoarApp&&s.push(`https://storage.googleapis.com/roar-levante-tasks/translations/itembank/hearts-and-flowers/${n}/item-bank-translations.json`):s.push(`https://storage.googleapis.com/levante-assets-${e?"dev":"prod"}/translations/itembank/${t}/${n}/item-bank-translations.json`),"hostile-attribution"===t&&s.push(`https://storage.googleapis.com/levante-assets-${e?"dev":"prod"}/translations/itembank/theory-of-mind/${n}/item-bank-translations.json`);try{await async function(e){return Promise.all(e.map(e=>i(e)))}("intro"===t?[s[0]]:s),Uc("translations",il)}catch(e){console.error("Error:",e)}}()};function ol(e,t){const n=t.split("-")[0].toLowerCase();e.forEach(e=>{il[_r(e.item_id)]=function(e,t,n){const i=e[t.toLowerCase()],s=Object.keys(e).find(e=>e.includes(n))||"";return i||e[n]||e[s]||e.en}(e,t,n)}),Uc("translations",il)}const al=async e=>{async function t(t){const n=t.map(t=>function(t){return new Promise((n,i)=>{Er.parse(t,{download:!0,header:!0,skipEmptyLines:!0,complete:function(t){ol(t.data,e||""),n(t.data)},error:function(e){i(e)}})})}(t));return Promise.all(n)}e&&await async function(){const e=["https://storage.googleapis.com/road-dashboard/item-bank-translations.csv"];try{await t(e)}catch(e){console.error("Error:",e)}}()},rl=()=>{let e="";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let n=0;n<16;n+=1)e+=t.charAt(Math.floor(62*Math.random()));return e};function cl(e,t,n,i){return new(n||(n=Promise))(function(s,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function r(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,r)}c((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;var ll="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ul(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pl=(e,{include:t,exclude:n}={})=>{const i=e=>{const i=t=>"string"==typeof t?e===t:t.test(e);return t?t.some(i):!n||!n.some(i)};for(const[t,n]of(e=>{const t=new Set;do{for(const n of Reflect.ownKeys(e))t.add([e,n])}while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return t})(e.constructor.prototype)){if("constructor"===n||!i(n))continue;const s=Reflect.getOwnPropertyDescriptor(t,n);s&&"function"==typeof s.value&&(e[n]=e[n].bind(e))}return e},dl=ul(pl);class ml extends Error{constructor(e="The global `jsPsych` variable is no longer available in jsPsych v7."){super(`${e} Please follow the migration guide at https://www.jspsych.org/7.0/support/migration-v7/ to update your experiment.`),this.name="MigrationError"}}function hl(e){return[...new Set(e)]}function fl(e){if(!e)return e;let t;if(Array.isArray(e)){t=[];for(const n of e)t.push(fl(n));return t}if("object"==typeof e&&null!==e){t={};for(const n in e)e.hasOwnProperty(n)&&(t[n]=fl(e[n]));return t}return e}window.jsPsych={get init(){throw new ml("`jsPsych.init()` was replaced by `initJsPsych()` in jsPsych v7.")},get data(){throw new ml},get randomization(){throw new ml},get turk(){throw new ml},get pluginAPI(){throw new ml},get ALL_KEYS(){throw new ml('jsPsych.ALL_KEYS was replaced by the "ALL_KEYS" string in jsPsych v7.')},get NO_KEYS(){throw new ml('jsPsych.NO_KEYS was replaced by the "NO_KEYS" string in jsPsych v7.')}};var gl,vl=Object.freeze({__proto__:null,deepCopy:fl,deepMerge:function e(t,n){let i={};for(const s in t)t.hasOwnProperty(s)&&("object"==typeof t[s]&&n.hasOwnProperty(s)?i[s]=e(t[s],n[s]):i[s]=t[s]);for(const t in n)n.hasOwnProperty(t)&&(i.hasOwnProperty(t)&&"object"==typeof n[t]?i[t]=e(i[t],n[t]):i[t]=n[t]);return i},unique:hl});class yl{constructor(e=[]){this.values=e}sum(){let e=0;for(const t of this.values)e+=t;return e}mean(){return this.sum()/this.count()}median(){if(0===this.values.length)return;const e=this.values.slice(0).sort(function(e,t){return e-t}),t=Math.floor(e.length/2);return e.length%2==0?(e[t]+e[t-1])/2:e[t]}min(){return Math.min.apply(null,this.values)}max(){return Math.max.apply(null,this.values)}count(){return this.values.length}variance(){const e=this.mean();let t=0;for(const n of this.values)t+=Math.pow(n-e,2);return t/(this.values.length-1)}sd(){const e=this.variance();return Math.sqrt(e)}frequencies(){const e={};for(const t of this.values)void 0===e[t]?e[t]=1:e[t]++;return e}all(e){for(const t of this.values)if(!e(t))return!1;return!0}subset(e){const t=[];for(const n of this.values)e(n)&&t.push(n);return new yl(t)}}class bl{constructor(e=[]){this.trials=e}push(e){return this.trials.push(e),this}join(e){return this.trials=this.trials.concat(e.values()),this}top(){return this.trials.length<=1?this:new bl([this.trials[this.trials.length-1]])}first(e=1){if(e<1)throw"You must query with a positive nonzero integer. Please use a\n different value for n.";return 0===this.trials.length?new bl:(e>this.trials.length&&(e=this.trials.length),new bl(this.trials.slice(0,e)))}last(e=1){if(e<1)throw"You must query with a positive nonzero integer. Please use a\n different value for n.";return 0===this.trials.length?new bl:(e>this.trials.length&&(e=this.trials.length),new bl(this.trials.slice(this.trials.length-e,this.trials.length)))}values(){return this.trials}count(){return this.trials.length}readOnly(){return new bl(fl(this.trials))}addToAll(e){for(const t of this.trials)Object.assign(t,e);return this}addToLast(e){return 0!=this.trials.length&&Object.assign(this.trials[this.trials.length-1],e),this}filter(e){let t;t=Array.isArray(e)?fl(e):fl([e]);const n=[];for(const e of this.trials){let i=!1;for(const n of t){let t=!0;for(const i of Object.keys(n))void 0!==e[i]&&e[i]===n[i]||(t=!1);if(t){i=!0;break}}i&&n.push(e)}return new bl(n)}filterCustom(e){return new bl(this.trials.filter(e))}filterColumns(e){return new bl(this.trials.map(t=>Object.fromEntries(e.filter(e=>e in t).map(e=>[e,t[e]]))))}select(e){const t=[];for(const n of this.trials)void 0!==n[e]&&t.push(n[e]);return new yl(t)}ignore(e){Array.isArray(e)||(e=[e]);const t=fl(this.trials);for(const n of t)for(const t of e)delete n[t];return new bl(t)}uniqueNames(){const e=[];for(const t of this.trials)for(const n of Object.keys(t))e.includes(n)||e.push(n);return e}csv(){return function(e){const t="object"!=typeof e?JSON.parse(e):e;let n="",i="";const s=[];for(const e of t)for(const t in e){let e=t+"";e='"'+e.replace(/"/g,'""')+'",',s.includes(t)||(s.push(t),n+=e)}n=n.slice(0,-1),i+=n+"\r\n";for(const e of t){n="";for(const t of s){let i=void 0===e[t]?"":e[t];"object"==typeof i&&(i=JSON.stringify(i)),n+='"'+(i+"").replace(/"/g,'""')+'",'}n=n.slice(0,-1),i+=n+"\r\n"}return i}(this.trials)}json(e=!1){return e?JSON.stringify(this.trials,null,"\t"):JSON.stringify(this.trials)}localSave(e,t){let n;if("json"===(e=e.toLowerCase()))n=this.json();else{if("csv"!==e)throw new Error('Invalid format specified for localSave. Must be "json" or "csv".');n=this.csv()}!function(e,t){const n=new Blob([e],{type:"text/plain"});let i="";i=void 0!==window.webkitURL?window.webkitURL.createObjectURL(n):window.URL.createObjectURL(n);const s=document.createElement("a");s.id="jspsych-download-as-text-link",s.style.display="none",s.download=t,s.href=i,s.click()}(n,t)}}class xl{constructor(e){this.jsPsych=e,this.dataProperties={},this.reset()}reset(){this.allData=new bl,this.interactionData=new bl}get(){return this.allData}getInteractionData(){return this.interactionData}write(e){const t=this.jsPsych.getProgress(),n=this.jsPsych.getCurrentTrial(),i={trial_type:n.type.info.name,trial_index:t.current_trial_global,time_elapsed:this.jsPsych.getTotalTime(),internal_node_id:this.jsPsych.getCurrentTimelineNodeID()};this.allData.push(Object.assign(Object.assign(Object.assign(Object.assign({},e),n.data),i),this.dataProperties))}addProperties(e){this.allData.addToAll(e),this.dataProperties=Object.assign({},this.dataProperties,e)}addDataToLastTrial(e){this.allData.addToLast(e)}getDataByTimelineNode(e){return this.allData.filterCustom(t=>t.internal_node_id.slice(0,e.length)===e)}getLastTrialData(){return this.allData.top()}getLastTimelineData(){const e=this.getLastTrialData().select("internal_node_id").values[0];if(void 0===e)return new bl;{const t=e.substr(0,e.lastIndexOf("-"));return this.getDataByTimelineNode(t)}}displayData(e="json"){"json"!=(e=e.toLowerCase())&&"csv"!=e&&(console.log("Invalid format declared for displayData function. Using json as default."),e="json");const t="json"===e?this.allData.json(!0):this.allData.csv();this.jsPsych.getDisplayElement().innerHTML='<pre id="jspsych-data-display"></pre>',document.getElementById("jspsych-data-display").textContent=t}urlVariables(){return void 0===this.query_string&&(this.query_string=function(){const e=window.location.search.substr(1).split("&"),t={};for(let n=0;n<e.length;++n){const i=e[n].split("=",2);1==i.length?t[i[0]]="":t[i[0]]=decodeURIComponent(i[1].replace(/\+/g," "))}return t}()),this.query_string}getURLVariable(e){return this.urlVariables()[e]}createInteractionListeners(){window.addEventListener("blur",()=>{const e={event:"blur",trial:this.jsPsych.getProgress().current_trial_global,time:this.jsPsych.getTotalTime()};this.interactionData.push(e),this.jsPsych.getInitSettings().on_interaction_data_update(e)}),window.addEventListener("focus",()=>{const e={event:"focus",trial:this.jsPsych.getProgress().current_trial_global,time:this.jsPsych.getTotalTime()};this.interactionData.push(e),this.jsPsych.getInitSettings().on_interaction_data_update(e)});const e=()=>{const e={event:document.isFullScreen||document.webkitIsFullScreen||document.mozIsFullScreen||document.fullscreenElement?"fullscreenenter":"fullscreenexit",trial:this.jsPsych.getProgress().current_trial_global,time:this.jsPsych.getTotalTime()};this.interactionData.push(e),this.jsPsych.getInitSettings().on_interaction_data_update(e)};document.addEventListener("fullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("webkitfullscreenchange",e)}_customInsert(e){this.allData=new bl(e)}_fullreset(){this.reset(),this.dataProperties={}}}class _l{constructor(){this.hardwareConnected=!1,document.addEventListener("jspsych-activate",e=>{this.hardwareConnected=!0})}hardware(e){const t=new CustomEvent("jspsych",{detail:e});document.dispatchEvent(t)}}class wl{constructor(e,t=!1,n=0){this.getRootElement=e,this.areResponsesCaseSensitive=t,this.minimumValidRt=n,this.listeners=new Set,this.heldKeys=new Set,this.areRootListenersRegistered=!1,dl(this),this.registerRootListeners()}registerRootListeners(){if(!this.areRootListenersRegistered){const e=this.getRootElement();e&&(e.addEventListener("keydown",this.rootKeydownListener),e.addEventListener("keyup",this.rootKeyupListener),this.areRootListenersRegistered=!0)}}rootKeydownListener(e){for(const t of Array.from(this.listeners))t(e);this.heldKeys.add(this.toLowerCaseIfInsensitive(e.key))}toLowerCaseIfInsensitive(e){return this.areResponsesCaseSensitive?e:e.toLowerCase()}rootKeyupListener(e){this.heldKeys.delete(this.toLowerCaseIfInsensitive(e.key))}isResponseValid(e,t,n){return!(!t&&this.heldKeys.has(n))&&("ALL_KEYS"===e||"NO_KEYS"!==e&&e.includes(n))}getKeyboardResponse({callback_function:e,valid_responses:t="ALL_KEYS",rt_method:n="performance",persist:i,audio_context:s,audio_context_start_time:o,allow_held_key:a=!1,minimum_valid_rt:r=this.minimumValidRt}){"performance"!==n&&"audio"!==n&&(console.log('Invalid RT method specified in getKeyboardResponse. Defaulting to "performance" method.'),n="performance");const c="performance"===n?performance.now():1e3*o;this.registerRootListeners(),this.areResponsesCaseSensitive||"string"==typeof t||(t=t.map(e=>e.toLowerCase()));const l=o=>{const u=Math.round(("performance"==n?performance.now():1e3*s.currentTime)-c);if(u<r)return;const p=this.toLowerCaseIfInsensitive(o.key);this.isResponseValid(t,a,p)&&(o.preventDefault(),i||this.cancelKeyboardResponse(l),e({key:p,rt:u}))};return this.listeners.add(l),l}cancelKeyboardResponse(e){this.listeners.delete(e)}cancelAllKeyboardResponses(){this.listeners.clear()}compareKeys(e,t){if(!("string"!=typeof e&&null!==e||"string"!=typeof t&&null!==t))return"string"==typeof e&&"string"==typeof t?this.areResponsesCaseSensitive?e===t:e.toLowerCase()===t.toLowerCase():null===e&&null===t;console.error("Error in jsPsych.pluginAPI.compareKeys: arguments must be key strings or null.")}}!function(e){e[e.BOOL=0]="BOOL",e[e.STRING=1]="STRING",e[e.INT=2]="INT",e[e.FLOAT=3]="FLOAT",e[e.FUNCTION=4]="FUNCTION",e[e.KEY=5]="KEY",e[e.KEYS=6]="KEYS",e[e.SELECT=7]="SELECT",e[e.HTML_STRING=8]="HTML_STRING",e[e.IMAGE=9]="IMAGE",e[e.AUDIO=10]="AUDIO",e[e.VIDEO=11]="VIDEO",e[e.OBJECT=12]="OBJECT",e[e.COMPLEX=13]="COMPLEX",e[e.TIMELINE=14]="TIMELINE"}(gl||(gl={}));const kl={data:{type:gl.OBJECT,pretty_name:"Data",default:{}},on_start:{type:gl.FUNCTION,pretty_name:"On start",default:function(){}},on_finish:{type:gl.FUNCTION,pretty_name:"On finish",default:function(){}},on_load:{type:gl.FUNCTION,pretty_name:"On load",default:function(){}},post_trial_gap:{type:gl.INT,pretty_name:"Post trial gap",default:null},css_classes:{type:gl.STRING,pretty_name:"Custom CSS classes",default:null},simulation_options:{type:gl.COMPLEX,default:null}},Sl=[gl.AUDIO,gl.IMAGE,gl.VIDEO];class Tl{constructor(e,t){this.useWebaudio=e,this.webaudioContext=t,this.video_buffers={},this.context=null,this.audio_buffers=[],this.preload_requests=[],this.img_cache={},this.preloadMap=new Map,this.microphone_recorder=null,this.camera_stream=null,this.camera_recorder=null}getVideoBuffer(e){return e.startsWith("blob:")&&(this.video_buffers[e]=e),this.video_buffers[e]}initAudio(){this.context=this.useWebaudio?this.webaudioContext:null}audioContext(){return null!==this.context&&"running"!==this.context.state&&this.context.resume(),this.context}getAudioBuffer(e){return new Promise((t,n)=>{void 0===this.audio_buffers[e]||"tmp"==this.audio_buffers[e]?this.preloadAudio([e],()=>{t(this.audio_buffers[e])},()=>{},e=>{n(e.error)}):t(this.audio_buffers[e])})}preloadAudio(e,t=()=>{},n=e=>{},i=e=>{}){e=hl(e.flat());let s=0;if(0==e.length)return void t();const o=(o,a=1)=>{const r=new XMLHttpRequest;r.open("GET",o,!0),r.responseType="arraybuffer",r.onload=()=>{this.context.decodeAudioData(r.response,i=>{this.audio_buffers[o]=i,s++,n(o),s==e.length&&t()},e=>{i({source:o,error:e})})},r.onerror=e=>{let t=e;404==r.status&&(t="404"),i({source:o,error:t})},r.onloadend=e=>{404==r.status&&i({source:o,error:"404"})},r.send(),this.preload_requests.push(r)},a=(o,a=1)=>{const r=new Audio,c=()=>{this.audio_buffers[o]=r,s++,n(o),s==e.length&&t(),r.removeEventListener("canplaythrough",c)};r.addEventListener("canplaythrough",c),r.addEventListener("error",function e(t){i({source:r.src,error:t}),r.removeEventListener("error",e)}),r.addEventListener("abort",function e(t){i({source:r.src,error:t}),r.removeEventListener("abort",e)}),r.src=o,this.preload_requests.push(r)};for(const i of e)void 0!==this.audio_buffers[i]?(s++,n(i),s==e.length&&t()):(this.audio_buffers[i]="tmp",null!==this.audioContext()?o(i):a(i))}preloadImages(e,t=()=>{},n=e=>{},i=e=>{}){e=hl(e.flat());var s=0;if(0!==e.length)for(let o=0;o<e.length;o++){const a=new Image,r=e[o];a.onload=()=>{s++,n(r),s===e.length&&t()},a.onerror=e=>{i({source:r,error:e})},a.src=r,this.img_cache[r]=a,this.preload_requests.push(a)}else t()}preloadVideo(e,t=()=>{},n=e=>{},i=e=>{}){e=hl(e.flat());let s=0;if(0!==e.length)for(const o of e){const a=this.video_buffers,r=new XMLHttpRequest;r.open("GET",o,!0),r.responseType="blob",r.onload=()=>{if(200===r.status||0===r.status){const i=r.response;a[o]=URL.createObjectURL(i),s++,n(o),s===e.length&&t()}},r.onerror=e=>{let t=e;404==r.status&&(t="404"),i({source:o,error:t})},r.onloadend=e=>{404==r.status&&i({source:o,error:"404"})},r.send(),this.preload_requests.push(r)}else t()}getAutoPreloadList(e){const t=Object.fromEntries(Sl.map(e=>[e,new Set])),n=(e,i)=>{var s,o,a,r;if(void 0!==e.timeline)for(const t of e.timeline)n(t,null!==(s=e.type)&&void 0!==s?s:i);else if(null===(a=null!==(o=e.type)&&void 0!==o?o:i)||void 0===a?void 0:a.info){const{name:n,parameters:s}=(null!==(r=e.type)&&void 0!==r?r:i).info;this.preloadMap.has(n)||this.preloadMap.set(n,Object.fromEntries(Object.entries(s).filter(([e,{type:t,preload:n}])=>Sl.includes(t)&&(null==n||n)).map(([e,{type:t}])=>[e,t])));for(const[i,s]of Object.entries(this.preloadMap.get(n))){const n=e[i],o=t[s];if("string"==typeof n)o.add(n);else if(Array.isArray(n))for(const e of n.flat())"string"==typeof e&&o.add(e)}}};return n({timeline:e}),{images:[...t[gl.IMAGE]],audio:[...t[gl.AUDIO]],video:[...t[gl.VIDEO]]}}cancelPreloads(){for(const e of this.preload_requests)e.onload=()=>{},e.onerror=()=>{},e.oncanplaythrough=()=>{},e.onabort=()=>{};this.preload_requests=[]}initializeMicrophoneRecorder(e){const t=new MediaRecorder(e);this.microphone_recorder=t}getMicrophoneRecorder(){return this.microphone_recorder}initializeCameraRecorder(e,t){this.camera_stream=e;const n=new MediaRecorder(e,t);this.camera_recorder=n}getCameraStream(){return this.camera_stream}getCameraRecorder(){return this.camera_recorder}}class El{constructor(e,t){this.getDisplayContainerElement=e,this.setJsPsychTimeout=t}dispatchEvent(e){this.getDisplayContainerElement().dispatchEvent(e)}keyDown(e){this.dispatchEvent(new KeyboardEvent("keydown",{key:e}))}keyUp(e){this.dispatchEvent(new KeyboardEvent("keyup",{key:e}))}pressKey(e,t=0){t>0?this.setJsPsychTimeout(()=>{this.keyDown(e),this.keyUp(e)},t):(this.keyDown(e),this.keyUp(e))}clickTarget(e,t=0){t>0?this.setJsPsychTimeout(()=>{e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0}))},t):(e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0})))}fillTextInput(e,t,n=0){n>0?this.setJsPsychTimeout(()=>{e.value=t},n):e.value=t}getValidKey(e){const t=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"," "];let n;if("NO_KEYS"==e)n=null;else if("ALL_KEYS"==e)n=t[Math.floor(Math.random()*t.length)];else{const t=e.flat();n=t[Math.floor(Math.random()*t.length)]}return n}mergeSimulationData(e,t){return Object.assign(Object.assign({},e),null==t?void 0:t.data)}ensureSimulationDataConsistency(e,t){if(t.rt&&(t.rt=Math.round(t.rt)),e.trial_duration&&t.rt&&t.rt>e.trial_duration&&(t.rt=null,t.response&&(t.response=null),t.correct&&(t.correct=!1)),e.choices&&"NO_KEYS"==e.choices&&(t.rt&&(t.rt=null),t.response&&(t.response=null)),e.allow_response_before_complete&&e.sequence_reps&&e.frame_time){const n=e.sequence_reps*e.frame_time*e.stimuli.length;t.rt<n&&(t.rt=null,t.response=null)}}}class Cl{constructor(){this.timeout_handlers=[]}setTimeout(e,t){const n=window.setTimeout(e,t);return this.timeout_handlers.push(n),n}clearAllTimeouts(){for(const e of this.timeout_handlers)clearTimeout(e);this.timeout_handlers=[]}}var Il={exports:{}};!function(e,t,n){function i(e){var t=this,n=function(){var e=4022871197,t=function(t){t=String(t);for(var n=0;n<t.length;n++){var i=.02519603282416938*(e+=t.charCodeAt(n));i-=e=i>>>0,e=(i*=e)>>>0,e+=4294967296*(i-=e)}return 2.3283064365386963e-10*(e>>>0)};return t}();t.next=function(){var e=2091639*t.s0+2.3283064365386963e-10*t.c;return t.s0=t.s1,t.s1=t.s2,t.s2=e-(t.c=0|e)},t.c=1,t.s0=n(" "),t.s1=n(" "),t.s2=n(" "),t.s0-=n(e),t.s0<0&&(t.s0+=1),t.s1-=n(e),t.s1<0&&(t.s1+=1),t.s2-=n(e),t.s2<0&&(t.s2+=1),n=null}function s(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function o(e,t){var n=new i(e),o=t&&t.state,a=n.next;return a.int32=function(){return 4294967296*n.next()|0},a.double=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.quick=a,o&&("object"==typeof o&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.alea=o}(0,Il,!1);var Ol=Il.exports,jl=ul(Ol),Al={exports:{}};!function(e,t,n){function i(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var i=0;i<n.length+64;i++)t.x^=0|n.charCodeAt(i),t.next()}function s(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function o(e,t){var n=new i(e),o=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,o&&("object"==typeof o&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.xor128=o}(0,Al,!1);var Ll=Al.exports,Pl={exports:{}};!function(e,t,n){function i(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var i=0;i<n.length+64;i++)t.x^=0|n.charCodeAt(i),i==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function s(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function o(e,t){var n=new i(e),o=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,o&&("object"==typeof o&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.xorwow=o}(0,Pl,!1);var Rl=Pl.exports,Ml={exports:{}};!function(e,t,n){function i(e){var t=this;t.next=function(){var e,n,i=t.x,s=t.i;return e=i[s],n=(e^=e>>>7)^e<<24,n^=(e=i[s+1&7])^e>>>10,n^=(e=i[s+3&7])^e>>>3,n^=(e=i[s+4&7])^e<<7,e=i[s+7&7],n^=(e^=e<<13)^e<<9,i[s]=n,t.i=s+1&7,n},function(e,t){var n,i=[];if(t===(0|t))i[0]=t;else for(t=""+t,n=0;n<t.length;++n)i[7&n]=i[7&n]<<15^t.charCodeAt(n)+i[n+1&7]<<13;for(;i.length<8;)i.push(0);for(n=0;n<8&&0===i[n];++n);for(8==n?i[7]=-1:i[n],e.x=i,e.i=0,n=256;n>0;--n)e.next()}(t,e)}function s(e,t){return t.x=e.x.slice(),t.i=e.i,t}function o(e,t){null==e&&(e=+new Date);var n=new i(e),o=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,o&&(o.x&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.xorshift7=o}(0,Ml,!1);var Nl=Ml.exports,Dl={exports:{}};!function(e,t,n){function i(e){var t=this;t.next=function(){var e,n,i=t.w,s=t.X,o=t.i;return t.w=i=i+1640531527|0,n=s[o+34&127],e=s[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=s[o]=n^e,t.i=o,n+(i^i>>>16)|0},function(e,t){var n,i,s,o,a,r=[],c=128;for(t===(0|t)?(i=t,t=null):(t+="\0",i=0,c=Math.max(c,t.length)),s=0,o=-32;o<c;++o)t&&(i^=t.charCodeAt((o+32)%t.length)),0===o&&(a=i),i^=i<<10,i^=i>>>15,i^=i<<4,i^=i>>>13,o>=0&&(a=a+1640531527|0,s=0==(n=r[127&o]^=i+a)?s+1:0);for(s>=128&&(r[127&(t&&t.length||0)]=-1),s=127,o=512;o>0;--o)i=r[s+34&127],n=r[s=s+1&127],i^=i<<13,n^=n<<17,i^=i>>>15,n^=n>>>12,r[s]=i^n;e.w=a,e.X=r,e.i=s}(t,e)}function s(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function o(e,t){null==e&&(e=+new Date);var n=new i(e),o=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,o&&(o.X&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.xor4096=o}(0,Dl,!1);var Fl=Dl.exports,Bl={exports:{}};!function(e,t,n){function i(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,i=t.d,s=t.a;return e=e<<25^e>>>7^n,n=n-i|0,i=i<<24^i>>>8^s,s=s-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-i|0,t.d=i<<16^n>>>16^s,t.a=s-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var i=0;i<n.length+20;i++)t.b^=0|n.charCodeAt(i),t.next()}function s(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function o(e,t){var n=new i(e),o=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,o&&("object"==typeof o&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.tychei=o}(0,Bl,!1);var $l=Bl.exports,zl={exports:{}};!function(e){!function(t,n,i){var s,o=256,a="random",r=i.pow(o,6),c=i.pow(2,52),l=2*c,u=255;function p(e,u,p){var v=[],y=f(h((u=1==u?{entropy:!0}:u||{}).entropy?[e,g(n)]:null==e?function(){try{var e;return s&&(e=s.randomBytes)?e=e(o):(e=new Uint8Array(o),(t.crypto||t.msCrypto).getRandomValues(e)),g(e)}catch(e){var i=t.navigator,a=i&&i.plugins;return[+new Date,t,a,t.screen,g(n)]}}():e,3),v),b=new d(v),x=function(){for(var e=b.g(6),t=r,n=0;e<c;)e=(e+n)*o,t*=o,n=b.g(1);for(;e>=l;)e/=2,t/=2,n>>>=1;return(e+n)/t};return x.int32=function(){return 0|b.g(4)},x.quick=function(){return b.g(4)/4294967296},x.double=x,f(g(b.S),n),(u.pass||p||function(e,t,n,s){return s&&(s.S&&m(s,b),e.state=function(){return m(b,{})}),n?(i[a]=e,t):e})(x,y,"global"in u?u.global:this==i,u.state)}function d(e){var t,n=e.length,i=this,s=0,a=i.i=i.j=0,r=i.S=[];for(n||(e=[n++]);s<o;)r[s]=s++;for(s=0;s<o;s++)r[s]=r[a=u&a+e[s%n]+(t=r[s])],r[a]=t;(i.g=function(e){for(var t,n=0,s=i.i,a=i.j,r=i.S;e--;)t=r[s=u&s+1],n=n*o+r[u&(r[s]=r[a=u&a+t])+(r[a]=t)];return i.i=s,i.j=a,n})(o)}function m(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function h(e,t){var n,i=[],s=typeof e;if(t&&"object"==s)for(n in e)try{i.push(h(e[n],t-1))}catch(e){}return i.length?i:"string"==s?e:e+"\0"}function f(e,t){for(var n,i=e+"",s=0;s<i.length;)t[u&s]=u&(n^=19*t[u&s])+i.charCodeAt(s++);return g(t)}function g(e){return String.fromCharCode.apply(0,e)}if(f(i.random(),n),e.exports){e.exports=p;try{s=require("crypto")}catch(e){}}else i["seed"+a]=p}("undefined"!=typeof self?self:ll,[],Math)}(zl);var ql=Ol,Ul=Ll,Hl=Rl,Vl=Nl,Kl=Fl,Wl=$l,Gl=zl.exports;Gl.alea=ql,Gl.xor128=Ul,Gl.xorwow=Hl,Gl.xorshift7=Vl,Gl.xor4096=Kl,Gl.tychei=Wl;var Yl=Gl,Jl=["ability","able","aboard","about","above","accept","accident","according","account","accurate","acres","across","act","action","active","activity","actual","actually","add","addition","additional","adjective","adult","adventure","advice","affect","afraid","after","afternoon","again","against","age","ago","agree","ahead","aid","air","airplane","alike","alive","all","allow","almost","alone","along","aloud","alphabet","already","also","although","am","among","amount","ancient","angle","angry","animal","announced","another","answer","ants","any","anybody","anyone","anything","anyway","anywhere","apart","apartment","appearance","apple","applied","appropriate","are","area","arm","army","around","arrange","arrangement","arrive","arrow","art","article","as","aside","ask","asleep","at","ate","atmosphere","atom","atomic","attached","attack","attempt","attention","audience","author","automobile","available","average","avoid","aware","away","baby","back","bad","badly","bag","balance","ball","balloon","band","bank","bar","bare","bark","barn","base","baseball","basic","basis","basket","bat","battle","be","bean","bear","beat","beautiful","beauty","became","because","become","becoming","bee","been","before","began","beginning","begun","behavior","behind","being","believed","bell","belong","below","belt","bend","beneath","bent","beside","best","bet","better","between","beyond","bicycle","bigger","biggest","bill","birds","birth","birthday","bit","bite","black","blank","blanket","blew","blind","block","blood","blow","blue","board","boat","body","bone","book","border","born","both","bottle","bottom","bound","bow","bowl","box","boy","brain","branch","brass","brave","bread","break","breakfast","breath","breathe","breathing","breeze","brick","bridge","brief","bright","bring","broad","broke","broken","brother","brought","brown","brush","buffalo","build","building","built","buried","burn","burst","bus","bush","business","busy","but","butter","buy","by","cabin","cage","cake","call","calm","came","camera","camp","can","canal","cannot","cap","capital","captain","captured","car","carbon","card","care","careful","carefully","carried","carry","case","cast","castle","cat","catch","cattle","caught","cause","cave","cell","cent","center","central","century","certain","certainly","chain","chair","chamber","chance","change","changing","chapter","character","characteristic","charge","chart","check","cheese","chemical","chest","chicken","chief","child","children","choice","choose","chose","chosen","church","circle","circus","citizen","city","class","classroom","claws","clay","clean","clear","clearly","climate","climb","clock","close","closely","closer","cloth","clothes","clothing","cloud","club","coach","coal","coast","coat","coffee","cold","collect","college","colony","color","column","combination","combine","come","comfortable","coming","command","common","community","company","compare","compass","complete","completely","complex","composed","composition","compound","concerned","condition","congress","connected","consider","consist","consonant","constantly","construction","contain","continent","continued","contrast","control","conversation","cook","cookies","cool","copper","copy","corn","corner","correct","correctly","cost","cotton","could","count","country","couple","courage","course","court","cover","cow","cowboy","crack","cream","create","creature","crew","crop","cross","crowd","cry","cup","curious","current","curve","customs","cut","cutting","daily","damage","dance","danger","dangerous","dark","darkness","date","daughter","dawn","day","dead","deal","dear","death","decide","declared","deep","deeply","deer","definition","degree","depend","depth","describe","desert","design","desk","detail","determine","develop","development","diagram","diameter","did","die","differ","difference","different","difficult","difficulty","dig","dinner","direct","direction","directly","dirt","dirty","disappear","discover","discovery","discuss","discussion","disease","dish","distance","distant","divide","division","do","doctor","does","dog","doing","doll","dollar","done","donkey","door","dot","double","doubt","down","dozen","draw","drawn","dream","dress","drew","dried","drink","drive","driven","driver","driving","drop","dropped","drove","dry","duck","due","dug","dull","during","dust","duty","each","eager","ear","earlier","early","earn","earth","easier","easily","east","easy","eat","eaten","edge","education","effect","effort","egg","eight","either","electric","electricity","element","elephant","eleven","else","empty","end","enemy","energy","engine","engineer","enjoy","enough","enter","entire","entirely","environment","equal","equally","equator","equipment","escape","especially","essential","establish","even","evening","event","eventually","ever","every","everybody","everyone","everything","everywhere","evidence","exact","exactly","examine","example","excellent","except","exchange","excited","excitement","exciting","exclaimed","exercise","exist","expect","experience","experiment","explain","explanation","explore","express","expression","extra","eye","face","facing","fact","factor","factory","failed","fair","fairly","fall","fallen","familiar","family","famous","far","farm","farmer","farther","fast","fastened","faster","fat","father","favorite","fear","feathers","feature","fed","feed","feel","feet","fell","fellow","felt","fence","few","fewer","field","fierce","fifteen","fifth","fifty","fight","fighting","figure","fill","film","final","finally","find","fine","finest","finger","finish","fire","fireplace","firm","first","fish","five","fix","flag","flame","flat","flew","flies","flight","floating","floor","flow","flower","fly","fog","folks","follow","food","foot","football","for","force","foreign","forest","forget","forgot","forgotten","form","former","fort","forth","forty","forward","fought","found","four","fourth","fox","frame","free","freedom","frequently","fresh","friend","friendly","frighten","frog","from","front","frozen","fruit","fuel","full","fully","fun","function","funny","fur","furniture","further","future","gain","game","garage","garden","gas","gasoline","gate","gather","gave","general","generally","gentle","gently","get","getting","giant","gift","girl","give","given","giving","glad","glass","globe","go","goes","gold","golden","gone","good","goose","got","government","grabbed","grade","gradually","grain","grandfather","grandmother","graph","grass","gravity","gray","great","greater","greatest","greatly","green","grew","ground","group","grow","grown","growth","guard","guess","guide","gulf","gun","habit","had","hair","half","halfway","hall","hand","handle","handsome","hang","happen","happened","happily","happy","harbor","hard","harder","hardly","has","hat","have","having","hay","he","headed","heading","health","heard","hearing","heart","heat","heavy","height","held","hello","help","helpful","her","herd","here","herself","hidden","hide","high","higher","highest","highway","hill","him","himself","his","history","hit","hold","hole","hollow","home","honor","hope","horn","horse","hospital","hot","hour","house","how","however","huge","human","hundred","hung","hungry","hunt","hunter","hurried","hurry","hurt","husband","ice","idea","identity","if","ill","image","imagine","immediately","importance","important","impossible","improve","in","inch","include","including","income","increase","indeed","independent","indicate","individual","industrial","industry","influence","information","inside","instance","instant","instead","instrument","interest","interior","into","introduced","invented","involved","iron","is","island","it","its","itself","jack","jar","jet","job","join","joined","journey","joy","judge","jump","jungle","just","keep","kept","key","kids","kill","kind","kitchen","knew","knife","know","knowledge","known","label","labor","lack","lady","laid","lake","lamp","land","language","large","larger","largest","last","late","later","laugh","law","lay","layers","lead","leader","leaf","learn","least","leather","leave","leaving","led","left","leg","length","lesson","let","letter","level","library","lie","life","lift","light","like","likely","limited","line","lion","lips","liquid","list","listen","little","live","living","load","local","locate","location","log","lonely","long","longer","look","loose","lose","loss","lost","lot","loud","love","lovely","low","lower","luck","lucky","lunch","lungs","lying","machine","machinery","mad","made","magic","magnet","mail","main","mainly","major","make","making","man","managed","manner","manufacturing","many","map","mark","market","married","mass","massage","master","material","mathematics","matter","may","maybe","me","meal","mean","means","meant","measure","meat","medicine","meet","melted","member","memory","men","mental","merely","met","metal","method","mice","middle","might","mighty","mile","military","milk","mill","mind","mine","minerals","minute","mirror","missing","mission","mistake","mix","mixture","model","modern","molecular","moment","money","monkey","month","mood","moon","more","morning","most","mostly","mother","motion","motor","mountain","mouse","mouth","move","movement","movie","moving","mud","muscle","music","musical","must","my","myself","mysterious","nails","name","nation","national","native","natural","naturally","nature","near","nearby","nearer","nearest","nearly","necessary","neck","needed","needle","needs","negative","neighbor","neighborhood","nervous","nest","never","new","news","newspaper","next","nice","night","nine","no","nobody","nodded","noise","none","noon","nor","north","nose","not","note","noted","nothing","notice","noun","now","number","numeral","nuts","object","observe","obtain","occasionally","occur","ocean","of","off","offer","office","officer","official","oil","old","older","oldest","on","once","one","only","onto","open","operation","opinion","opportunity","opposite","or","orange","orbit","order","ordinary","organization","organized","origin","original","other","ought","our","ourselves","out","outer","outline","outside","over","own","owner","oxygen","pack","package","page","paid","pain","paint","pair","palace","pale","pan","paper","paragraph","parallel","parent","park","part","particles","particular","particularly","partly","parts","party","pass","passage","past","path","pattern","pay","peace","pen","pencil","people","per","percent","perfect","perfectly","perhaps","period","person","personal","pet","phrase","physical","piano","pick","picture","pictured","pie","piece","pig","pile","pilot","pine","pink","pipe","pitch","place","plain","plan","plane","planet","planned","planning","plant","plastic","plate","plates","play","pleasant","please","pleasure","plenty","plural","plus","pocket","poem","poet","poetry","point","pole","police","policeman","political","pond","pony","pool","poor","popular","population","porch","port","position","positive","possible","possibly","post","pot","potatoes","pound","pour","powder","power","powerful","practical","practice","prepare","present","president","press","pressure","pretty","prevent","previous","price","pride","primitive","principal","principle","printed","private","prize","probably","problem","process","produce","product","production","program","progress","promised","proper","properly","property","protection","proud","prove","provide","public","pull","pupil","pure","purple","purpose","push","put","putting","quarter","queen","question","quick","quickly","quiet","quietly","quite","rabbit","race","radio","railroad","rain","raise","ran","ranch","range","rapidly","rate","rather","raw","rays","reach","read","reader","ready","real","realize","rear","reason","recall","receive","recent","recently","recognize","record","red","refer","refused","region","regular","related","relationship","religious","remain","remarkable","remember","remove","repeat","replace","replied","report","represent","require","research","respect","rest","result","return","review","rhyme","rhythm","rice","rich","ride","riding","right","ring","rise","rising","river","road","roar","rock","rocket","rocky","rod","roll","roof","room","root","rope","rose","rough","round","route","row","rubbed","rubber","rule","ruler","run","running","rush","sad","saddle","safe","safety","said","sail","sale","salmon","salt","same","sand","sang","sat","satellites","satisfied","save","saved","saw","say","scale","scared","scene","school","science","scientific","scientist","score","screen","sea","search","season","seat","second","secret","section","see","seed","seeing","seems","seen","seldom","select","selection","sell","send","sense","sent","sentence","separate","series","serious","serve","service","sets","setting","settle","settlers","seven","several","shade","shadow","shake","shaking","shall","shallow","shape","share","sharp","she","sheep","sheet","shelf","shells","shelter","shine","shinning","ship","shirt","shoe","shoot","shop","shore","short","shorter","shot","should","shoulder","shout","show","shown","shut","sick","sides","sight","sign","signal","silence","silent","silk","silly","silver","similar","simple","simplest","simply","since","sing","single","sink","sister","sit","sitting","situation","six","size","skill","skin","sky","slabs","slave","sleep","slept","slide","slight","slightly","slip","slipped","slope","slow","slowly","small","smaller","smallest","smell","smile","smoke","smooth","snake","snow","so","soap","social","society","soft","softly","soil","solar","sold","soldier","solid","solution","solve","some","somebody","somehow","someone","something","sometime","somewhere","son","song","soon","sort","sound","source","south","southern","space","speak","special","species","specific","speech","speed","spell","spend","spent","spider","spin","spirit","spite","split","spoken","sport","spread","spring","square","stage","stairs","stand","standard","star","stared","start","state","statement","station","stay","steady","steam","steel","steep","stems","step","stepped","stick","stiff","still","stock","stomach","stone","stood","stop","stopped","store","storm","story","stove","straight","strange","stranger","straw","stream","street","strength","stretch","strike","string","strip","strong","stronger","struck","structure","struggle","stuck","student","studied","studying","subject","substance","success","successful","such","sudden","suddenly","sugar","suggest","suit","sum","summer","sun","sunlight","supper","supply","support","suppose","sure","surface","surprise","surrounded","swam","sweet","swept","swim","swimming","swing","swung","syllable","symbol","system","table","tail","take","taken","tales","talk","tall","tank","tape","task","taste","taught","tax","tea","teach","teacher","team","tears","teeth","telephone","television","tell","temperature","ten","tent","term","terrible","test","than","thank","that","thee","them","themselves","then","theory","there","therefore","these","they","thick","thin","thing","think","third","thirty","this","those","thou","though","thought","thousand","thread","three","threw","throat","through","throughout","throw","thrown","thumb","thus","thy","tide","tie","tight","tightly","till","time","tin","tiny","tip","tired","title","to","tobacco","today","together","told","tomorrow","tone","tongue","tonight","too","took","tool","top","topic","torn","total","touch","toward","tower","town","toy","trace","track","trade","traffic","trail","train","transportation","trap","travel","treated","tree","triangle","tribe","trick","tried","trip","troops","tropical","trouble","truck","trunk","truth","try","tube","tune","turn","twelve","twenty","twice","two","type","typical","uncle","under","underline","understanding","unhappy","union","unit","universe","unknown","unless","until","unusual","up","upon","upper","upward","us","use","useful","using","usual","usually","valley","valuable","value","vapor","variety","various","vast","vegetable","verb","vertical","very","vessels","victory","view","village","visit","visitor","voice","volume","vote","vowel","voyage","wagon","wait","walk","wall","want","war","warm","warn","was","wash","waste","watch","water","wave","way","we","weak","wealth","wear","weather","week","weigh","weight","welcome","well","went","were","west","western","wet","whale","what","whatever","wheat","wheel","when","whenever","where","wherever","whether","which","while","whispered","whistle","white","who","whole","whom","whose","why","wide","widely","wife","wild","will","willing","win","wind","window","wing","winter","wire","wise","wish","with","within","without","wolf","women","won","wonder","wonderful","wood","wooden","wool","word","wore","work","worker","world","worried","worry","worse","worth","would","wrapped","write","writer","writing","written","wrong","wrote","yard","year","yellow","yes","yesterday","yet","you","young","younger","your","yourself","youth","zero","zebra","zipper","zoo","zulu"];function Zl(e){const t=e?.seed?new Yl(e.seed):null;function n(){return e&&e.maxLength>1?function(){var t,n=!1;for(;!n;)(t=i()).length<=e.maxLength&&(n=!0);return t}():i()}function i(){return Jl[s(Jl.length)]}function s(e){const n=t?t():Math.random();return Math.floor(n*e)}if(void 0===e)return n();"number"==typeof e&&(e={exactly:e}),e.exactly&&(e.min=e.exactly,e.max=e.exactly),"number"!=typeof e.wordsPerString&&(e.wordsPerString=1),"function"!=typeof e.formatter&&(e.formatter=e=>e),"string"!=typeof e.separator&&(e.separator=" ");for(var o=e.min+s(e.max+1-e.min),a=[],r="",c=0,l=0;l<o*e.wordsPerString;l++)c===e.wordsPerString-1?r+=e.formatter(n(),c):r+=e.formatter(n(),c)+e.separator,c++,(l+1)%e.wordsPerString===0&&(a.push(r),r="",c=0);return"string"==typeof e.join&&(a=a.join(e.join)),a}var Xl=Zl;Zl.wordList=Jl;var Ql=ul(Xl);function eu(e,t,n=!1){const i=Array.isArray(e),s=Array.isArray(t);if(i)if(s){if(e.length!=t.length)if(console.warn("Unclear parameters given to randomization.repeat. Items and repetitions are unequal lengths. Behavior may not be as expected."),t.length<e.length){let n=[];for(let i=0;i<e.length;i++)n.push(t);t=n}else t=t.slice(0,e.length)}else{let n=[];for(let i=0;i<e.length;i++)n.push(t);t=n}else s?(t=[t[0]],console.log("Unclear parameters given to randomization.repeat. Multiple set sizes specified, but only one item exists to sample. Proceeding using the first set size.")):(e=[e],t=[t]);let o=[];for(let n=0;n<e.length;n++)for(let i=0;i<t[n];i++)null==e[n]||"object"!=typeof e[n]?o.push(e[n]):o.push(Object.assign({},e[n]));let a=tu(o);return n&&(a=function(e){const t={};for(const n of e)for(const e of Object.keys(n))void 0===t[e]&&(t[e]=[]),t[e].push(n[e]);return t}(a)),a}function tu(e){Array.isArray(e)||console.error("Argument to shuffle() must be an array.");const t=e.slice(0);let n,i,s=t.length;for(;s;)i=Math.floor(Math.random()*s--),n=t[s],t[s]=t[i],t[i]=n;return t}function nu(e,t=!1){const n=e.length;if(1==n)return console.warn("shuffleAlternateGroups() was called with only one group. Defaulting to simple shuffle."),tu(e[0]);let i=[];for(let e=0;e<n;e++)i.push(e);t&&(i=tu(i));const s=[];let o=null;for(let t=0;t<n;t++)o=null===o?e[t].length:Math.min(o,e[t].length),s.push(tu(e[t]));const a=[];for(let e=0;e<o;e++)for(let t=0;t<i.length;t++)a.push(s[i[t]][e]);return a}function iu(e,t){return Array.isArray(e)||console.error("First argument to sampleWithoutReplacement() must be an array"),t>e.length&&console.error("Cannot take a sample larger than the size of the set of items to sample."),tu(e).slice(0,t)}function su(e,t,n){Array.isArray(e)||console.error("First argument to sampleWithReplacement() must be an array");const i=[];if(void 0!==n){n.length!==e.length&&console.error("The length of the weights array must equal the length of the array to be sampled from.");let t=0;for(const e of n)t+=e;for(const e of n)i.push(e/t)}else for(let t=0;t<e.length;t++)i.push(1/e.length);const s=[i[0]];for(let e=1;e<i.length;e++)s.push(i[e]+s[e-1]);const o=[];for(let n=0;n<t;n++){const t=Math.random();let n=0;for(;t>s[n];)n++;o.push(e[n])}return o}function ou(e,t){return function(){var e=0,t=0;for(;0===e;)e=Math.random();for(;0===t;)t=Math.random();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)}()*t+e}function au(e){return-Math.log(Math.random())/e}var ru=Object.freeze({__proto__:null,factorial:function(e,t=1,n=!1){let i=[{}];for(const[t,n]of Object.entries(e)){const e=[];for(const s of n)for(const n of i)e.push(Object.assign(Object.assign({},n),{[t]:s}));i=e}return eu(i,t,n)},randomID:function(e=32){let t="";const n="0123456789abcdefghjklmnopqrstuvwxyz";for(let i=0;i<e;i++)t+=n[Math.floor(35*Math.random())];return t},randomInt:function(e,t){if(t<e)throw new Error("Upper boundary must be less than or equal to lower boundary");return e+Math.floor(Math.random()*(t-e+1))},randomWords:function(e){return Ql(e)},repeat:eu,sampleBernoulli:function(e){return Math.random()<=e?1:0},sampleExGaussian:function(e,t,n,i=!1){let s=ou(e,t)+au(n);if(i)for(;s<=0;)s=ou(e,t)+au(n);return s},sampleExponential:au,sampleNormal:ou,sampleWithReplacement:su,sampleWithoutReplacement:iu,setSeed:function(e=Math.random().toString()){return Math.random=jl(e),e},shuffle:tu,shuffleAlternateGroups:nu,shuffleNoRepeats:function(e,t){Array.isArray(e)||console.error("First argument to shuffleNoRepeats() must be an array."),void 0!==t&&"function"!=typeof t&&console.error("Second argument to shuffleNoRepeats() must be a function."),void 0===t&&(t=function(e,t){return e===t});const n=tu(e);for(let e=0;e<n.length-1;e++)if(t(n[e],n[e+1])){let i=Math.floor(Math.random()*(n.length-2))+1;for(;t(n[e+1],n[i])||t(n[e+1],n[i+1])||t(n[e+1],n[i-1])||t(n[e],n[i]);)i=Math.floor(Math.random()*(n.length-2))+1;const s=n[i];n[i]=n[e+1],n[e+1]=s}return n}});function cu(){const e={previewMode:!1,outsideTurk:!1,hitId:"INVALID_URL_PARAMETER",assignmentId:"INVALID_URL_PARAMETER",workerId:"INVALID_URL_PARAMETER",turkSubmitTo:"INVALID_URL_PARAMETER"},t=function(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");const n=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null==n?"":n[1]},n=t(window.location.href,"assignmentId")?window.location.href:document.referrer;return["assignmentId","hitId","workerId","turkSubmitTo"].map(function(i){e[i]=unescape(t(n,i))}),e.previewMode="ASSIGNMENT_ID_NOT_AVAILABLE"==e.assignmentId,e.outsideTurk=!e.previewMode&&""===e.hitId&&""==e.assignmentId&&""==e.workerId,e}var lu=Object.freeze({__proto__:null,submitToTurk:function(e){const t=cu(),n=t.assignmentId,i=t.turkSubmitTo;if(!n||!i)return;const s=document.createElement("form");s.method="POST",s.action=i+"/mturk/externalSubmit?assignmentId="+n;for(const t in e)if(e.hasOwnProperty(t)){const n=document.createElement("input");n.type="hidden",n.name=t,n.id=t,n.value=e[t],s.appendChild(n)}document.body.appendChild(s),s.submit()},turkInfo:cu});class uu{constructor(e,t,n,i){if(this.jsPsych=e,this.progress={current_location:-1,current_variable_set:0,current_repetition:0,current_iteration:0,done:!1},this.parent_node=n,this.relative_id=void 0===n?0:i,void 0!==t.timeline){this.timeline_parameters={timeline:[],loop_function:t.loop_function,conditional_function:t.conditional_function,sample:t.sample,randomize_order:void 0!==t.randomize_order&&t.randomize_order,repetitions:void 0===t.repetitions?1:t.repetitions,timeline_variables:void 0===t.timeline_variables?[{}]:t.timeline_variables,on_timeline_finish:t.on_timeline_finish,on_timeline_start:t.on_timeline_start},this.setTimelineVariablesOrder();var s=Object.assign({},t);delete s.timeline,delete s.conditional_function,delete s.loop_function,delete s.randomize_order,delete s.repetitions,delete s.timeline_variables,delete s.sample,delete s.on_timeline_start,delete s.on_timeline_finish,this.node_trial_data=s;for(var o=0;o<t.timeline.length;o++){var a=Object.assign({},s,t.timeline[o]);if("object"==typeof s.data&&"object"==typeof t.timeline[o].data){var r=Object.assign({},s.data,t.timeline[o].data);a.data=r}this.timeline_parameters.timeline.push(new uu(this.jsPsych,a,this,o))}}else void 0===t.type&&console.error('Trial level node is missing the "type" parameter. The parameters for the node are: '+JSON.stringify(t)),this.trial_parameters=Object.assign({},t)}trial(){return void 0===this.timeline_parameters?fl(this.trial_parameters):this.progress.current_location>=this.timeline_parameters.timeline.length?null:this.timeline_parameters.timeline[this.progress.current_location].trial()}markCurrentTrialComplete(){void 0===this.timeline_parameters?this.progress.done=!0:this.timeline_parameters.timeline[this.progress.current_location].markCurrentTrialComplete()}nextRepetiton(){this.setTimelineVariablesOrder(),this.progress.current_location=-1,this.progress.current_variable_set=0,this.progress.current_repetition++;for(var e=0;e<this.timeline_parameters.timeline.length;e++)this.timeline_parameters.timeline[e].reset()}setTimelineVariablesOrder(){const e=this.timeline_parameters;if(void 0!==e&&void 0!==e.timeline_variables){for(var t=[],n=0;n<e.timeline_variables.length;n++)t.push(n);void 0!==e.sample&&("custom"==e.sample.type?t=e.sample.fn(t):"with-replacement"==e.sample.type?t=su(t,e.sample.size,e.sample.weights):"without-replacement"==e.sample.type?t=iu(t,e.sample.size):"fixed-repetitions"==e.sample.type?t=eu(t,e.sample.size,!1):"alternate-groups"==e.sample.type?t=nu(e.sample.groups,e.sample.randomize_group_order):console.error('Invalid type in timeline sample parameters. Valid options for type are "custom", "with-replacement", "without-replacement", "fixed-repetitions", and "alternate-groups"')),e.randomize_order&&(t=tu(t)),this.progress.order=t}}nextSet(){this.progress.current_location=-1,this.progress.current_variable_set++;for(var e=0;e<this.timeline_parameters.timeline.length;e++)this.timeline_parameters.timeline[e].reset()}advance(){const e=this.progress,t=this.timeline_parameters,n=this.jsPsych.internal;if(e.done)return!0;if(-1==e.current_location){if(void 0!==t){if(void 0!==t.conditional_function&&0==e.current_repetition&&0==e.current_variable_set){n.call_immediate=!0;var i=t.conditional_function();if(n.call_immediate=!1,0==i)return e.done=!0,!0}void 0!==t.on_timeline_start&&0==e.current_variable_set&&t.on_timeline_start()}return e.current_location=0,this.advance()}if(void 0!==t){for(var s=!1;e.current_location<t.timeline.length&&0==s;){if(!t.timeline[e.current_location].advance())return s=!0,!1;e.current_location++}return e.current_variable_set<e.order.length-1?(this.nextSet(),this.advance()):e.current_repetition<t.repetitions-1?(this.nextRepetiton(),void 0!==t.on_timeline_finish&&t.on_timeline_finish(),this.advance()):(void 0!==t.on_timeline_finish&&t.on_timeline_finish(),void 0!==t.loop_function?(n.call_immediate=!0,t.loop_function(this.generatedData())?(this.reset(),n.call_immediate=!1,this.parent_node.advance()):(e.done=!0,n.call_immediate=!1,!0)):(e.done=!0,!0))}}isComplete(){return this.progress.done}getTimelineVariableValue(e){if(void 0!==this.timeline_parameters)return this.timeline_parameters.timeline_variables[this.progress.order[this.progress.current_variable_set]][e]}findTimelineVariable(e){var t=this.getTimelineVariableValue(e);return void 0===t?void 0!==this.parent_node?this.parent_node.findTimelineVariable(e):void 0:t}timelineVariable(e){if(void 0===this.timeline_parameters){const t=this.findTimelineVariable(e);return void 0===t&&console.warn("Timeline variable "+e+" not found."),t}{var t=Math.max(0,this.progress.current_location);t==this.timeline_parameters.timeline.length&&(t-=1);const n=this.timeline_parameters.timeline[t].timelineVariable(e);return void 0===n&&console.warn("Timeline variable "+e+" not found."),n}}allTimelineVariables(){for(var e=this.allTimelineVariablesNames(),t={},n=0;n<e.length;n++)t[e[n]]=this.timelineVariable(e[n]);return t}allTimelineVariablesNames(e=[]){if(void 0!==this.timeline_parameters){e=e.concat(Object.keys(this.timeline_parameters.timeline_variables[this.progress.order[this.progress.current_variable_set]]));var t=Math.max(0,this.progress.current_location);return t==this.timeline_parameters.timeline.length&&(t-=1),this.timeline_parameters.timeline[t].allTimelineVariablesNames(e)}if(void 0===this.timeline_parameters)return e}length(){var e=0;if(void 0===this.timeline_parameters)return 1;for(var t=0;t<this.timeline_parameters.timeline.length;t++)e+=this.timeline_parameters.timeline[t].length();return e}percentComplete(){for(var e=this.length(),t=0,n=0;n<this.timeline_parameters.timeline.length;n++)this.timeline_parameters.timeline[n].isComplete()&&(t+=this.timeline_parameters.timeline[n].length());return t/e*100}reset(){if(this.progress.current_location=-1,this.progress.current_repetition=0,this.progress.current_variable_set=0,this.progress.current_iteration++,this.progress.done=!1,this.setTimelineVariablesOrder(),void 0!==this.timeline_parameters)for(var e=0;e<this.timeline_parameters.timeline.length;e++)this.timeline_parameters.timeline[e].reset()}end(){this.progress.done=!0}endActiveNode(){void 0===this.timeline_parameters?(this.end(),this.parent_node.end()):this.timeline_parameters.timeline[this.progress.current_location].endActiveNode()}ID(){var e="";return void 0===this.parent_node?"0."+this.progress.current_iteration:(e+=this.parent_node.ID()+"-",e+=this.relative_id+"."+this.progress.current_iteration)}activeID(){return void 0===this.timeline_parameters?this.ID():this.timeline_parameters.timeline[this.progress.current_location].activeID()}generatedData(){return this.jsPsych.data.getDataByTimelineNode(this.ID())}trialsOfType(e){if(void 0===this.timeline_parameters)return this.trial_parameters.type==e?this.trial_parameters:[];for(var t=[],n=0;n<this.timeline_parameters.timeline.length;n++){var i=this.timeline_parameters.timeline[n].trialsOfType(e);t=t.concat(i)}return t}insert(e){void 0===this.timeline_parameters?console.error("Cannot add new trials to a trial-level node."):this.timeline_parameters.timeline.push(new uu(this.jsPsych,Object.assign(Object.assign({},this.node_trial_data),e),this,this.timeline_parameters.timeline.length))}}function pu(e){return new Promise(t=>setTimeout(t,e))}class du{version(){return"7.3.4"}constructor(e){this.extensions={},this.turk=lu,this.randomization=ru,this.utils=vl,this.opts={},this.global_trial_index=0,this.current_trial={},this.current_trial_finished=!1,this.paused=!1,this.waiting=!1,this.file_protocol=!1,this.simulation_mode=null,this.webaudio_context=null,this.internal={call_immediate:!1},this.progress_bar_amount=0,e=Object.assign({display_element:void 0,on_finish:()=>{},on_trial_start:()=>{},on_trial_finish:()=>{},on_data_update:()=>{},on_interaction_data_update:()=>{},on_close:()=>{},use_webaudio:!0,exclusions:{},show_progress_bar:!1,message_progress_bar:"Completion Progress",auto_update_progress_bar:!0,default_iti:0,minimum_valid_rt:0,experiment_width:null,override_safe_mode:!1,case_sensitive_responses:!1,extensions:[]},e),this.opts=e,dl(this),this.webaudio_context="undefined"!=typeof window&&void 0!==window.AudioContext?new AudioContext:null,"file:"!=window.location.protocol||!1!==e.override_safe_mode&&void 0!==e.override_safe_mode||(e.use_webaudio=!1,this.file_protocol=!0,console.warn("jsPsych detected that it is running via the file:// protocol and not on a web server. To prevent issues with cross-origin requests, Web Audio and video preloading have been disabled. If you would like to override this setting, you can set 'override_safe_mode' to 'true' in initJsPsych. For more information, see: https://www.jspsych.org/overview/running-experiments")),this.data=new xl(this),this.pluginAPI=function(e){const t=e.getInitSettings(),n=dl(new wl(e.getDisplayContainerElement,t.case_sensitive_responses,t.minimum_valid_rt)),i=dl(new Cl),s=dl(new Tl(t.use_webaudio,e.webaudio_context)),o=dl(new _l),a=dl(new El(e.getDisplayContainerElement,i.setTimeout));return Object.assign({},n,i,s,o,a)}(this);for(const t of e.extensions)this.extensions[t.type.info.name]=new t.type(this);this.pluginAPI.initAudio()}run(e){return cl(this,void 0,void 0,function*(){void 0===e&&console.error("No timeline declared in jsPsych.run. Cannot start experiment."),0===e.length&&console.error("No trials have been added to the timeline (the timeline is an empty array). Cannot start experiment."),this.timelineDescription=e,this.timeline=new uu(this,{timeline:e}),yield this.prepareDom(),yield this.checkExclusions(this.opts.exclusions),yield this.loadExtensions(this.opts.extensions),document.documentElement.setAttribute("jspsych","present"),this.startExperiment(),yield this.finished})}simulate(e,t="data-only",n={}){return cl(this,void 0,void 0,function*(){this.simulation_mode=t,this.simulation_options=n,yield this.run(e)})}getProgress(){return{total_trials:void 0===this.timeline?void 0:this.timeline.length(),current_trial_global:this.global_trial_index,percent_complete:void 0===this.timeline?0:this.timeline.percentComplete()}}getStartTime(){return this.exp_start_time}getTotalTime(){return void 0===this.exp_start_time?0:(new Date).getTime()-this.exp_start_time.getTime()}getDisplayElement(){return this.DOM_target}getDisplayContainerElement(){return this.DOM_container}finishTrial(e={}){var t;if(this.current_trial_finished)return;this.current_trial_finished=!0,void 0!==this.current_trial.css_classes&&Array.isArray(this.current_trial.css_classes)&&this.DOM_target.classList.remove(...this.current_trial.css_classes),this.data.write(e);const n=this.data.getLastTrialData().values()[0],i=this.current_trial;if("object"==typeof i.save_trial_parameters)for(const e of Object.keys(i.save_trial_parameters)){const t=i.save_trial_parameters[e];!0===t&&(void 0===i[e]?console.warn(`Invalid parameter specified in save_trial_parameters. Trial has no property called "${e}".`):"function"==typeof i[e]?n[e]=i[e].toString():n[e]=i[e]),!1===t&&"internal_node_id"!==e&&"trial_index"!==e&&delete n[e]}const s=(null!==(t=i.extensions)&&void 0!==t?t:[]).map(e=>this.extensions[e.type.info.name].on_finish(e.params)),o=()=>{this.internal.call_immediate=!0,"function"==typeof i.on_finish&&i.on_finish(n),this.opts.on_trial_finish(n),this.opts.on_data_update(n),this.internal.call_immediate=!1,"data-only"===this.simulation_mode?this.nextTrial():null===typeof i.post_trial_gap||void 0===i.post_trial_gap?this.opts.default_iti>0?setTimeout(this.nextTrial,this.opts.default_iti):this.nextTrial():i.post_trial_gap>0?setTimeout(this.nextTrial,i.post_trial_gap):this.nextTrial()};if(s.some(e=>"function"==typeof e.then))Promise.all(s.map(e=>Promise.resolve(e).then(e=>{Object.assign(n,e)}))).then(o);else{for(const e of s)Object.assign(n,e);o()}}endExperiment(e="",t={}){this.timeline.end_message=e,this.timeline.end(),this.pluginAPI.cancelAllKeyboardResponses(),this.pluginAPI.clearAllTimeouts(),this.finishTrial(t)}endCurrentTimeline(){this.timeline.endActiveNode()}getCurrentTrial(){return this.current_trial}getInitSettings(){return this.opts}getCurrentTimelineNodeID(){return this.timeline.activeID()}timelineVariable(e,t=!1){return this.internal.call_immediate||!0===t?this.timeline.timelineVariable(e):{timelineVariablePlaceholder:!0,timelineVariableFunction:()=>this.timeline.timelineVariable(e)}}getAllTimelineVariables(){return this.timeline.allTimelineVariables()}addNodeToEndOfTimeline(e,t){this.timeline.insert(e)}pauseExperiment(){this.paused=!0}resumeExperiment(){this.paused=!1,this.waiting&&(this.waiting=!1,this.nextTrial())}loadFail(e){e=e||"<p>The experiment failed to load.</p>",this.DOM_target.innerHTML=e}getSafeModeStatus(){return this.file_protocol}getTimeline(){return this.timelineDescription}prepareDom(){return cl(this,void 0,void 0,function*(){"complete"!==document.readyState&&(yield new Promise(e=>{window.addEventListener("load",e)}));const e=this.opts;if(void 0===e.display_element){null===document.querySelector("body")&&document.documentElement.appendChild(document.createElement("body")),document.querySelector("html").style.height="100%",document.querySelector("body").style.margin="0px",document.querySelector("body").style.height="100%",document.querySelector("body").style.width="100%",e.display_element=document.querySelector("body")}else{const t=e.display_element instanceof Element?e.display_element:document.querySelector("#"+e.display_element);null===t?console.error("The display_element specified in initJsPsych() does not exist in the DOM."):e.display_element=t}e.display_element.innerHTML='<div class="jspsych-content-wrapper"><div id="jspsych-content"></div></div>',this.DOM_container=e.display_element,this.DOM_target=document.querySelector("#jspsych-content"),null!==e.experiment_width&&(this.DOM_target.style.width=e.experiment_width+"px"),e.display_element.tabIndex=0,-1===e.display_element.className.indexOf("jspsych-display-element")&&(e.display_element.className+=" jspsych-display-element"),this.DOM_target.className+="jspsych-content",this.data.createInteractionListeners(),window.addEventListener("beforeunload",e.on_close)})}loadExtensions(e){return cl(this,void 0,void 0,function*(){try{yield Promise.all(e.map(e=>this.extensions[e.type.info.name].initialize(e.params||{})))}catch(e){throw console.error(e),new Error(e)}})}startExperiment(){this.finished=new Promise(e=>{this.resolveFinishedPromise=e}),!0===this.opts.show_progress_bar&&this.drawProgressBar(this.opts.message_progress_bar),this.exp_start_time=new Date,this.timeline.advance(),this.doTrial(this.timeline.trial())}finishExperiment(){const e=this.opts.on_finish(this.data.get()),t=()=>{void 0!==this.timeline.end_message&&(this.DOM_target.innerHTML=this.timeline.end_message),this.resolveFinishedPromise()};e?Promise.resolve(e).then(t):t()}nextTrial(){if(this.paused)return void(this.waiting=!0);this.global_trial_index++,this.timeline.markCurrentTrialComplete();const e=this.timeline.advance();!0===this.opts.show_progress_bar&&!0===this.opts.auto_update_progress_bar&&this.updateProgressBar(),e?this.finishExperiment():this.doTrial(this.timeline.trial())}doTrial(e){if(this.current_trial=e,this.current_trial_finished=!1,this.evaluateTimelineVariables(e),"string"==typeof e.type)throw new ml("A string was provided as the trial's `type` parameter. Since jsPsych v7, the `type` parameter needs to be a plugin object.");if(e.type=Object.assign(Object.assign({},dl(new e.type(this))),{info:e.type.info}),this.evaluateFunctionParameters(e),this.setDefaultValues(e),this.internal.call_immediate=!0,this.opts.on_trial_start(e),"function"==typeof e.on_start&&e.on_start(e),Array.isArray(e.extensions))for(const t of e.extensions)this.extensions[t.type.info.name].on_start(t.params);this.DOM_container.focus(),this.DOM_target.scrollTop=0,void 0!==e.css_classes&&(Array.isArray(e.css_classes)||"string"!=typeof e.css_classes||(e.css_classes=[e.css_classes]),Array.isArray(e.css_classes)&&this.DOM_target.classList.add(...e.css_classes));const t=()=>{if("function"==typeof e.on_load&&e.on_load(),Array.isArray(e.extensions))for(const t of e.extensions)this.extensions[t.type.info.name].on_load(t.params)};let n,i,s;this.simulation_mode||(n=e.type.trial(this.DOM_target,e,t)),this.simulation_mode&&(e.type.simulate?(e.simulation_options||(i=this.simulation_options.default),e.simulation_options&&("string"==typeof e.simulation_options?this.simulation_options[e.simulation_options]?i=this.simulation_options[e.simulation_options]:this.simulation_options.default?(console.log(`No matching simulation options found for "${e.simulation_options}". Using "default" options.`),i=this.simulation_options.default):(console.log(`No matching simulation options found for "${e.simulation_options}" and no "default" options provided. Using the default values provided by the plugin.`),i={}):i=e.simulation_options),s=this.utils.deepMerge(this.simulation_options.default,i),s=this.utils.deepCopy(s),s=this.replaceFunctionsWithValues(s,null),n=!1===(null==s?void 0:s.simulate)?e.type.trial(this.DOM_target,e,t):e.type.simulate(e,(null==s?void 0:s.mode)||this.simulation_mode,s,t)):n=e.type.trial(this.DOM_target,e,t));n&&"function"==typeof n.then||this.simulation_mode&&(!this.simulation_mode||!1!==(null==s?void 0:s.simulate))||t(),this.internal.call_immediate=!1}evaluateTimelineVariables(e){for(const t of Object.keys(e))"object"==typeof e[t]&&null!==e[t]&&void 0!==e[t].timelineVariablePlaceholder&&(e[t]=e[t].timelineVariableFunction()),"object"==typeof e[t]&&null!==e[t]&&"timeline"!==t&&"timeline_variables"!==t&&this.evaluateTimelineVariables(e[t])}evaluateFunctionParameters(e){this.internal.call_immediate=!0;for(const t of Object.keys(e))"type"!==t&&(void 0!==kl[t]&&kl[t].type!==gl.FUNCTION&&(e[t]=this.replaceFunctionsWithValues(e[t],null)),void 0!==e.type.info.parameters[t]&&e.type.info.parameters[t].type!==gl.FUNCTION&&(e[t]=this.replaceFunctionsWithValues(e[t],e.type.info.parameters[t])));this.internal.call_immediate=!1}replaceFunctionsWithValues(e,t){if(null===e)return e;if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=this.replaceFunctionsWithValues(e[n],t);else if("object"==typeof e)if(null!==t&&t.nested)for(const n of Object.keys(e))"object"==typeof t.nested[n]&&t.nested[n].type!==gl.FUNCTION&&(e[n]=this.replaceFunctionsWithValues(e[n],t.nested[n]));else for(const t of Object.keys(e))"type"!==t&&"timeline"!==t&&"timeline_variables"!==t&&(e[t]=this.replaceFunctionsWithValues(e[t],null));else if("function"==typeof e)return e();return e}setDefaultValues(e){for(const t in e.type.info.parameters)e.type.info.parameters[t].type===gl.COMPLEX?(void 0===e[t]&&e.type.info.parameters[t].default&&(e[t]=e.type.info.parameters[t].default),!0===e.type.info.parameters[t].array&&Array.isArray(e[t])&&e[t].forEach(function(n,i){for(const n in e.type.info.parameters[t].nested)void 0!==e[t][i][n]&&null!==e[t][i][n]||(void 0===e.type.info.parameters[t].nested[n].default?console.error(`You must specify a value for the ${n} parameter (nested in the ${t} parameter) in the ${e.type.info.name} plugin.`):e[t][i][n]=e.type.info.parameters[t].nested[n].default)})):void 0!==e[t]&&null!==e[t]||(void 0===e.type.info.parameters[t].default?console.error(`You must specify a value for the ${t} parameter in the ${e.type.info.name} plugin.`):e[t]=e.type.info.parameters[t].default)}checkExclusions(e){return cl(this,void 0,void 0,function*(){if((e.min_width||e.min_height||e.audio)&&console.warn("The exclusions option in `initJsPsych()` is deprecated and will be removed in a future version. We recommend using the browser-check plugin instead. See https://www.jspsych.org/latest/plugins/browser-check/."),e.min_width||e.min_height){const t=e.min_width||0,n=e.min_height||0;if(window.innerWidth<t||window.innerHeight<n){for(this.getDisplayElement().innerHTML="<p>Your browser window is too small to complete this experiment. Please maximize the size of your browser window. If your browser window is already maximized, you will not be able to complete this experiment.</p><p>The minimum width is "+t+"px. Your current width is "+window.innerWidth+"px.</p><p>The minimum height is "+n+"px. Your current height is "+window.innerHeight+"px.</p>";window.innerWidth<t||window.innerHeight<n;)yield pu(100);this.getDisplayElement().innerHTML=""}}if(void 0!==e.audio&&e.audio&&!window.hasOwnProperty("AudioContext")&&!window.hasOwnProperty("webkitAudioContext"))throw this.getDisplayElement().innerHTML="<p>Your browser does not support the WebAudio API, which means that you will not be able to complete the experiment.</p><p>Browsers that support the WebAudio API include Chrome, Firefox, Safari, and Edge.</p>",new Error})}drawProgressBar(e){document.querySelector(".jspsych-display-element").insertAdjacentHTML("afterbegin",'<div id="jspsych-progressbar-container"><span>'+e+'</span><div id="jspsych-progressbar-outer"><div id="jspsych-progressbar-inner"></div></div></div>')}updateProgressBar(){this.setProgressBar(this.getProgress().percent_complete/100)}setProgressBar(e){e=Math.max(Math.min(1,e),0),document.querySelector("#jspsych-progressbar-inner").style.width=100*e+"%",this.progress_bar_amount=e}getProgressBarCompleted(){return this.progress_bar_amount}}"undefined"!=typeof window&&window.hasOwnProperty("webkitAudioContext")&&!window.hasOwnProperty("AudioContext")&&(window.AudioContext=webkitAudioContext);const mu={name:"fullscreen",parameters:{fullscreen_mode:{type:gl.BOOL,pretty_name:"Fullscreen mode",default:!0,array:!1},message:{type:gl.HTML_STRING,pretty_name:"Message",default:"<p>The experiment will switch to full screen mode when you press the button below</p>",array:!1},button_label:{type:gl.STRING,pretty_name:"Button label",default:"Continue",array:!1},delay_after:{type:gl.INT,pretty_name:"Delay after",default:1e3,array:!1}}};class hu{constructor(e){this.jsPsych=e,this.rt=null,this.start_time=0}trial(e,t){"undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element?this.endTrial(e,!1,t):t.fullscreen_mode?this.showDisplay(e,t):(this.exitFullScreen(),this.endTrial(e,!0,t))}showDisplay(e,t){e.innerHTML=`\n ${t.message}\n <button id="jspsych-fullscreen-btn" class="jspsych-btn">${t.button_label}</button>\n `,e.querySelector("#jspsych-fullscreen-btn").addEventListener("click",()=>{this.rt=Math.round(performance.now()-this.start_time),this.enterFullScreen(),this.endTrial(e,!0,t)}),this.start_time=performance.now()}endTrial(e,t,n){e.innerHTML="",this.jsPsych.pluginAPI.setTimeout(()=>{var e={success:t,rt:this.rt};this.jsPsych.finishTrial(e)},n.delay_after)}enterFullScreen(){var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}exitFullScreen(){(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)&&(document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen())}simulate(e,t,n,i){"data-only"==t&&(i(),this.simulate_data_only(e,n)),"visual"==t&&this.simulate_visual(e,n,i)}create_simulation_data(e,t){const n={success:!0,rt:this.jsPsych.randomization.sampleExGaussian(1e3,100,.005,!0)};return this.jsPsych.pluginAPI.mergeSimulationData(n,t)}simulate_data_only(e,t){const n=this.create_simulation_data(e,t);this.jsPsych.finishTrial(n)}simulate_visual(e,t,n){const i=this.create_simulation_data(e,t),s=this.jsPsych.getDisplayElement();!1===i.success?this.endTrial(s,!1,e):(this.trial(s,e),n(),this.jsPsych.pluginAPI.clickTarget(s.querySelector("#jspsych-fullscreen-btn"),i.rt))}}hu.info=mu;var fu={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},gu=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],vu=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],yu=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],bu="undefined"!=typeof window&&void 0!==window.document?window.document:{},xu="fullscreenEnabled"in bu&&Object.keys(fu)||gu[0]in bu&&gu||vu[0]in bu&&vu||yu[0]in bu&&yu||[],_u={requestFullscreen:function(e){return e[xu[fu.requestFullscreen]]()},requestFullscreenFunction:function(e){return e[xu[fu.requestFullscreen]]},get exitFullscreen(){return bu[xu[fu.exitFullscreen]].bind(bu)},get fullscreenPseudoClass(){return":"+xu[fu.fullscreen]},addEventListener:function(e,t,n){return bu.addEventListener(xu[fu[e]],t,n)},removeEventListener:function(e,t,n){return bu.removeEventListener(xu[fu[e]],t,n)},get fullscreenEnabled(){return Boolean(bu[xu[fu.fullscreenEnabled]])},set fullscreenEnabled(e){},get fullscreenElement(){return bu[xu[fu.fullscreenElement]]},set fullscreenElement(e){},get onfullscreenchange(){return bu[("on"+xu[fu.fullscreenchange]).toLowerCase()]},set onfullscreenchange(e){return bu[("on"+xu[fu.fullscreenchange]).toLowerCase()]=e},get onfullscreenerror(){return bu[("on"+xu[fu.fullscreenerror]).toLowerCase()]},set onfullscreenerror(e){return bu[("on"+xu[fu.fullscreenerror]).toLowerCase()]=e}},wu=_u;function ku(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Su(e,t){for(var n,i="",s=0,o=-1,a=0,r=0;r<=e.length;++r){if(r<e.length)n=e.charCodeAt(r);else{if(47===n)break;n=47}if(47===n){if(o===r-1||1===a);else if(o!==r-1&&2===a){if(i.length<2||2!==s||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",s=0):s=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),o=r,a=0;continue}}else if(2===i.length||1===i.length){i="",s=0,o=r,a=0;continue}t&&(i.length>0?i+="/..":i="..",s=2)}else i.length>0?i+="/"+e.slice(o+1,r):i=e.slice(o+1,r),s=r-o-1;o=r,a=0}else 46===n&&-1!==a?++a:a=-1}return i}var Tu={resolve:function(){for(var e,t="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),ku(s),0!==s.length&&(t=s+"/"+t,n=47===s.charCodeAt(0))}return t=Su(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(ku(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=Su(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return ku(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];ku(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":Tu.normalize(e)},relative:function(e,t){if(ku(e),ku(t),e===t)return"";if((e=Tu.resolve(e))===(t=Tu.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var i=e.length,s=i-n,o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var a=t.length-o,r=s<a?s:a,c=-1,l=0;l<=r;++l){if(l===r){if(a>r){if(47===t.charCodeAt(o+l))return t.slice(o+l+1);if(0===l)return t.slice(o+l)}else s>r&&(47===e.charCodeAt(n+l)?c=l:0===l&&(c=0));break}var u=e.charCodeAt(n+l);if(u!==t.charCodeAt(o+l))break;47===u&&(c=l)}var p="";for(l=n+c+1;l<=i;++l)l!==i&&47!==e.charCodeAt(l)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(o+c):(o+=c,47===t.charCodeAt(o)&&++o,t.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(ku(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');ku(e);var n,i=0,s=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,r=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!o){i=n+1;break}}else-1===r&&(o=!1,r=n+1),a>=0&&(c===t.charCodeAt(a)?-1===--a&&(s=n):(a=-1,s=r))}return i===s?s=r:-1===s&&(s=e.length),e.slice(i,s)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){i=n+1;break}}else-1===s&&(o=!1,s=n+1);return-1===s?"":e.slice(i,s)},extname:function(e){ku(e);for(var t=-1,n=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var r=e.charCodeAt(a);if(47!==r)-1===i&&(s=!1,i=a+1),46===r?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!s){n=a+1;break}}return-1===t||-1===i||0===o||1===o&&t===i-1&&t===n+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+e+i:i}("/",e)},parse:function(e){ku(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,i=e.charCodeAt(0),s=47===i;s?(t.root="/",n=1):n=0;for(var o=-1,a=0,r=-1,c=!0,l=e.length-1,u=0;l>=n;--l)if(47!==(i=e.charCodeAt(l)))-1===r&&(c=!1,r=l+1),46===i?-1===o?o=l:1!==u&&(u=1):-1!==o&&(u=-1);else if(!c){a=l+1;break}return-1===o||-1===r||0===u||1===u&&o===r-1&&o===a+1?-1!==r&&(t.base=t.name=0===a&&s?e.slice(1,r):e.slice(a,r)):(0===a&&s?(t.name=e.slice(1,o),t.base=e.slice(1,r)):(t.name=e.slice(a,o),t.base=e.slice(a,r)),t.ext=e.slice(o,r)),a>0?t.dir=e.slice(0,a-1):s&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Tu.posix=Tu;var Eu={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}};
10
+ /*!
11
+ * mime-types
12
+ * Copyright(c) 2014 Jonathan Ong
13
+ * Copyright(c) 2015 Douglas Christopher Wilson
14
+ * MIT Licensed
15
+ */
16
+ !function(e){var n,i,s,o=Eu,a=t.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function l(e){if(!e||"string"!=typeof e)return!1;var t=r.exec(e),n=t&&o[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!c.test(t[1]))&&"UTF-8"}e.charset=l,e.charsets={lookup:l},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var n=-1===t.indexOf("/")?e.lookup(t):t;if(!n)return!1;if(-1===n.indexOf("charset")){var i=e.charset(n);i&&(n+="; charset="+i.toLowerCase())}return n},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var n=r.exec(t),i=n&&e.extensions[n[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var n=a("x."+t).toLowerCase().substr(1);if(!n)return!1;return e.types[n]||!1},e.types=Object.create(null),n=e.extensions,i=e.types,s=["nginx","apache",void 0,"iana"],Object.keys(o).forEach(function(e){var t=o[e],a=t.extensions;if(a&&a.length){n[e]=a;for(var r=0;r<a.length;r++){var c=a[r];if(i[c]){var l=s.indexOf(o[i[c]].source),u=s.indexOf(t.source);if("application/octet-stream"!==i[c]&&(l>u||l===u&&"application/"===i[c].substr(0,12)))continue}i[c]=e}}})}({});var Cu="undefined"!=typeof window?window:{screen:{},navigator:{}},Iu=(Cu.matchMedia||function(){return{matches:!1}}).bind(Cu),Ou={get passive(){return!0}},ju=function(){};Cu.addEventListener&&Cu.addEventListener("p",ju,Ou),Cu.removeEventListener&&Cu.removeEventListener("p",ju,!1);var Au="ontouchstart"in Cu,Lu=Au||"TouchEvent"in Cu&&Iu("(any-pointer: coarse)").matches,Pu=(Cu.navigator.maxTouchPoints||0)>0||Lu,Ru=Cu.navigator.userAgent||"",Mu=Iu("(pointer: coarse)").matches&&/iPad|Macintosh/.test(Ru)&&Math.min(Cu.screen.width||0,Cu.screen.height||0)>=768,Nu=(Iu("(pointer: coarse)").matches||!Iu("(pointer: fine)").matches&&Au)&&!/Windows.*Firefox/.test(Ru),Du=Iu("(any-pointer: fine)").matches||Iu("(any-hover: hover)").matches||Mu||!Au,Fu=!Pu||!Du&&Nu?Pu?"touchOnly":"mouseOnly":"hybrid",Bu="mouseOnly"===Fu?"mouse":"touchOnly"===Fu||Nu?"touch":"mouse";function $u(e){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$u(e)}function zu(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Ku(i.key),i)}}function qu(e){return function(e){if(Array.isArray(e))return Yu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Gu(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Hu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uu(Object(n),!0).forEach(function(t){Vu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vu(e,t,n){return(t=Ku(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ku(e){var t=function(e,t){if("object"!==$u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==$u(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===$u(t)?t:String(t)}function Wu(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Gu(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,r=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){r=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(r)throw o}}}}function Gu(e,t){if(e){if("string"==typeof e)return Yu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yu(e,t):void 0}}function Yu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ju(e){return e.replace(/^([A-Z])|[\s-_](\w)/g,function(e,t,n,i){return n?n.toUpperCase():t.toLowerCase()})}function Zu(){return"touchOnly"===Fu||"hybrid"===Fu&&"touch"===Bu?"mobile":"desktop"}var Xu=function(e){e.sort(function(e,t){return t-e});var t=e.length;return t%2==0?(e[t/2]+e[t/2-1])/2:e[Math.floor(t/2)]};function Qu(e){var t,n=e.responseTimeLowThreshold,i=void 0===n?400:n,s=e.responseTimeHighThreshold,o=void 0===s?1e4:s,a=e.accuracyThreshold,r=void 0===a?.2:a,c=e.minResponsesRequired,l=void 0===c?0:c,u=e.includedReliabilityFlags,p=void 0===u?["responseTimeTooFast"]:u,d=e.customValidations,m=["and","or","xor"],h=(void 0===d?[]:d).map(function(e){var t;return Hu(Hu({},e),{},{logicalOperation:null===(t=e.logicalOperation)||void 0===t?void 0:t.toLowerCase()})}),f=Wu(h);try{for(f.s();!(t=f.n()).done;){var g=t.value,v=g.flag,y=g.conditions,b=g.logicalOperation;if(y.length>1){if(void 0===b)throw new Error('logicalOperation is required for custom validation flag "'.concat(v,'" when multiple conditions are provided. Must be one of: ').concat(m.join(", "),"."));if(!m.includes(b))throw new Error('Invalid logicalOperation "'.concat(b,'" for custom validation flag "').concat(v,'". Must be one of: ').concat(m.join(", "),"."))}}}catch(e){f.e(e)}finally{f.f()}return function(e){var t,n=e.responseTimes,s=e.responses,a=e.correct,c=e.completed,u=[];if(n.length<l)u.push("notEnoughResponses");else{var d;Xu(n)<=i&&u.push("responseTimeTooFast"),Xu(n)>=o&&u.push("responseTimeTooSlow"),!1===c&&p.includes("incomplete")&&u.push("incomplete");var m=null!==(d=null==a?void 0:a.filter(function(e){return 1===e}).length)&&void 0!==d?d:0;m/a.length<=r&&u.push("accuracyTooLow")}if(n.length>=l){var f,g=qu(u),v=Wu(h);try{var y=function(){var e=f.value,t=e.flag,i=e.conditions,o=e.logicalOperation;if(!p.includes(t))return"continue";var r={responseTimes:n,responses:s,correct:a,completed:c,existingFlags:qu(g)};(1===i.length?i[0](r):"or"===o?i.some(function(e){return e(r)}):"xor"===o?1===i.filter(function(e){return e(r)}).length:i.every(function(e){return e(r)}))&&u.push(t)};for(v.s();!(f=v.n()).done;)y()}catch(e){v.e(e)}finally{v.f()}}return t=0===u.filter(function(e){return p.includes(e)}).length,u=u.filter(function(e){return p.includes(e)}),{flags:u,isReliable:t}}}var ep=function(){function e(t){var n=t.evaluateValidity,i=void 0===n?Qu():n,s=t.handleEngagementFlags,o=void 0===s?function(){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.evaluateValidity=i,this.handleEngagementFlags=o,this._responseTimes=[],this._responses=[],this._correct=[],this._preserveFlags=[],this.currentBlock=void 0,this.reliabilityByBlock={},this.completed=!1}var t,n,i;return t=e,n=[{key:"appendCurrentBlockToFlags",value:function(e){var t=this;return void 0!==this.currentBlock?e.map(function(e){return"incomplete"!==e?"".concat(e,"_").concat(t.currentBlock):e}):e}},{key:"calculateReliabilityWithBlocks",value:function(){return Object.values(this.reliabilityByBlock).every(function(e){return!0===e})}},{key:"startNewBlockValidation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.evaluateValidity;if(this._responseTimes.length>0&&void 0!==e){var n=this.calculateAndUpdateFlags();this._preserveFlags=[].concat(qu(this._preserveFlags),qu(this.appendCurrentBlockToFlags(n)))}this.currentBlock=e,this.evaluateValidity=t,this._responseTimes=[],this._responses=[],this._correct=[],this.completed=!1}},{key:"markAsCompleted",value:function(){this.completed=!0,this.calculateAndUpdateFlags()}},{key:"calculateAndUpdateFlags",value:function(){var e=this.evaluateValidity({responseTimes:this._responseTimes,responses:this._responses,correct:this._correct,completed:this.completed}),t=e.flags,n=e.isReliable;return void 0!==this.currentBlock?(this.reliabilityByBlock[this.currentBlock]=n,this.handleEngagementFlags([].concat(qu(this._preserveFlags),qu(this.appendCurrentBlockToFlags(t))),this.calculateReliabilityWithBlocks(),this.reliabilityByBlock)):this.handleEngagementFlags(t,n),t}},{key:"addResponseData",value:function(e,t,n){this._responseTimes.push(e),this._responses.push(t),this._correct.push(n),this.calculateAndUpdateFlags()}}],n&&zu(t.prototype,n),i&&zu(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();const tp={name:"preload",parameters:{auto_preload:{type:gl.BOOL,pretty_name:"Auto-preload",default:!1},trials:{type:gl.TIMELINE,pretty_name:"Trials",default:[]},images:{type:gl.STRING,pretty_name:"Images",default:[],array:!0},audio:{type:gl.STRING,pretty_name:"Audio",default:[],array:!0},video:{type:gl.STRING,pretty_name:"Video",default:[],array:!0},message:{type:gl.HTML_STRING,pretty_name:"Message",default:null},show_progress_bar:{type:gl.BOOL,pretty_name:"Show progress bar",default:!0},continue_after_error:{type:gl.BOOL,pretty_name:"Continue after error",default:!1},error_message:{type:gl.HTML_STRING,pretty_name:"Error message",default:"The experiment failed to load."},show_detailed_errors:{type:gl.BOOL,pretty_name:"Show detailed errors",default:!1},max_load_time:{type:gl.INT,pretty_name:"Max load time",default:null},on_error:{type:gl.FUNCTION,pretty_name:"On error",default:null},on_success:{type:gl.FUNCTION,pretty_name:"On success",default:null}}};class np{constructor(e){this.jsPsych=e}trial(e,t){var n=null,i=!1,s=[],o=[],a=[],r=[],c=this.jsPsych.getSafeModeStatus(),l=[],u=[],p=[];if(t.auto_preload){var d=this.jsPsych.getTimeline(),m=this.jsPsych.pluginAPI.getAutoPreloadList(d);l=l.concat(m.images),u=u.concat(m.audio),p=p.concat(m.video)}if(t.trials.length>0){var h=this.jsPsych.pluginAPI.getAutoPreloadList(t.trials);l=l.concat(h.images),u=u.concat(h.audio),p=p.concat(h.video)}l=l.concat(t.images),u=u.concat(t.audio),p=p.concat(t.video),l=this.jsPsych.utils.unique(l.flat()),u=this.jsPsych.utils.unique(u.flat()),p=this.jsPsych.utils.unique(p.flat()),c&&(p=[]);var f="";null!==t.message&&(f+=t.message),t.show_progress_bar&&(f+="\n <div id='jspsych-loading-progress-bar-container' style='height: 10px; width: 300px; background-color: #ddd; margin: auto;'>\n <div id='jspsych-loading-progress-bar' style='height: 10px; width: 0%; background-color: #777;'></div>\n </div>"),e.innerHTML=f;const g=()=>{if(w++,t.show_progress_bar){var n=w/_*100,i=e.querySelector("#jspsych-loading-progress-bar");null!==i&&(i.style.width=n+"%")}},v=()=>{void 0!==i&&!1===i&&(this.jsPsych.pluginAPI.clearAllTimeouts(),this.jsPsych.pluginAPI.cancelPreloads(),n=!0,x())},y=()=>{this.jsPsych.pluginAPI.cancelPreloads(),void 0===n||!1!==n&&null!==n||(i=!0,k<_&&(n=!1),E("timeout"),r.push("<p><strong>Loading timed out.</strong><br>Consider compressing your stimuli files, loading your files in smaller batches,<br>and/or increasing the <i>max_load_time</i> parameter.</p>"),t.continue_after_error?x():b())},b=()=>{this.jsPsych.pluginAPI.clearAllTimeouts(),this.jsPsych.pluginAPI.cancelPreloads(),e.innerHTML=t.error_message,t.show_detailed_errors&&(e.innerHTML+="<p><strong>Error details:</strong></p>",r.forEach(t=>{e.innerHTML+=t}))},x=()=>{this.jsPsych.pluginAPI.clearAllTimeouts();var t={success:n,timeout:i,failed_images:s,failed_audio:o,failed_video:a};e.innerHTML="",this.jsPsych.finishTrial(t)};null!==t.max_load_time&&this.jsPsych.pluginAPI.setTimeout(y,t.max_load_time);var _=l.length+u.length+p.length,w=0,k=0;if(0==_)v();else{const e=e=>{this.jsPsych.pluginAPI.preloadVideo(p,e,T,S)},t=e=>{this.jsPsych.pluginAPI.preloadAudio(u,e,T,S)},n=e=>{this.jsPsych.pluginAPI.preloadImages(l,e,T,S)};p.length>0&&e(()=>{}),u.length>0&&t(()=>{}),l.length>0&&n(()=>{})}function S(e){g(),null==n&&(n=!1);var i="unknown file";e.source&&(i=e.source),e.error&&e.error.path&&e.error.path.length>0&&("img"==e.error.path[0].localName?s.push(i):"audio"==e.error.path[0].localName?o.push(i):"video"==e.error.path[0].localName&&a.push(i));var c="<p><strong>Error loading file: "+i+"</strong><br>";e.error.statusText&&(c+="File request response status: "+e.error.statusText+"<br>"),"404"==e.error&&(c+="404 - file not found.<br>"),void 0!==e.error.loaded&&null!==e.error.loaded&&0!==e.error.loaded?c+=e.error.loaded+" bytes transferred.":c+="File did not begin loading. Check that file path is correct and reachable by the browser,<br>and that loading is not blocked by cross-origin resource sharing (CORS) errors.",c+="</p>",r.push(c),E(i),w==_&&(t.continue_after_error?x():b())}function T(e){g(),function(e){null!==t.on_success&&t.on_success(e)}(e),++k==_?v():w==_&&(t.continue_after_error?x():b())}function E(e){null!==t.on_error&&t.on_error(e)}}simulate(e,t,n,i){"data-only"==t&&(i(),this.simulate_data_only(e,n)),"visual"==t&&this.simulate_visual(e,n,i)}create_simulation_data(e,t){return this.jsPsych.pluginAPI.mergeSimulationData({success:!0,timeout:!1,failed_images:[],failed_audio:[],failed_video:[]},t)}simulate_data_only(e,t){const n=this.create_simulation_data(e,t);this.jsPsych.finishTrial(n)}simulate_visual(e,t,n){const i=this.jsPsych.getDisplayElement();this.trial(i,e),n()}}np.info=tp;var ip={},sp={},op={exports:{}};!function(e){function t(e,t){this.low=e,this.high=t,this.random_sample=function(){return Math.random()*(this.high-this.low)+this.low}}function n(e,t){this.low=e,this.high=t,this.random_sample=function(){var e=Math.random()*(this.high-this.low)+this.low;return Math.round(e)}}function i(e){this.categories=e,this.random_sample=function(){var e=this.categories.length,t=Math.round(Math.random()*(e-1));return this.categories[t]}}function s(e){this.dimensions=e,this.rsv=function(e){for(var t=[],n=0;n<e;n++){var i=[];for(var s of this.dimensions)i.push(s.random_sample());t.push(i)}return t}}function o(t){this.space=e.exports.to_space(t),this.X=[],this.Y=[],this.best_x=null,this.best_y=null,this.ask=function(e=null){return null==e?this.space.rsv(1)[0]:this.space.rsv(e)},this.tell=function(e,t){for(var n=0;n<e.length;n++)(null==this.best_y||t[n]<this.best_y)&&(this.best_y=t[n],this.best_x=e[n]);this.X=this.X.concat(e),this.Y=this.Y.concat(t)}}function a(s,o=13,a=.1){this.space=e.exports.to_space(s),this.n_random_starts=o,this.mutation_rate=a,this.n_random_starts_=o,this.X=[],this.Y=[],this.best_x=null,this.best_y=null,this.rnd=function(e=null){return null==e&&(e=this.mutation_rate),Math.random()<e},this.ask=function(){if(this.n_random_starts_>0)return this.space.rsv(1)[0];for(finished=!1;!finished;){for(var e=[],s=this.X[0],o=this.Y[0],a=1;a<this.Y.length;a++)this.Y[a]<o&&(s=this.X[a],o=this.Y[a]);for(a=0;a<this.space.dimensions.length;a++){var r=s[a],c=this.space.dimensions[a];if(c instanceof i&&this.rnd()){var l=Math.round(Math.random()*(c.categories.length-1));r=c.categories[l],finished=!0}if((c instanceof t||c instanceof n)&&this.rnd()){for(var u=c.low,p=c.high,d=-16;d<=1;d++)this.rnd()&&(finished=!0,this.rnd(.5)?diff=p-r:diff=u-r,r+=diff*Math.pow(2,d));r<u&&(r=u),r>p&&(r=p),c instanceof n&&(r=Math.round(r))}e.push(r)}}return e},this.tell=function(e,t){for(var n=0;n<e.length;n++)this.n_random_starts_-=1,(null==this.best_y||t[n]<this.best_y)&&(this.best_y=t[n],this.best_x=e[n]);this.n_random_starts_<0&&(this.n_random_starts_=0),this.X=this.X.concat(e),this.Y=this.Y.concat(t)}}function r(e){for(var t=[],n=0;n<e.length;n++)t.push(n);for(n=0;n<e.length;n++){var i=Math.floor(Math.random()*n),s=t[n];t[n]=t[i],t[i]=s}return t}function c(e,t){for(var n=0,i=0;i<e.length;i++)n+=e[i]*t[i];return n}function l(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++)n[i]=e[i]-t[i];return n}function u(e,t,n){for(var i=0;i<e.length;i++)e[i]=e[i]+t*n[i];return e}function p(e,t){for(var n=0;n<e.length;n++)if(Math.abs(e[n])>=t)return!1;return!0}e.exports.Real=function(e,n){return new t(e,n)},e.exports.Integer=function(e,t){return new n(e,t)},e.exports.Categorical=function(e){return new i(e)},e.exports.Space=function(e){return new s(e)},e.exports.to_space=function(t){if(t instanceof Array)return e.exports.Space(t);if(t instanceof s)return t;throw"Unknown space definition"},e.exports.RandomOptimizer=function(e){return new o(e)},e.exports.OMGOptimizer=function(e,t=13,n=.1){return new a(e,t,n)},e.exports.dummy_minimize=function(t,n,i=64){for(var s=e.exports.RandomOptimizer(n),o=0;o<i;o++){var a=s.ask(),r=t(a);s.tell([a],[r])}return s},e.exports.rs_minimize=function(t,n,i=64,s=13,o=.1){for(var a=e.exports.OMGOptimizer(n,s,o),r=0;r<i;r++){var c=a.ask(),l=t(c);a.tell([c],[l])}return a},e.exports.minimize_Powell=function(e,t,n=.01,i=.001){for(var s=!1,o=t.slice(),a=Math.exp(10),c=e(o);!s;){var l=r(o);s=!0;for(var u=0;u<l.length;u++){o[l[u]]+=1e-6;var p=e(o);o[l[u]]-=1e-6;var d=(p-c)/1e-6;Math.abs(d)>n&&(s=!1),o[l[u]]=o[l[u]]-i*d,c=e(o)}i=a>c?1.1*i:.7*i,a=c}var m={};return m.argument=o,m.fncvalue=c,m},e.exports.minimize_GradientDescent=function(e,t,n){for(var i=n.slice(),s=!1,o=.01,a=e(i);!s;){var r=t(i);if(s=p(r,.001))break;for(var c=!0;c;){var l=i.slice();u(l,-o,r);var d=e(l);o=(c=a<d)?.7*o:1.1*o}i=l,a=d}var m={};return m.argument=i,m.fncvalue=d,m},e.exports.minimize_L_BFGS=function(e,t,n){for(var i=n.slice(),s=.001,o=e(i),a=[],r=[],d=t(i),m=d.slice();;){var h=i.slice();u(h,s,m);var f=e(h);s=o<f?.5*s:1.2*s;var g=t(h);if(p(g,1e-5))break;var v=l(h,i),y=l(g,d);a.unshift(v),r.unshift(y),c(v,y),a.length>5&&(a.pop(),r.pop());for(var b=d.slice(),x=new Array(a.length),_=0;_<a.length;_++){var w=1/c(a[_],r[_]);x[_]=w*c(a[_],b),u(b,-x[_],r[_])}var k=c(v,y)/c(y,y);for(_=0;_<b.length;_++)b[_]=b[_]*k;for(_=0;_<a.length;_++){var S=a.length-_-1,T=1/c(a[S],r[S])*c(r[S],b);u(b,x[S]-T,a[S])}m=b.slice();for(_=0;_<m.length;_++)m[_]=-m[_];o=f,i=h,d=g}var E={};return E.argument=i,E.fncvalue=f,E}}(op);var ap=op.exports,rp={},cp=function(e,t,n,i,s){var o,a;if(void 0===i)i=0;else if((i|=0)<0||i>=e.length)throw new RangeError("invalid lower bound");if(void 0===s)s=e.length-1;else if((s|=0)<i||s>=e.length)throw new RangeError("invalid upper bound");for(;i<=s;)if((a=+n(e[o=i+(s-i>>>1)],t,o,e))<0)i=o+1;else{if(!(a>0))return o;s=o-1}return~i},lp={},up=en,pp=Rt,dp=P?P.isConcatSpreadable:void 0;var mp=Pt,hp=function(e){return pp(e)||up(e)||!!(dp&&e&&e[dp])};var fp=function e(t,n,i,s,o){var a=-1,r=t.length;for(i||(i=hp),o||(o=[]);++a<r;){var c=t[a];n>0&&i(c)?n>1?e(c,n-1,i,s,o):mp(o,c):s||(o[o.length]=c)}return o},gp=fp;var vp=function(e){return(null==e?0:e.length)?gp(e,1):[]};var yp=function(e){return function(){return e}};var bp=function(e){return function(t,n,i){for(var s=-1,o=Object(t),a=i(t),r=a.length;r--;){var c=a[e?r:++s];if(!1===n(o[c],c,o))break}return t}},xp=bp(),_p=qn;var wp=function(e,t){return e&&xp(e,t,_p)},kp=wp;var Sp=function(e,t,n,i){return kp(e,function(e,s,o){t(i,n(e),s,o)}),i},Tp=Sp;var Ep=yp,Cp=function(e,t){return function(n,i){return Tp(n,e,t(i),{})}},Ip=Ws,Op=Object.prototype.toString,jp=Cp(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Op.call(t)),e[t]=n},Ep(Ip)),Ap=jp,Lp=Mn,Pp=vi,Rp=en,Mp=Rt,Np=Fn,Dp=sn,Fp=On,Bp=bn,$p=Object.prototype.hasOwnProperty;var zp=function(e){if(null==e)return!0;if(Np(e)&&(Mp(e)||"string"==typeof e||"function"==typeof e.splice||Dp(e)||Bp(e)||Rp(e)))return!e.length;var t=Pp(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Fp(e))return!Lp(e).length;for(var n in e)if($p.call(e,n))return!1;return!0},qp=mo,Up=wp,Hp=ro;var Vp=function(e,t){var n={};return t=Hp(t),Up(e,function(e,i,s){qp(n,t(e,i,s),e)}),n};var Kp=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Wp=Math.max;var Gp=function(e,t,n){return t=Wp(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=Wp(i.length-t,0),a=Array(o);++s<o;)a[s]=i[t+s];s=-1;for(var r=Array(t+1);++s<t;)r[s]=i[s];return r[t]=n(a),Kp(e,this,r)}},Yp=yp,Jp=uo,Zp=Jp?function(e,t){return Jp(e,"toString",{configurable:!0,enumerable:!1,value:Yp(t),writable:!0})}:Ws,Xp=Date.now;var Qp=function(e){var t=0,n=0;return function(){var i=Xp(),s=16-(i-n);if(n=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Zp),ed=Ws,td=Gp,nd=Qp;var id=function(e,t){return nd(td(e,t,ed),e+"")};var sd=function(e,t,n,i){for(var s=e.length,o=n+(i?1:-1);i?o--:++o<s;)if(t(e[o],o,e))return o;return-1},od=function(e){return e!=e},ad=function(e,t,n){for(var i=n-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1};var rd=function(e,t,n){return t==t?ad(e,t,n):sd(e,od,n)};var cd=function(e,t){return!!(null==e?0:e.length)&&rd(e,t,0)>-1};var ld=function(e,t,n){for(var i=-1,s=null==e?0:e.length;++i<s;)if(n(t,e[i]))return!0;return!1};var ud=Xn,pd=function(){},dd=ud&&1/St(new ud([,-0]))[1]==1/0?function(e){return new ud(e)}:pd,md=gt,hd=cd,fd=ld,gd=vt,vd=dd,yd=St;var bd=function(e,t,n){var i=-1,s=hd,o=e.length,a=!0,r=[],c=r;if(n)a=!1,s=fd;else if(o>=200){var l=t?null:vd(e);if(l)return yd(l);a=!1,s=gd,c=new md}else c=t?[]:r;e:for(;++i<o;){var u=e[i],p=t?t(u):u;if(u=n||0!==u?u:0,a&&p==p){for(var d=c.length;d--;)if(c[d]===p)continue e;t&&c.push(p),r.push(u)}else s(c,p,n)||(c!==r&&c.push(p),r.push(u))}return r},xd=Fn,_d=Kt;var wd=function(e){return _d(e)&&xd(e)},kd=fp,Sd=bd,Td=wd,Ed=id(function(e){return Sd(kd(e,1,Td,!0))}),Cd=bd;var Id=function(e){return e&&e.length?Cd(e):[]};var Od=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e},jd=vo,Ad=mo;var Ld=function(e,t,n,i){var s=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var r=t[o],c=i?i(n[r],e[r],r,n,e):void 0;void 0===c&&(c=e[r]),s?Ad(n,r,c):jd(n,r,c)}return n},Pd=Ld,Rd=qn;var Md=function(e,t){return e&&Pd(t,Rd(t),e)},Nd=Ld,Dd=Uo;var Fd=function(e,t){return e&&Nd(t,Dd(t),e)},Bd={exports:{}};!function(e,t){var n=L,i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,o=s&&s.exports===i?n.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,i=a?a(n):new e.constructor(n);return e.copy(i),i}}(Bd,Bd.exports);var $d=Bd.exports,zd=Ld,qd=Ht;var Ud=function(e,t){return zd(e,qd(e),t)},Hd=Ld,Vd=Po;var Kd=function(e,t){return Hd(e,Vd(e),t)},Wd=Object.prototype.hasOwnProperty;var Gd=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Wd.call(e,"index")&&(n.index=e.index,n.input=e.input),n},Yd=wt;var Jd=function(e){var t=new e.constructor(e.byteLength);return new Yd(t).set(new Yd(e)),t},Zd=Jd;var Xd=function(e,t){var n=t?Zd(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},Qd=/\w*$/;var em=function(e){var t=new e.constructor(e.source,Qd.exec(e));return t.lastIndex=e.lastIndex,t},tm=P?P.prototype:void 0,nm=tm?tm.valueOf:void 0;var im=Jd;var sm=Jd,om=Xd,am=em,rm=function(e){return nm?Object(nm.call(e)):{}},cm=function(e,t){var n=t?im(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var lm=function(e,t,n){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return sm(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return om(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return cm(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return am(e);case"[object Symbol]":return rm(e)}},um=V,pm=Object.create,dm=function(){function e(){}return function(t){if(!um(t))return{};if(pm)return pm(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),mm=Io,hm=On;var fm=function(e){return"function"!=typeof e.constructor||hm(e)?{}:dm(mm(e))},gm=vi,vm=Kt;var ym=function(e){return vm(e)&&"[object Map]"==gm(e)},bm=mn,xm=fn&&fn.isMap,_m=xm?bm(xm):ym,wm=vi,km=Kt;var Sm=function(e){return km(e)&&"[object Set]"==wm(e)},Tm=mn,Em=fn&&fn.isSet,Cm=Em?Tm(Em):Sm,Im=pt,Om=Od,jm=vo,Am=Md,Lm=Fd,Pm=$d,Rm=kc,Mm=Ud,Nm=Kd,Dm=Kn,Fm=Wo,Bm=vi,$m=Gd,zm=lm,qm=fm,Um=Rt,Hm=sn,Vm=_m,Km=V,Wm=Cm,Gm=qn,Ym=Uo,Jm="[object Arguments]",Zm="[object Function]",Xm="[object Object]",Qm={};Qm[Jm]=Qm["[object Array]"]=Qm["[object ArrayBuffer]"]=Qm["[object DataView]"]=Qm["[object Boolean]"]=Qm["[object Date]"]=Qm["[object Float32Array]"]=Qm["[object Float64Array]"]=Qm["[object Int8Array]"]=Qm["[object Int16Array]"]=Qm["[object Int32Array]"]=Qm["[object Map]"]=Qm["[object Number]"]=Qm[Xm]=Qm["[object RegExp]"]=Qm["[object Set]"]=Qm["[object String]"]=Qm["[object Symbol]"]=Qm["[object Uint8Array]"]=Qm["[object Uint8ClampedArray]"]=Qm["[object Uint16Array]"]=Qm["[object Uint32Array]"]=!0,Qm["[object Error]"]=Qm[Zm]=Qm["[object WeakMap]"]=!1;var eh=function e(t,n,i,s,o,a){var r,c=1&n,l=2&n,u=4&n;if(i&&(r=o?i(t,s,o,a):i(t)),void 0!==r)return r;if(!Km(t))return t;var p=Um(t);if(p){if(r=$m(t),!c)return Rm(t,r)}else{var d=Bm(t),m=d==Zm||"[object GeneratorFunction]"==d;if(Hm(t))return Pm(t,c);if(d==Xm||d==Jm||m&&!o){if(r=l||m?{}:qm(t),!c)return l?Nm(t,Lm(r,t)):Mm(t,Am(r,t))}else{if(!Qm[d])return o?t:{};r=zm(t,d,c)}}a||(a=new Im);var h=a.get(t);if(h)return h;a.set(t,r),Wm(t)?t.forEach(function(s){r.add(e(s,n,i,s,t,a))}):Vm(t)&&t.forEach(function(s,o){r.set(o,e(s,n,i,o,t,a))});var f=p?void 0:(u?l?Fm:Dm:l?Ym:Gm)(t);return Om(f||t,function(s,o){f&&(s=t[o=s]),jm(r,o,e(s,n,i,o,t,a))}),r};var th=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var nh=function(e,t,n){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++i<s;)o[i]=e[i+t];return o},ih=Ts,sh=nh;var oh=function(e,t){return t.length<2?e:ih(e,sh(t,0,-1))},ah=xs,rh=th,ch=oh,lh=ws;var uh=function(e,t){return t=ah(t,e),null==(e=ch(e,t))||delete e[lh(rh(t))]},ph=H,dh=Io,mh=Kt,hh=Function.prototype,fh=Object.prototype,gh=hh.toString,vh=fh.hasOwnProperty,yh=gh.call(Object);var bh=function(e){if(!mh(e)||"[object Object]"!=ph(e))return!1;var t=dh(e);if(null===t)return!0;var n=vh.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&gh.call(n)==yh};var xh=vp,_h=Gp,wh=Qp;var kh=rs,Sh=eh,Th=uh,Eh=xs,Ch=Ld,Ih=function(e){return bh(e)?void 0:e},Oh=Wo,jh=function(e){return wh(_h(e,void 0,xh),e+"")}(function(e,t){var n={};if(null==e)return n;var i=!1;t=kh(t,function(t){return t=Eh(t,e),i||(i=t.length>1),t}),Ch(e,Oh(e),n),i&&(n=Sh(n,7,Ih));for(var s=t.length;s--;)Th(n,t[s]);return n}),Ah=jh;!function(e){var t=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.prepareClowderCorpus=e.filterItemsByCatParameterAvailability=e.checkNoDuplicateCatNames=e.convertZeta=e.fillZetaDefaults=e.validateZetaParams=e.ensureZetaNumericValues=e.defaultZeta=e.ZETA_KEY_MAP=void 0;const i=t(vp),s=t(Ap),o=t(zp),a=t(Vp),r=t(Ed),c=t(Id),l=t(Ah);e.ZETA_KEY_MAP={a:"discrimination",b:"difficulty",c:"guessing",d:"slipping"};e.defaultZeta=(t="symbolic")=>(0,e.convertZeta)({a:1,b:0,c:0,d:1},t);e.ensureZetaNumericValues=e=>{const t={};return Object.entries(e).forEach(([e,n])=>{if(null!=n&&""!==n&&"NA"!==String(n).toUpperCase()){const i=Number(n);Number.isFinite(i)&&(t[e]=i)}}),t};e.validateZetaParams=(e,t=!1)=>{if(void 0!==e.a&&void 0!==e.discrimination)throw new Error("This item has both an `a` key and `discrimination` key. Please provide only one.");if(void 0!==e.b&&void 0!==e.difficulty)throw new Error("This item has both a `b` key and `difficulty` key. Please provide only one.");if(void 0!==e.c&&void 0!==e.guessing)throw new Error("This item has both a `c` key and `guessing` key. Please provide only one.");if(void 0!==e.d&&void 0!==e.slipping)throw new Error("This item has both a `d` key and `slipping` key. Please provide only one.");if(t){if(void 0===e.a&&void 0===e.discrimination)throw new Error("This item is missing the key `a` or `discrimination`.");if(void 0===e.b&&void 0===e.difficulty)throw new Error("This item is missing the key `b` or `difficulty`.");if(void 0===e.c&&void 0===e.guessing)throw new Error("This item is missing the key `c` or `guessing`.");if(void 0===e.d&&void 0===e.slipping)throw new Error("This item is missing the key `d` or `slipping`.")}};e.fillZetaDefaults=(t,n="symbolic")=>Object.assign(Object.assign({},(0,e.defaultZeta)(n)),(0,e.convertZeta)(t,n));e.convertZeta=(t,n)=>{if(!["symbolic","semantic"].includes(n))throw new Error(`Invalid desired format. Expected 'symbolic' or'semantic'. Received ${n} instead.`);return(0,a.default)(t,(t,i)=>{if("symbolic"===n){const t=(0,s.default)(e.ZETA_KEY_MAP);return i in t?t[i]:i}return i in e.ZETA_KEY_MAP?e.ZETA_KEY_MAP[i]:i})};e.checkNoDuplicateCatNames=e=>{const t=e.map(e=>e.zetas);for(const e of t){const t=e.map(({cats:e})=>e),n=(0,r.default)(...t),s=(0,i.default)(t);if(n.length!==s.length){for(const e of n){const t=s.findIndex(t=>t===e);t>=0&&s.splice(t,1)}throw new Error(`The cat names ${(0,c.default)(s).join(", ")} are present in multiple corpora.`)}}};e.filterItemsByCatParameterAvailability=(e,t)=>({available:e.filter(e=>e.zetas.some(e=>e.cats.includes(t))),missing:e.filter(e=>!e.zetas.some(e=>e.cats.includes(t)))});e.prepareClowderCorpus=(t,n,i,s="symbolic")=>t.map(t=>{const a=n.map(n=>{const o={};return Object.keys(t).forEach(e=>{if(e.startsWith(n+i)){const n=e.split(i)[1];o[n]=t[e]}}),{cats:[n],zeta:(0,e.convertZeta)((0,e.ensureZetaNumericValues)(o),s)}}).filter(e=>!(0,o.default)(e.zeta)),r=(0,l.default)(t,Object.keys(t).filter(e=>n.some(t=>e.startsWith(t+i))));return Object.assign(Object.assign({},r),{zetas:a})})}(lp);var Lh=Math.ceil,Ph=Math.max;var Rh=o,Mh=Fn,Nh=an,Dh=V;var Fh=Fr,Bh=1/0;var $h=function(e){return e?(e=Fh(e))===Bh||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},zh=function(e,t,n,i){for(var s=-1,o=Ph(Lh((t-e)/(n||1)),0),a=Array(o);o--;)a[i?o:++s]=e,e+=n;return a},qh=function(e,t,n){if(!Dh(n))return!1;var i=typeof t;return!!("number"==i?Mh(n)&&Nh(t,n.length):"string"==i&&t in n)&&Rh(n[t],e)},Uh=$h;var Hh=function(e){return function(t,n,i){return i&&"number"!=typeof i&&qh(t,n,i)&&(n=i=void 0),t=Uh(t),void 0===n?(n=t,t=0):n=Uh(n),i=void 0===i?t<n?1:-1:Uh(i),zh(t,n,i,e)}}(),Vh=$h;var Kh=function(e){var t=Vh(e),n=t%1;return t==t?n?t-n:t:0},Wh=Fr,Gh=fs,Yh=L.isFinite,Jh=Math.min;var Zh=function(e){var t=Math[e];return function(e,n){if(e=Wh(e),(n=null==n?0:Jh(Kh(n),292))&&Yh(e)){var i=(Gh(e)+"e").split("e"),s=t(i[0]+"e"+(+i[1]+n));return+((i=(Gh(s)+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}("round");!function(e){var t=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.findClosest=e.uniform=e.normal=e.fisherInformation=e.itemResponseFunction=void 0;const i=t(cp),s=lp,o=t(Hh),a=t(Zh);e.itemResponseFunction=(e,t)=>{const n=(0,s.fillZetaDefaults)(t,"symbolic");return n.c+(n.d-n.c)/(1+Math.exp(-n.a*(e-n.b)))};e.fisherInformation=(t,n)=>{const i=(0,s.fillZetaDefaults)(n,"symbolic"),o=(0,e.itemResponseFunction)(t,i),a=1-o;return Math.pow(i.a,2)*(a/o)*(Math.pow(o-i.c,2)/Math.pow(1-i.c,2))};e.normal=(e=0,t=1,n=-4,i=4,s=.1)=>{function r(n){return 1/(Math.sqrt(2*Math.PI)*t)*Math.exp(-Math.pow(n-e,2)/(2*Math.pow(t,2)))}return(0,o.default)(n,i+s,s).map(e=>[(0,a.default)(e,6),r(e)])};e.uniform=(e=-4,t=4,n=.1,i,s)=>{const r=null!=i?i:e,c=null!=s?s:t,l=(0,o.default)(r,c+n/2,n).map(e=>(0,a.default)(e,6)),u=1/l.filter(n=>n>=e&&n<=t).length;return l.map(n=>[n,n>=e&&n<=t?u:0])};e.findClosest=(e,t)=>{const n=e.map(e=>(0,s.fillZetaDefaults)(e,"semantic"));if(t<=n[0].difficulty)return 0;if(t>=n[n.length-1].difficulty)return n.length-1;const o=(0,i.default)(n,t,(e,t)=>e.difficulty-t);if(o>=0)return o;{const e=-2-o,i=-1-o;return Math.abs(n[e].difficulty-t)<Math.abs(n[i].difficulty-t)?e:i}}}(rp);var Xh={exports:{}};!function(e,t,n){function i(e){var t=this,n=function(){var e=4022871197,t=function(t){t=String(t);for(var n=0;n<t.length;n++){var i=.02519603282416938*(e+=t.charCodeAt(n));i-=e=i>>>0,e=(i*=e)>>>0,e+=4294967296*(i-=e)}return 2.3283064365386963e-10*(e>>>0)};return t}();t.next=function(){var e=2091639*t.s0+2.3283064365386963e-10*t.c;return t.s0=t.s1,t.s1=t.s2,t.s2=e-(t.c=0|e)},t.c=1,t.s0=n(" "),t.s1=n(" "),t.s2=n(" "),t.s0-=n(e),t.s0<0&&(t.s0+=1),t.s1-=n(e),t.s1<0&&(t.s1+=1),t.s2-=n(e),t.s2<0&&(t.s2+=1),n=null}function s(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function o(e,t){var n=new i(e),o=t&&t.state,a=n.next;return a.int32=function(){return 4294967296*n.next()|0},a.double=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.quick=a,o&&("object"==typeof o&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.alea=o}(0,Xh,!1);var Qh=Xh.exports,ef={exports:{}};!function(e,t,n){function i(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var i=0;i<n.length+64;i++)t.x^=0|n.charCodeAt(i),t.next()}function s(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function o(e,t){var n=new i(e),o=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,o&&("object"==typeof o&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.xor128=o}(0,ef,!1);var tf=ef.exports,nf={exports:{}};!function(e,t,n){function i(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var i=0;i<n.length+64;i++)t.x^=0|n.charCodeAt(i),i==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function s(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function o(e,t){var n=new i(e),o=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,o&&("object"==typeof o&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.xorwow=o}(0,nf,!1);var sf=nf.exports,of={exports:{}};!function(e,t,n){function i(e){var t=this;t.next=function(){var e,n,i=t.x,s=t.i;return e=i[s],n=(e^=e>>>7)^e<<24,n^=(e=i[s+1&7])^e>>>10,n^=(e=i[s+3&7])^e>>>3,n^=(e=i[s+4&7])^e<<7,e=i[s+7&7],n^=(e^=e<<13)^e<<9,i[s]=n,t.i=s+1&7,n},function(e,t){var n,i=[];if(t===(0|t))i[0]=t;else for(t=""+t,n=0;n<t.length;++n)i[7&n]=i[7&n]<<15^t.charCodeAt(n)+i[n+1&7]<<13;for(;i.length<8;)i.push(0);for(n=0;n<8&&0===i[n];++n);for(8==n?i[7]=-1:i[n],e.x=i,e.i=0,n=256;n>0;--n)e.next()}(t,e)}function s(e,t){return t.x=e.x.slice(),t.i=e.i,t}function o(e,t){null==e&&(e=+new Date);var n=new i(e),o=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,o&&(o.x&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.xorshift7=o}(0,of,!1);var af=of.exports,rf={exports:{}};!function(e,t,n){function i(e){var t=this;t.next=function(){var e,n,i=t.w,s=t.X,o=t.i;return t.w=i=i+1640531527|0,n=s[o+34&127],e=s[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=s[o]=n^e,t.i=o,n+(i^i>>>16)|0},function(e,t){var n,i,s,o,a,r=[],c=128;for(t===(0|t)?(i=t,t=null):(t+="\0",i=0,c=Math.max(c,t.length)),s=0,o=-32;o<c;++o)t&&(i^=t.charCodeAt((o+32)%t.length)),0===o&&(a=i),i^=i<<10,i^=i>>>15,i^=i<<4,i^=i>>>13,o>=0&&(a=a+1640531527|0,s=0==(n=r[127&o]^=i+a)?s+1:0);for(s>=128&&(r[127&(t&&t.length||0)]=-1),s=127,o=512;o>0;--o)i=r[s+34&127],n=r[s=s+1&127],i^=i<<13,n^=n<<17,i^=i>>>15,n^=n>>>12,r[s]=i^n;e.w=a,e.X=r,e.i=s}(t,e)}function s(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function o(e,t){null==e&&(e=+new Date);var n=new i(e),o=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,o&&(o.X&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.xor4096=o}(0,rf,!1);var cf=rf.exports,lf={exports:{}};!function(e,t,n){function i(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,i=t.d,s=t.a;return e=e<<25^e>>>7^n,n=n-i|0,i=i<<24^i>>>8^s,s=s-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-i|0,t.d=i<<16^n>>>16^s,t.a=s-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var i=0;i<n.length+20;i++)t.b^=0|n.charCodeAt(i),t.next()}function s(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function o(e,t){var n=new i(e),o=t&&t.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},a.int32=n.next,a.quick=a,o&&("object"==typeof o&&s(o,n),a.state=function(){return s(n,{})}),a}t&&t.exports?t.exports=o:n&&n.amd?n(function(){return o}):this.tychei=o}(0,lf,!1);var uf=lf.exports,pf={exports:{}};!function(e){!function(t,n,i){var s,o=256,a="random",r=i.pow(o,6),c=i.pow(2,52),l=2*c,u=255;function p(e,u,p){var v=[],y=f(h((u=1==u?{entropy:!0}:u||{}).entropy?[e,g(n)]:null==e?function(){try{var e;return s&&(e=s.randomBytes)?e=e(o):(e=new Uint8Array(o),(t.crypto||t.msCrypto).getRandomValues(e)),g(e)}catch(e){var i=t.navigator,a=i&&i.plugins;return[+new Date,t,a,t.screen,g(n)]}}():e,3),v),b=new d(v),x=function(){for(var e=b.g(6),t=r,n=0;e<c;)e=(e+n)*o,t*=o,n=b.g(1);for(;e>=l;)e/=2,t/=2,n>>>=1;return(e+n)/t};return x.int32=function(){return 0|b.g(4)},x.quick=function(){return b.g(4)/4294967296},x.double=x,f(g(b.S),n),(u.pass||p||function(e,t,n,s){return s&&(s.S&&m(s,b),e.state=function(){return m(b,{})}),n?(i[a]=e,t):e})(x,y,"global"in u?u.global:this==i,u.state)}function d(e){var t,n=e.length,i=this,s=0,a=i.i=i.j=0,r=i.S=[];for(n||(e=[n++]);s<o;)r[s]=s++;for(s=0;s<o;s++)r[s]=r[a=u&a+e[s%n]+(t=r[s])],r[a]=t;(i.g=function(e){for(var t,n=0,s=i.i,a=i.j,r=i.S;e--;)t=r[s=u&s+1],n=n*o+r[u&(r[s]=r[a=u&a+t])+(r[a]=t)];return i.i=s,i.j=a,n})(o)}function m(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function h(e,t){var n,i=[],s=typeof e;if(t&&"object"==s)for(n in e)try{i.push(h(e[n],t-1))}catch(e){}return i.length?i:"string"==s?e:e+"\0"}function f(e,t){for(var n,i=e+"",s=0;s<i.length;)t[u&s]=u&(n^=19*t[u&s])+i.charCodeAt(s++);return g(t)}function g(e){return String.fromCharCode.apply(0,e)}if(f(i.random(),n),e.exports){e.exports=p;try{s=require("crypto")}catch(e){}}else i["seed"+a]=p}("undefined"!=typeof self?self:n,[],Math)}(pf);var df=Qh,mf=tf,hf=sf,ff=af,gf=cf,vf=uf,yf=pf.exports;yf.alea=df,yf.xor128=mf,yf.xorwow=hf,yf.xorshift7=ff,yf.xor4096=gf,yf.tychei=vf;var bf=yf,xf=eh;var _f=function(e){return xf(e,5)},wf=i(_f),kf=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sp,"__esModule",{value:!0}),sp.Cat=void 0;const Sf=ap,Tf=rp,Ef=lp,Cf=kf(bf),If=kf(qr),Of=kf(_f);class jf{constructor({method:e="MLE",itemSelect:t="MFI",nStartItems:n=0,startSelect:i="middle",theta:s=0,minTheta:o=-6,maxTheta:a=6,priorDist:r="norm",priorPar:c=("unif"===r?[-4,4]:[0,1]),randomSeed:l=null}={}){this.method=jf.validateMethod(e),this.itemSelect=jf.validateItemSelect(t),this.startSelect=jf.validateStartSelect(i),this.minTheta=o,this.maxTheta=a,this.priorDist=r,this.priorPar=c,this._zetas=[],this._resps=[],this._theta=s,this._seMeasurement=Number.MAX_VALUE,this.nStartItems=n,this._rng=null===l?(0,Cf.default)():(0,Cf.default)(l),this._prior="eap"===this.method?jf.validatePrior(r,c,o,a):[]}get theta(){return this._theta}get seMeasurement(){return this._seMeasurement}get nItems(){return this._resps.length}get resps(){return this._resps}get zetas(){return this._zetas}get prior(){return this._prior}static validatePrior(e,t,n,i){if("norm"===e){if(2!==t.length)throw new Error(`The prior distribution parameters should be an array of two numbers. Received ${t}.`);const[e,s]=t;if(s<=0)throw new Error(`Expected a positive prior distribution standard deviation. Received ${s}`);if(e<n||e>i)throw new Error(`Expected the prior distribution mean to be between the min and max theta. Received mean: ${e}, min: ${n}, max: ${i}`);return(0,Tf.normal)(e,s,n,i)}if("unif"===e){if(2!==t.length)throw new Error(`The prior distribution parameters should be an array of two numbers. Received ${t}.`);const[e,s]=t;if(e>=s)throw new Error(`The uniform distribution bounds you provided are not valid (min must be less than max). Received min: ${e} and max: ${s}`);if(e<n||s>i)throw new Error(`The uniform distribution bounds you provided are not within theta bounds. Received minTheta: ${n}, minSupport: ${e}, maxSupport: ${s}, maxTheta: ${i}.`);return(0,Tf.uniform)(e,s,.1,n,i)}throw new Error(`priorDist must be "unif" or "norm." Received ${e} instead.`)}static validateMethod(e){const t=e.toLowerCase();if(!["mle","eap"].includes(t))throw new Error("The abilityEstimator you provided is not in the list of valid methods");return t}static validateItemSelect(e){const t=e.toLowerCase();if(!["mfi","random","closest","fixed"].includes(t))throw new Error("The itemSelector you provided is not in the list of valid methods");return t}static validateStartSelect(e){const t=e.toLowerCase();if(!["random","middle","fixed"].includes(t))throw new Error("The startSelect you provided is not in the list of valid methods");return t}updateAbilityEstimate(e,t,n=this.method){if(n=jf.validateMethod(n),e=Array.isArray(e)?e:[e],t=Array.isArray(t)?t:[t],(e=e.map(e=>(0,Ef.ensureZetaNumericValues)(e))).forEach(e=>(0,Ef.validateZetaParams)(e,!0)),e.length!==t.length)throw new Error("Unmatched length between answers and item params");this._zetas.push(...e),this._resps.push(...t),"eap"===n?this._theta=this.estimateAbilityEAP():"mle"===n&&(this._theta=this.estimateAbilityMLE()),this._theta=(0,If.default)(this._theta,this.minTheta,this.maxTheta),this.calculateSE()}estimateAbilityEAP(){let e=0,t=0;return this._prior.forEach(([n,i])=>{const s=Math.exp(this.likelihood(n));e+=n*s*i,t+=s*i}),e/t}estimateAbilityMLE(){return(0,Sf.minimize_Powell)(this.negLikelihood.bind(this),[0]).argument[0]}negLikelihood(e){return-this.likelihood(e[0])}likelihood(e){return this._zetas.reduce((t,n,i)=>{const s=(0,Tf.itemResponseFunction)(e,n);return 1===this._resps[i]?t+Math.log(s):t+Math.log(1-s)},1)}calculateSE(){const e=this._zetas.reduce((e,t)=>e+(0,Tf.fisherInformation)(this._theta,t),0);this._seMeasurement=1/Math.sqrt(e)}findNextItem(e,t=this.itemSelect,n=!0){let i,s=jf.validateItemSelect(t);return i=n?(0,Of.default)(e):e,i=i.map(e=>(0,Ef.fillZetaDefaults)(e,"semantic")),this.nItems<this.nStartItems&&(s=this.startSelect),"mfi"!==s&&"fixed"!==s&&i.sort((e,t)=>e.difficulty-t.difficulty),"middle"===s?this.selectorMiddle(i):"closest"===s?this.selectorClosest(i):"random"===s?this.selectorRandom(i):"fixed"===s?this.selectorFixed(i):this.selectorMFI(i)}selectorMFI(e){const t=e.map(e=>(0,Ef.fillZetaDefaults)(e,"semantic")).map(e=>Object.assign({fisherInformation:(0,Tf.fisherInformation)(this._theta,(0,Ef.fillZetaDefaults)(e,"symbolic"))},e));return t.sort((e,t)=>t.fisherInformation-e.fisherInformation),t.forEach(e=>{delete e.fisherInformation}),{nextStimulus:t[0],remainingStimuli:t.slice(1).sort((e,t)=>e.difficulty-t.difficulty)}}selectorMiddle(e){let t;t=Math.floor(e.length/2),e.length>=this.nStartItems&&(t+=this.randomInteger(-Math.floor(this.nStartItems/2),Math.floor(this.nStartItems/2)));const n=e[t];return e.splice(t,1),{nextStimulus:n,remainingStimuli:e}}selectorClosest(e){const t=(0,Tf.findClosest)(e,this._theta+.481),n=e[t];return e.splice(t,1),{nextStimulus:n,remainingStimuli:e}}selectorRandom(e){const t=this.randomInteger(0,e.length-1);return{nextStimulus:e.splice(t,1)[0],remainingStimuli:e}}selectorFixed(e){return{nextStimulus:e.shift(),remainingStimuli:e}}randomInteger(e,t){return Math.floor(this._rng()*(t-e+1))+e}}sp.Cat=jf;var Af={},Lf=gt,Pf=cd,Rf=ld,Mf=rs,Nf=mn,Df=vt;var Ff=function(e,t,n,i){var s=-1,o=Pf,a=!0,r=e.length,c=[],l=t.length;if(!r)return c;n&&(t=Mf(t,Nf(n))),i?(o=Rf,a=!1):t.length>=200&&(o=Df,a=!1,t=new Lf(t));e:for(;++s<r;){var u=e[s],p=null==n?u:n(u);if(u=i||0!==u?u:0,a&&p==p){for(var d=l;d--;)if(t[d]===p)continue e;c.push(u)}else o(t,p,i)||c.push(u)}return c},Bf=Ff,$f=fp,zf=wd,qf=th,Uf=id(function(e,t){var n=qf(t);return zf(n)&&(n=void 0),zf(e)?Bf(e,$f(t,1,zf,!0),void 0,n):[]}),Hf=Uf,Vf=Li;var Kf=function(e,t){return Vf(e,t)},Wf=i(Kf),Gf=mo,Yf=wp,Jf=ro;var Zf=function(e,t){var n={};return t=Jf(t),Yf(e,function(e,i,s){Gf(n,i,t(e,i,s))}),n},Xf=i(Zf),Qf=Ft,eg=rs,tg=Gs,ng=Vt,ig=wd,sg=Math.max;var og=function(e){if(!e||!e.length)return[];var t=0;return e=Qf(e,function(e){if(ig(e))return t=sg(e.length,t),!0}),ng(t,function(t){return eg(e,tg(t))})},ag=id(og),rg=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Af,"__esModule",{value:!0}),Af.Clowder=void 0;const cg=sp,lg=lp,ug=rg(_f),pg=rg(Hf),dg=rg(Kf),mg=rg(Zf),hg=rg(Ah),fg=rg(og),gg=rg(ag),vg=rg(bf);Af.Clowder=class{constructor({cats:e,corpus:t,randomSeed:n=null,earlyStopping:i}){this._cats=Object.assign(Object.assign({},(0,mg.default)(e,e=>new cg.Cat(e))),{unvalidated:new cg.Cat({itemSelect:"random",randomSeed:n})}),this._seenItems=[],(0,lg.checkNoDuplicateCatNames)(t),this._corpus=t,this._remainingItems=(0,ug.default)(t),this._rng=null===n?(0,vg.default)():(0,vg.default)(n),this._earlyStopping=i,this._stoppingReason=null}_validateCatName(e,t=!1){const n=t?this._cats:this.cats;if(!Object.prototype.hasOwnProperty.call(n,e))throw new Error(`Invalid Cat name. Expected one of ${Object.keys(n).join(", ")}. Received ${e}.`)}get cats(){return(0,hg.default)(this._cats,["unvalidated"])}get corpus(){return this._corpus}get remainingItems(){return this._remainingItems}get seenItems(){return this._seenItems}get theta(){return(0,mg.default)(this.cats,e=>e.theta)}get seMeasurement(){return(0,mg.default)(this.cats,e=>e.seMeasurement)}get nItems(){return(0,mg.default)(this.cats,e=>e.nItems)}get resps(){return(0,mg.default)(this.cats,e=>e.resps)}get zetas(){return(0,mg.default)(this.cats,e=>e.zetas)}get earlyStopping(){return this._earlyStopping}get stoppingReason(){return this._stoppingReason}updateAbilityEstimates(e,t,n,i){e.forEach(e=>{this._validateCatName(e,!1)});for(const s of e)this.cats[s].updateAbilityEstimate(t,n,i)}updateCatAndGetNextItem({catToSelect:e,corpusToSelectFrom:t,catToEvaluateEarlyStopping:n,catsToUpdate:i=[],items:s=[],answers:o=[],method:a,itemSelect:r,additionalItemsToRemove:c=[],randomlySelectUnvalidated:l=!1,returnUndefinedOnExhaustion:u=!0}){this._validateCatName(e,!0);const p=null!=t?t:e,d=null!=n?n:p;if(this._validateCatName(p,!0),(i=Array.isArray(i)?i:[i]).forEach(e=>{this._validateCatName(e,!1)}),s=Array.isArray(s)?s:[s],o=Array.isArray(o)?o:[o],s.length!==o.length)throw new Error("Previous items and answers must have the same length.");if(this._updateCats(i,s,o,a,c),!this._earlyStopping||(this._earlyStopping.update(this.cats,d),!this._earlyStopping.earlyStop))return this._selectNextItem(e,p,l,u,r);this._stoppingReason="Early stopping"}_updateCats(e,t,n,i,s=[]){this._seenItems.push(...t),this._remainingItems=(0,pg.default)(this._remainingItems,t,dg.default),this._remainingItems=(0,pg.default)(this._remainingItems,s,dg.default);const o=(0,gg.default)(t,n);for(const t of e){const e=o.filter(([e])=>e.zetas.some(e=>e.cats.includes(t)));if(e.length>0){const n=e.map(([e,n])=>[e.zetas.find(e=>e.cats.includes(t)).zeta,n]).filter(([e])=>void 0!==e),[s,o]=(0,fg.default)(n);this.updateAbilityEstimates([t],s,o,i)}}}_selectNextItem(e,t,n,i,s){const{available:o,missing:a}=(0,lg.filterItemsByCatParameterAvailability)(this._remainingItems,t),{available:r,missing:c}=(0,lg.filterItemsByCatParameterAvailability)(o,e),l=[...a,...c];if(0===r.length&&o.length>0&&console.warn(`No items available for cat ${e} in corpus ${t}. This will still work but is probably not what you intended. Typically the corpusToSelectFrom will be a subset of the corpus for catToSelect, such as when a 'total' cat is selecting from a sub-domain corpus.`),"unvalidated"===t){const e=this._remainingItems.filter(e=>!e.zetas.some(e=>e.cats.length>0));if(0===e.length){if(!i&&l.length>0){return l[Math.floor(this._rng()*l.length)]}return void(this._stoppingReason="No unvalidated items remaining")}return e[Math.floor(this._rng()*e.length)]}const u=r.map(t=>{const n=t.zetas.find(t=>t.cats.includes(e));return Object.assign(Object.assign({},n.zeta),t)}),p=this.cats[e],{nextStimulus:d}=p.findNextItem(u,s),m=(0,hg.default)(d,["a","b","c","d","discrimination","difficulty","guessing","slipping"]),h=r.find(e=>(0,dg.default)((0,hg.default)(e,["a","b","c","d","discrimination","difficulty","guessing","slipping"]),m));if(0===r.length)return i?void(this._stoppingReason=`No validated items remaining for the requested corpus ${t}`):l[Math.floor(this._rng()*l.length)];if(0!==l.length&&n){const e=Math.random(),t={available:r.length,missing:l.length};return e<t.missing/(t.available+t.missing)?l[Math.floor(this._rng()*l.length)]:h}return h}};var yg={},bg=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yg,"__esModule",{value:!0}),yg.StopIfSEMeasurementBelowThreshold=yg.StopAfterNItems=yg.StopOnSEMeasurementPlateau=yg.EarlyStopping=void 0;const xg=bg(Id);class _g{constructor({logicalOperation:e="or"}){if(this._seMeasurements={},this._nItems={},this._earlyStop=!1,!["and","or","only"].includes(e.toLowerCase()))throw new Error(`Invalid logical operation. Expected "and", "or", or "only". Received "${e}"`);this._logicalOperation=e.toLowerCase()}get earlyStop(){return this._earlyStop}get nItems(){return this._nItems}get seMeasurements(){return this._seMeasurements}get logicalOperation(){return this._logicalOperation}_updateCats(e){var t,n;for(const i in e){const s=e[i],o=s.nItems,a=s.seMeasurement;o>(null!==(t=this._nItems[i])&&void 0!==t?t:0)&&(this._nItems[i]=o,this._seMeasurements[i]=[...null!==(n=this._seMeasurements[i])&&void 0!==n?n:[],a])}}update(e,t){this._updateCats(e);const n=this.evaluationCats.map(e=>this._evaluateStoppingCondition(e));if("and"===this._logicalOperation)this._earlyStop=n.every(Boolean);else if("or"===this._logicalOperation)this._earlyStop=n.some(Boolean);else if("only"===this._logicalOperation){if(void 0===t)throw new Error('Must provide a cat to select for "only" stopping condition');this.evaluationCats.includes(t)?this._earlyStop=this._evaluateStoppingCondition(t):this._earlyStop=!1}}}yg.EarlyStopping=_g;yg.StopOnSEMeasurementPlateau=class extends _g{constructor(e){var t;super(e),this._patience=e.patience,this._tolerance=null!==(t=e.tolerance)&&void 0!==t?t:{}}get evaluationCats(){return(0,xg.default)([...Object.keys(this._patience),...Object.keys(this._tolerance)])}get patience(){return this._patience}get tolerance(){return this._tolerance}_evaluateStoppingCondition(e){const t=this._seMeasurements[e],n=this._patience[e],i=this._tolerance[e];let s=!1;if((null==t?void 0:t.length)>=n){const e=t.slice(-n).reduce((e,t)=>e+t,0)/n;t.slice(-n).every(t=>Math.abs(t-e)<=i)&&(s=!0)}return s}};yg.StopAfterNItems=class extends _g{constructor(e){super(e),this._requiredItems=e.requiredItems}get requiredItems(){return this._requiredItems}get evaluationCats(){return Object.keys(this._requiredItems)}_evaluateStoppingCondition(e){const t=this._requiredItems[e];let n=!1;return this._nItems[e]>=t&&(n=!0),n}};function wg(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function kg(e,t,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,n):s?s.value=n:t.set(e,n),n}var Sg,Tg,Eg;yg.StopIfSEMeasurementBelowThreshold=class extends _g{constructor(e){var t,n;super(e),this._seMeasurementThreshold=e.seMeasurementThreshold,this._patience=null!==(t=e.patience)&&void 0!==t?t:{},this._tolerance=null!==(n=e.tolerance)&&void 0!==n?n:{}}get patience(){return this._patience}get tolerance(){return this._tolerance}get seMeasurementThreshold(){return this._seMeasurementThreshold}get evaluationCats(){return(0,xg.default)([...Object.keys(this._patience),...Object.keys(this._tolerance),...Object.keys(this._seMeasurementThreshold)])}_evaluateStoppingCondition(e){var t,n,i,s;const o=null!==(t=this._seMeasurements[e])&&void 0!==t?t:[],a=null!==(n=this._seMeasurementThreshold[e])&&void 0!==n?n:0,r=null!==(i=this._patience[e])&&void 0!==i?i:1,c=null!==(s=this._tolerance[e])&&void 0!==s?s:0;let l=!1;if(o.length>=r){o.slice(-r).every(e=>e-a<=c)&&(l=!0)}return l}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StopIfSEMeasurementBelowThreshold=e.StopOnSEMeasurementPlateau=e.StopAfterNItems=e.EarlyStopping=e.convertZeta=e.ensureZetaNumericValues=e.fillZetaDefaults=e.prepareClowderCorpus=e.Clowder=e.Cat=void 0;var t=sp;Object.defineProperty(e,"Cat",{enumerable:!0,get:function(){return t.Cat}});var n=Af;Object.defineProperty(e,"Clowder",{enumerable:!0,get:function(){return n.Clowder}});var i=lp;Object.defineProperty(e,"prepareClowderCorpus",{enumerable:!0,get:function(){return i.prepareClowderCorpus}}),Object.defineProperty(e,"fillZetaDefaults",{enumerable:!0,get:function(){return i.fillZetaDefaults}}),Object.defineProperty(e,"ensureZetaNumericValues",{enumerable:!0,get:function(){return i.ensureZetaNumericValues}}),Object.defineProperty(e,"convertZeta",{enumerable:!0,get:function(){return i.convertZeta}});var s=yg;Object.defineProperty(e,"EarlyStopping",{enumerable:!0,get:function(){return s.EarlyStopping}}),Object.defineProperty(e,"StopAfterNItems",{enumerable:!0,get:function(){return s.StopAfterNItems}}),Object.defineProperty(e,"StopOnSEMeasurementPlateau",{enumerable:!0,get:function(){return s.StopOnSEMeasurementPlateau}}),Object.defineProperty(e,"StopIfSEMeasurementBelowThreshold",{enumerable:!0,get:function(){return s.StopIfSEMeasurementBelowThreshold}})}(ip),"function"==typeof SuppressedError&&SuppressedError;class Cg{constructor(e,t){Sg.set(this,void 0),Tg.set(this,void 0),Eg.set(this,void 0),kg(this,Sg,t,"f"),this.warningDuration=e,this.rotateOverlayDiv=this.createRotateOverlayDiv(),this.smallDeviceOverlayDiv=this.createSmallDeviceOverlayDiv(),this.pauseOverlayDiv=this.createPauseOverlayDiv(),kg(this,Tg,!1,"f")}init(){this.onOrientationChange(),window.matchMedia("(orientation: portrait)").addEventListener("change",()=>{this.onOrientationChange()})}createRotateOverlayDiv(){const e=document.createElement("div");e.classList.add("lev-overlay-default");const t=wg(this,Sg,"f").generalRotateDevice||"Please rotate your device for optimal experience",n=document.createElement("div");n.classList.add("lev-row-container","header");const i=document.createElement("p");i.textContent=t,n.appendChild(i);const s=document.createElement("div");return s.classList.add("turn"),s.innerHTML='\n <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 600 600" xml:space="preserve" class="turn">\n <g style="transform: translate(-150px, -100px);fill:#1D4AB9;" >\n <path d="M357.22,409.315c0.327-0.932,0.655-0.176,1.379,0.574c1.532,1.586,2.687,3.721,3.841,5.587 c-0.458-0.765,1.404,1.962,1.297,1.819c0.823,1.095,1.69,2.157,2.576,3.202c2.055,2.424,4.251,4.709,6.578,6.874 c4.662,4.338,9.774,8.192,15.222,11.49c11.107,6.726,23.625,11.066,36.545,12.462c23.836,2.575,48.154-4.846,66.811-19.701 l-6.806-7.929l45.943-9.713l-15.89,44.727l-8.139-9.482c-15.9,13.961-36.485,22.197-57.685,22.932 c-21.342,0.74-42.546-6.622-59.298-19.776c-10.577-8.305-18.742-18.785-25.847-30.117c-1.597-2.547-3.09-5.222-4.432-7.913 C359.104,413.926,356.929,410.147,357.22,409.315z"/>\n <path d="M528.597,364.765c-0.327,0.932-0.655,0.176-1.379-0.574c-1.531-1.586-2.687-3.722-3.841-5.587 c0.458,0.765-1.404-1.962-1.297-1.819c-0.823-1.095-1.69-2.157-2.576-3.202c-2.055-2.424-4.251-4.709-6.578-6.874 c-4.662-4.338-9.774-8.192-15.222-11.49c-11.107-6.726-23.625-11.066-36.545-12.462c-23.836-2.575-48.154,4.846-66.811,19.701 l6.806,7.929l-45.943,9.713l15.89-44.727l8.139,9.482c15.9-13.96,36.485-22.197,57.685-22.932 c21.342-0.74,42.546,6.622,59.298,19.776c10.577,8.305,18.742,18.785,25.847,30.117c1.597,2.547,3.09,5.222,4.432,7.913 C526.713,360.154,528.888,363.934,528.597,364.765z"/>\n </g>\n </svg>\n',e.appendChild(n),e.appendChild(s),e}createSmallDeviceOverlayDiv(){const e=document.createElement("div");e.classList.add("lev-overlay-default");const t=wg(this,Sg,"f").generalDeviceType||"Please use a tablet or a desktop in landscape mode for optimal experience",n=document.createElement("div");n.classList.add("lev-row-container","header");const i=document.createElement("p");return i.textContent=t,n.appendChild(i),e.appendChild(n),e}createPauseOverlayDiv(){const e=document.createElement("div");e.classList.add("lev-overlay-default");const t=wg(this,Sg,"f").generalGamePaused||"Your game is paused. Press the play button to resume.",n=document.createElement("div");n.classList.add("lev-row-container","header");const i=document.createElement("p");i.textContent=t,n.appendChild(i);const s=document.createElement("div");return s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600" xml:space="preserve" class="pulse">\n<g style="transform: translate(-40px, -40px); fill:#1D4AB9;">\n <circle cx="350" cy="345" r="170" fill="none" stroke="#1D4AB9" stroke-width="40"/>\n <path d="M 280,260 C 280,252 288,248 295,252 L 450,335 C 457,339 457,351 450,355 L 295,438 C 288,442 280,438 280,430 Z"/>\n</g>\n</svg>',s.style.display="flex",s.style.justifyContent="center",s.style.alignItems="center",s.id="play-button",e.appendChild(n),e.appendChild(s),s.addEventListener("click",()=>{this.onResume()}),e}hideOverlay(e){e.remove(),clearTimeout(wg(this,Eg,"f"))}showOverlay(e,t=!0){wg(this,Tg,"f")&&this.hideOverlay(e),document.body.appendChild(e),t&&kg(this,Eg,window.setTimeout(()=>{this.hideOverlay(e)},this.warningDuration),"f")}onOrientationChange(){var e;const{screen:t}=window,n=(null===(e=null==t?void 0:t.orientation)||void 0===e?void 0:e.type)?t.orientation.type.includes("portrait"):t.availHeight>t.availWidth;(n?t.availWidth:t.availHeight)<500?this.showOverlay(this.smallDeviceOverlayDiv):t.availHeight>t.availWidth&&n&&this.showOverlay(this.rotateOverlayDiv)}onPause(){this.showOverlay(this.pauseOverlayDiv,!1)}onResume(){this.hideOverlay(this.pauseOverlayDiv)}}Sg=new WeakMap,Tg=new WeakMap,Eg=new WeakMap;class Ig{constructor(e,t,n){this.levanteLogger=e,this.gameParams=t,this.userParams=n}static setInstance(e,t,n){if(Ig.instance)throw new Error("Logger instance already set");Ig.instance=new Ig(e,t,n)}static getInstance(){if(!Ig.instance)throw new Error("Logger instance not set");return Ig.instance}capture(e,t){var n,i;const s={gameParams:this.gameParams,userParams:this.userParams,context:t};null===(i=null===(n=this.levanteLogger)||void 0===n?void 0:n.capture)||void 0===i||i.call(n,e,s)}error(e,t){var n,i;const s={gameParams:this.gameParams,userParams:this.userParams,context:t};null===(i=null===(n=this.levanteLogger)||void 0===n?void 0:n.error)||void 0===i||i.call(n,e,s)}}const Og="mobile"===Zu();let jg,Ag,Lg;const Pg={};Uc();const Rg=()=>{jg=new ip.Cat({method:"MLE",minTheta:-6,maxTheta:6,theta:Uc().startingTheta||0,itemSelect:Uc().itemSelect})},Mg=async e=>{var t,n,i,s,o;if(!e)throw new Error("Config is not found");const{task:a,scoringVersion:r,corpora:c,randomSeed:l}=Uc(),u=null===(t=Hr[a])||void 0===t?void 0:t[r],p=null===(n=Vr[a])||void 0===n?void 0:n[r];if(!u)throw new Error("Clowder config is not found");for(const e of Object.values(p.catOrderMap))Pg[e]=0;const{csvUrl:d}=null===(i=Wr[a])||void 0===i?void 0:i[r];if(!d)throw new Error("IRT hyperparameters CSV URL is not found");const m=await Jr(d);var h;h=m,Lg=(e,t,n)=>{let i=h[n]?n:"composite";const{transformationScale:s,transformationShift:o}=h[i],a=e*s+o,r=t*Math.abs(s);return{thetaEstimate:a,thetaSE:Yr(r)}};const f={theta:Uc().startingTheta,method:null!==(o=null===(s=u.method)||void 0===s?void 0:s.toLowerCase())&&void 0!==o?o:"eap"},g={practice:{...f,priorDist:u.priorDist,itemSelect:"fixed"},...Object.fromEntries(p.catsToUpdate.map(e=>[e,{...f,...u,...m[e]?m[e]:m.composite,randomSeed:l}]))},v=new ip.StopAfterNItems({...Kr[a][r]}),{catNames:y,delimiter:b}=Gr[a][r],x=await ip.prepareClowderCorpus(c.stimulus,y,b);Ag=new ip.Clowder({cats:g,corpus:x,earlyStopping:v,randomSeed:l})},Ng=e=>{const{currentCatBlock:t,task:n,scoringVersion:i}=Uc(),{catOrderMap:s}=Vr[n][i];if(null!=e&&e>=0){if(!s[e])throw new Error("Cannot set to block not in catOrderMap");Uc("currentCatBlock",e)}else Uc("currentCatBlock",(null!=t?t:-1)+1)},Dg=({ignorePreviousItem:e=!1,additionalItemsToRemove:t=[]}={})=>{const{task:n,currentCatBlock:i,scoringVersion:s,previousItem:o,previousAnswer:a}=Uc(),{catOrderMap:r,catsToUpdate:c}=Vr[n][s],l=r[null!=i?i:0],u=l.includes("practice")?[l]:c,p=Ag.updateCatAndGetNextItem({catToSelect:l,corpusToSelectFrom:l,catsToUpdate:u,items:e?void 0:o,answers:e?void 0:a,additionalItemsToRemove:t,randomlySelectUnvalidated:!1});null==p?(Uc("nextStimulus",null),Ng()):(Pg[l]+=1,Uc("nextStimulus",p))},Fg=function(e){const t=new du(e);return Object.defineProperties(t,Object.fromEntries(Object.entries({init:"`jsPsych.init()` was replaced by `initJsPsych()` in jsPsych v7.",ALL_KEYS:'jsPsych.ALL_KEYS was replaced by the "ALL_KEYS" string in jsPsych v7.',NO_KEYS:'jsPsych.NO_KEYS was replaced by the "NO_KEYS" string in jsPsych v7.',currentTimelineNodeID:"`currentTimelineNodeID()` was renamed to `getCurrentTimelineNodeID()` in jsPsych v7.",progress:"`progress()` was renamed to `getProgress()` in jsPsych v7.",startTime:"`startTime()` was renamed to `getStartTime()` in jsPsych v7.",totalTime:"`totalTime()` was renamed to `getTotalTime()` in jsPsych v7.",currentTrial:"`currentTrial()` was renamed to `getCurrentTrial()` in jsPsych v7.",initSettings:"`initSettings()` was renamed to `getInitSettings()` in jsPsych v7.",allTimelineVariables:"`allTimelineVariables()` was renamed to `getAllTimelineVariables()` in jsPsych v7."}).map(([e,t])=>[e,{get(){throw new ml(t)}}]))),t}({on_data_update:function(e){const{stimulus:t,task:n,...i}=e,s=Ig.getInstance();"fixation"!==n&&s.capture("JsPsych Data Update",i)}});window.initJsPsych=Fg;class Bg{constructor(){throw new Error("Cannot initialize the singleton static class PageAudioHandler")}static stopAndDisconnectNode(){Bg.audioSource&&(Bg.audioSource.stop(),Bg.audioSource.disconnect(),Bg.audioSource=void 0)}static async getAudioDuration(e){const t=await Fg.pluginAPI.getAudioBuffer(e);return null==t?void 0:t.duration}static async playAudio(e,t=this.defaultAudioConfig,n=!0){const{enabled:i,maxRepetitions:s}=t.restrictRepetition,{onEnded:o}=t;Bg.audioUri===e&&i?Bg.replays++:i&&(Bg.replays=0),n&&(Bg.audioUri=e),Bg.replays>s&&i&&(e=AM.audio.inputAudioCue);try{const t=Fg.pluginAPI.audioContext(),n=await Fg.pluginAPI.getAudioBuffer(e),a=t.createBufferSource();Bg.audioSource=a,a.buffer=n,a.connect(t.destination),a.onended=()=>{if(Bg.replays===s&&i){const e={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{o&&o()}};Bg.playAudio(AM.audio.inputAudioCue,e,!1)}else o&&o()},a.start(0)}catch{return}}static unlockAudioContext(){const e=Fg.pluginAPI.audioContext();"suspended"===e.state&&e.resume();const t=e.createBuffer(1,1,e.sampleRate),n=e.createBufferSource();n.buffer=t,n.connect(e.destination),n.start(0)}}Bg.replays=0,Bg.defaultAudioConfig={restrictRepetition:{enabled:!0,maxRepetitions:2}};const $g={type:hu,fullscreen_mode:!!wu.fullscreenEnabled||Og,message:()=>`<div class="lev-row-container header">\n <p>${Uc().translations.generalFullscreen||"Switch to full screen mode"}</p>\n </div>\n `,delay_after:0,keyboard_choices:"ALL_KEYS",button_label:()=>`${Uc().translations.continueButtonText||"Continue"}`,on_load:()=>{const e=document.getElementById("jspsych-fullscreen-btn");e&&(e.id="dummy",e.classList.add("primary")),Og?null==e||e.addEventListener("touchstart",()=>{Bg.unlockAudioContext()},{once:!0}):null==e||e.addEventListener("mousedown",()=>{Bg.unlockAudioContext()},{once:!0});const t=function(){const e=e=>window.matchMedia(e).matches,t={touch:navigator.maxTouchPoints>0||e("(any-pointer: coarse)"),mouse:e("(any-pointer: fine)"),primary:e("(pointer: coarse)")?"touch":e("(pointer: fine)")?"mouse":"unknown"};let n=0,i=null;const s=e=>{i!==e&&(i=e,document.documentElement.dataset.input=e)};return window.addEventListener("touchstart",()=>{n=Date.now(),s("touch")},{passive:!0}),window.addEventListener("mousemove",()=>{Date.now()-n<500||s("mouse")}),window.addEventListener("keydown",()=>{s("keyboard")}),"unknown"!==t.primary&&s(t.primary),{capability:t,getCurrentInput:()=>i}}();Uc("inputCapability",t.capability)},on_start:()=>{document.body.style.cursor="default"}},zg={timeline:[$g],conditional_function:()=>null===wu.fullscreenElement},qg={type:hu,fullscreen_mode:!1,delay_after:0},Ug={name:"html-multi-response",parameters:{stimulus:{type:gl.HTML_STRING,pretty_name:"Stimulus",default:void 0},button_choices:{type:gl.STRING,pretty_name:"Button Choices",default:[],array:!0},keyboard_choices:{type:gl.KEYS,pretty_name:"Keyboard Choices",default:"NO_KEYS"},button_html:{type:gl.HTML_STRING,pretty_name:"Button HTML",default:'<button class="jspsych-btn">%choice%</button>',array:!0},prompt:{type:gl.HTML_STRING,pretty_name:"Prompt",default:null},stimulus_duration:{type:gl.INT,pretty_name:"Stimulus duration",default:null},trial_duration:{type:gl.INT,pretty_name:"Trial duration",default:null},margin_vertical:{type:gl.STRING,pretty_name:"Margin vertical",default:"0px"},margin_horizontal:{type:gl.STRING,pretty_name:"Margin horizontal",default:"8px"},response_ends_trial:{type:gl.BOOL,pretty_name:"Response ends trial",default:!0}}};class Hg{constructor(e){this.jsPsych=e}trial(e,t){var n='<div id="jspsych-html-multi-response-stimulus">'+t.stimulus+"</div>",i=[];if(Array.isArray(t.button_html))t.button_html.length==t.button_choices.length?i=t.button_html:console.error("Error in html-multi-response plugin. The length of the button_html array does not equal the length of the button_choices array");else for(var s=0;s<t.button_choices.length;s++)i.push(t.button_html);n+='<div id="jspsych-html-multi-response-btngroup">';for(s=0;s<t.button_choices.length;s++){var o=i[s].replace(/%choice%/g,t.button_choices[s]);n+='<div class="jspsych-html-multi-response-button" style="display: inline-block; margin:'+t.margin_vertical+" "+t.margin_horizontal+'" id="jspsych-html-multi-response-button-'+s+'" data-choice="'+s+'">'+o+"</div>"}n+="</div>",null!==t.prompt&&(n+=t.prompt),e.innerHTML=n;if("NO_KEYS"!=t.keyboard_choices)var a=this.jsPsych.pluginAPI.getKeyboardResponse({callback_function:function(n){e.querySelector("#jspsych-html-multi-response-stimulus").className+=" responded",null==c.key&&(c=Object.assign({source:"keyboard",button:null},n)),t.response_ends_trial&&l()},valid_responses:t.keyboard_choices,rt_method:"performance",persist:!1,allow_held_key:!1});var r=performance.now();for(s=0;s<t.button_choices.length;s++)e.querySelector("#jspsych-html-multi-response-button-"+s).addEventListener("click",e=>{u(e.currentTarget.getAttribute("data-choice"))});var c={rt:null,button:null,key:null,source:null};const l=()=>{this.jsPsych.pluginAPI.clearAllTimeouts(),void 0!==a&&this.jsPsych.pluginAPI.cancelKeyboardResponse(a);var n={rt:c.rt,stimulus:t.stimulus,button_response:c.button,keyboard_response:c.key,response_source:c.source};e.innerHTML="",this.jsPsych.finishTrial(n)};function u(n){var i=performance.now(),s=Math.round(i-r);c.button=parseInt(n),c.rt=s,c.source="button",e.querySelector("#jspsych-html-multi-response-stimulus").className+=" responded";for(var o=document.querySelectorAll(".jspsych-html-multi-response-button button"),a=0;a<o.length;a++)o[a].setAttribute("disabled","disabled");t.response_ends_trial&&l()}null!==t.stimulus_duration&&this.jsPsych.pluginAPI.setTimeout(()=>{e.querySelector("#jspsych-html-multi-response-stimulus").style.visibility="hidden"},t.stimulus_duration),null!==t.trial_duration&&this.jsPsych.pluginAPI.setTimeout(l,t.trial_duration)}simulate(e,t,n,i){"data-only"==t&&(i(),this.simulate_data_only(e,n)),"visual"==t&&this.simulate_visual(e,n,i)}create_simulation_data(e,t){const n={stimulus:e.stimulus,rt:this.jsPsych.randomization.sampleExGaussian(500,50,1/150,!0),keyboard_response:this.jsPsych.pluginAPI.getValidKey(e.keyboard_choices),button_response:null,response_source:"keyboard"},i={stimulus:e.stimulus,rt:this.jsPsych.randomization.sampleExGaussian(500,50,1/150,!0),button_response:this.jsPsych.randomization.randomInt(0,e.button_choices.length-1),keyboard_response:null,response_source:"button"},s=Math.random()<.5?n:i,o=this.jsPsych.pluginAPI.mergeSimulationData(s,t);return this.jsPsych.pluginAPI.ensureSimulationDataConsistency(e,o),o}simulate_data_only(e,t){const n=this.create_simulation_data(e,t);this.jsPsych.finishTrial(n)}simulate_visual(e,t,n){const i=this.create_simulation_data(e,t),s=this.jsPsych.getDisplayElement();this.trial(s,e),n(),null!==i.rt&&(null!==i.button_response?this.jsPsych.pluginAPI.clickTarget(s.querySelector(`div[data-choice="${i.button_response}"] button`),i.rt):this.jsPsych.pluginAPI.pressKey(i.keyboard_response,i.rt))}}Hg.info=Ug;const Vg=(e,t)=>({type:Hg,stimulus:"<div id='lev-fixation-container'><p>+</p></div>",prompt:"",choices:"NO_KEYS",trial_duration:350,data:{task:"fixation"},on_finish:()=>{e&&!Yc()&&(null!=t?Mv(e,t):Mv(e))}});const Kg=Vg("stimulus"),Wg={...Vg(),on_finish:function(){const e=Uc().currentStoryGroup;Mv("stimulus",void 0,e,!0)},stimulus:""},Gg=Vg("downex"),Yg=e=>Vg("stimulus",e),Jg={...Vg(),on_finish:function(){const e=Uc().currentCatBlock;Mv("stimulus",e)},stimulus:""},Zg=Vg(),Xg={...Vg(),on_finish:function(){const e=Uc().blockThresholds,t=e.shift();let n=Uc().currentCatBlock;t&&jg.theta>=t&&n++,Uc("currentCatBlock",n),Uc("blockThresholds",e)},stimulus:""},Qg={name:"audio-keyboard-response",parameters:{stimulus:{type:gl.AUDIO,pretty_name:"Stimulus",default:void 0},choices:{type:gl.KEYS,pretty_name:"Choices",default:"ALL_KEYS"},prompt:{type:gl.HTML_STRING,pretty_name:"Prompt",default:null},trial_duration:{type:gl.INT,pretty_name:"Trial duration",default:null},response_ends_trial:{type:gl.BOOL,pretty_name:"Response ends trial",default:!0},trial_ends_after_audio:{type:gl.BOOL,pretty_name:"Trial ends after audio",default:!1},response_allowed_while_playing:{type:gl.BOOL,pretty_name:"Response allowed while playing",default:!0}}};class ev{constructor(e){this.jsPsych=e}trial(e,t,n){let i;var s,o=this.jsPsych.pluginAPI.audioContext(),a={rt:null,key:null};this.jsPsych.pluginAPI.getAudioBuffer(t.stimulus).then(e=>{null!==o?(this.audio=o.createBufferSource(),this.audio.buffer=e,this.audio.connect(o.destination)):(this.audio=e,this.audio.currentTime=0),r()}).catch(e=>{console.error(`Failed to load audio file "${t.stimulus}". Try checking the file path. We recommend using the preload plugin to load audio files.`),console.error(e)});const r=()=>{t.trial_ends_after_audio&&this.audio.addEventListener("ended",c),null!==t.prompt&&(e.innerHTML=t.prompt),null!==o?(s=o.currentTime,this.audio.start(s)):this.audio.play(),t.response_allowed_while_playing?u():t.trial_ends_after_audio||this.audio.addEventListener("ended",u),null!==t.trial_duration&&this.jsPsych.pluginAPI.setTimeout(()=>{c()},t.trial_duration),n()},c=()=>{this.jsPsych.pluginAPI.clearAllTimeouts(),null!==o?this.audio.stop():this.audio.pause(),this.audio.removeEventListener("ended",c),this.audio.removeEventListener("ended",u),this.jsPsych.pluginAPI.cancelAllKeyboardResponses();var n={rt:a.rt,stimulus:t.stimulus,response:a.key};e.innerHTML="",this.jsPsych.finishTrial(n),i()};function l(e){null==a.key&&(a=e),t.response_ends_trial&&c()}const u=()=>{null!==o?this.jsPsych.pluginAPI.getKeyboardResponse({callback_function:l,valid_responses:t.choices,rt_method:"audio",persist:!1,allow_held_key:!1,audio_context:o,audio_context_start_time:s}):this.jsPsych.pluginAPI.getKeyboardResponse({callback_function:l,valid_responses:t.choices,rt_method:"performance",persist:!1,allow_held_key:!1})};return new Promise(e=>{i=e})}simulate(e,t,n,i){"data-only"==t&&(i(),this.simulate_data_only(e,n)),"visual"==t&&this.simulate_visual(e,n,i)}simulate_data_only(e,t){const n=this.create_simulation_data(e,t);this.jsPsych.finishTrial(n)}simulate_visual(e,t,n){const i=this.create_simulation_data(e,t),s=this.jsPsych.getDisplayElement(),o=()=>{null!==i.rt&&this.jsPsych.pluginAPI.pressKey(i.response,i.rt)};this.trial(s,e,()=>{n(),e.response_allowed_while_playing?o():this.audio.addEventListener("ended",o)})}create_simulation_data(e,t){const n={stimulus:e.stimulus,rt:this.jsPsych.randomization.sampleExGaussian(500,50,1/150,!0),response:this.jsPsych.pluginAPI.getValidKey(e.choices)},i=this.jsPsych.pluginAPI.mergeSimulationData(n,t);return this.jsPsych.pluginAPI.ensureSimulationDataConsistency(e,i),i}}function tv(e){return{type:ev,stimulus:()=>"binary"===Uc().audioFeedback&&Uc().isCorrect?e.audio.coin:"binary"!==Uc().audioFeedback||Uc().isCorrect?e.audio.select:e.audio.fail,choices:"NO_KEYS",trial_ends_after_audio:!0,post_trial_gap:500,prompt:""}}function nv(e){return e.assessment_stage&&"practice_response"!==e.assessment_stage&&"instructions"!==e.assessment_stage}function iv(e){if(Uc().debug&&Uc().runCat){const t=Fg.data.get().filterCustom(nv).last().values()[0],n=jg.theta,i=e.difficulty,s=e.itemUid;let o="N/A";void 0!==(null==t?void 0:t.correct)&&(o=t.correct?"Correct":"Incorrect");const a=document.createElement("div");a.classList.add("theta-estimate-container"),a.innerHTML=`\n <p>Theta estimate: ${n}</p>\n <p>Previous response: ${o}</p>\n <p>Current trial difficulty: ${i}</p>\n <p>Current trial UID: ${s}</p>\n `,document.body.appendChild(a)}}ev.info=Qg;const sv=e=>{const t=e.response.values.length;if(1===t)return["Enter"];if(2===t)return["ArrowLeft","ArrowRight"];if(3===t)return["ArrowUp","ArrowLeft","ArrowRight"];if(4===t)return["ArrowUp","ArrowLeft","ArrowRight","ArrowDown"];throw new Error("More than 4 buttons are not supported yet")};function ov(e,t,n){const i=document.querySelectorAll(".practice-btn");let s;if(i.forEach((t,s)=>t.addEventListener("click",async o=>{av(t,e,i,!1,s,n)})),!t)return s=t=>async function(e,t,n,i){const s=sv(i),o=s.findIndex(t=>t===e.key);if(s.includes(e.key)){const s=t[o];s&&av(s,n,t,!0,e.key.toLowerCase(),i)}}(t,i,e,n),document.addEventListener("keydown",s),s}function av(e,t,n,i,s,o){var a,r;const c=Array.prototype.indexOf.call(n,e),l=((null===(a=o.response)||void 0===a?void 0:a.values)||[])[c];let u;if((null==l?void 0:l.toString())===(null===(r=t.answer)||void 0===r?void 0:r.toString()))e.classList.add("success-shadow"),u=AM.audio.feedbackGoodJob,setTimeout(()=>Fg.finishTrial({response:l,incorrectPracticeResponses:Uc().incorrectPracticeResponses,button_response:i?null:s,keyboard_response:i?s:null}),1e3);else{e.classList.add("error-shadow"),u=AM.audio.feedbackTryAgain,setTimeout(()=>{n.forEach(e=>e.disabled=!1)},500);let t=Uc().incorrectPracticeResponses;t.push(l),Uc("incorrectPracticeResponses",t)}Bg.stopAndDisconnectNode(),Bg.playAudio(u)}let rv,cv,lv=[];function uv(e,t){const n=t||Uc().nextStimulus,i=Uc().translations,s=null==e?void 0:e[n.itemId];if(s){const{prompt:{enabled:e},classOverrides:{stimulusContainerClassList:t,promptClassList:o},equalSizeStim:a,showStimImage:r,stimText:c}=s,l=(null==c?void 0:c.value)?AM.images[_r(c.value)]||AM.images.blank:null,u=r?l:null;return((e,t,n,i,s,o,a)=>{let r='<div class="lev-stimulus-container">';if(r+=Wv("replay-btn-revisited"),e){let t="lev-row-container instruction";a&&(t=a.join(" ")),r+=`\n <div class="${t}">\n <p>${e}</p>\n </div>\n `}if(t||i){let e="";t&&(e+=`\n <img \n src=${t}\n alt=${n}\n />\n `),i&&(e+=`\n <p>${i}</p>\n `);let a=s?"lev-stim-content":"lev-stim-content-x-3";o&&(a=o.join(" ")),r+=`\n <div class=${a}>\n ${e}\n </div>\n `}return r+="</div>",r})(e?i[_r(n.audioFile)]:null,u,(null==c?void 0:c.value)||`Image not loading: ${u}. Please continue the task.`,c?c.displayValue:null,a,t,o)}}function pv(e,t){const n=t||Uc().nextStimulus,i=null==e?void 0:e[n.itemId],{response:s}=i,o=s.target;if(i){const{isImageButtonResponse:e,response:{displayValues:t}}=i;return e?function(e,t){return e.map(e=>{const n=AM.images[_r(e)]||"https://imgs.search.brave.com/w5KWc-ehwDScllwJRMDt7-gTJcykNTicRzUahn6-gHg/rs:fit:860:0:0/g:ce/aHR0cHM6Ly9yZW5k/ZXIuZmluZWFydGFt/ZXJpY2EuY29tL2lt/YWdlcy9pbWFnZXMt/cHJvZmlsZS1mbG93/LzQwMC9pbWFnZXMt/bWVkaXVtLWxhcmdl/LTUvZmF0aGVyLWFu/ZC1kYXVnaHRlci1p/bi10aGUtb3V0ZXIt/YmFua3MtY2hyaXMt/d2Vpci5qcGc";return window.Cypress&&e===t?`<img src=${n} alt=${e} class='correct'/>`:`<img src=${n} alt=${e} />`})}(t,o):t}}function dv(e,t,n){var i,s;const o={restrictRepetition:{enabled:!0,maxRepetitions:2},onEnded:()=>{zO()}};Bg.playAudio(function(e,t){const n=t||Uc().nextStimulus,i=null==e?void 0:e[n.itemId];if(i){const e=(null==i?void 0:i.playAudioOnLoad)?_r(n.audioFile):"nullAudio";return AM.audio[e]}}(e,t)||"",o),rv=performance.now();Uc("incorrectPracticeResponses",[]);const a=t||Uc().nextStimulus,r=null==e?void 0:e[a.itemId],c=null==r?void 0:r.playAudioOnLoad;let l;if("string"!=typeof a.audioFile)throw new Error("Multiple audio files are not supported in this trial type");l=new _v(a.audioFile,c);const u="practice_response"===a.assessmentStage,p="instructions"===a.trialType;if(r.isStaggered){const e=document.getElementById("jspsych-html-multi-response-btngroup"),t=Array.from(e.children);let n=[];for(let e=0;e<t.length;e++){const s=t[e].children[0].getElementsByTagName("img")[0],o=_r(null!==(i=null==s?void 0:s.alt)&&void 0!==i?i:"");n.push(o)}jO(l,e,n)}const d=Fg.getProgress().current_trial_global;let m=d-2;if(IO({itemId:a.itemId,taskName:a.task,pageContext:"afcStimulus"}),"math"===a.task&&(m=d-3,window.Cypress&&!p)){document.querySelectorAll(".secondary, .image-medium, .primary")[r.response.targetIndex].setAttribute("aria-label","correct")}const h=Fg.data.get().filter({trial_index:m}).values();if(u){const t=a.answer.toString(),n=null==e?void 0:e[a.itemId].response.values;if("trog"===Uc().task){let t;t=ov(a,Og,null==e?void 0:e[a.itemId]),void 0!==t&&(cv=t)}else LO(t,Og,n)}if("math"===a.task&&null!=h&&(a.trialType,null===(s=h[0])||void 0===s||s.trialType),"instructions"!==a.trialType){const e=document.getElementById("jspsych-html-multi-response-btngroup"),t=e.children,i=t.length,{buttonLayout:s}=Uc();r&&("diamond"===s&&4===i?e.classList.add("lev-response-row-diamond-layout"):e.classList.add(...r.classOverrides.buttonContainerClassList)),n&&Array.from(t).forEach((e,t)=>{!function(e,t){const{keyHelpers:n}=Uc();if(n&&!Og){const n=document.createElement("div");n.classList.add("arrow-key-border");const i=document.createElement("p");i.innerHTML=$v[t][1],i.style.textAlign="center",i.style.margin="0",n.appendChild(i),e.appendChild(n)}}(e,2===i?t+1:t)}),Uc.transact("trialNumSubtask",e=>e+1)}Gv(l),iv(a),ej(),tj()}const mv=({responseAllowed:e,promptAboveButtons:t,task:n,layoutConfigMap:i,terminateCat:s,validityEvaluator:o},a)=>{const r="trog"===Uc().task&&Uc().isRoarApp;return{type:Hg,response_allowed_while_playing:e,data:()=>{const e=a||Uc().nextStimulus;let t="practice_response"===e.assessmentStage;return{save_trial:!0,assessment_stage:e.assessmentStage,isPracticeTrial:t}},stimulus:()=>uv(i,a),prompt_above_buttons:t,keyboard_choices:()=>{const e=a||Uc().nextStimulus,t=i[e.itemId];return r?sv(t):"NO_KEYS"},button_choices:()=>pv(i,a),button_html:()=>function(e,t){const n=t||Uc().nextStimulus,i="practice_response"===n.assessmentStage,s=null==e?void 0:e[n.itemId];if(s){const e=[...s.classOverrides.buttonClassList],t=s.disableOkButton;return i&&e.push("practice-btn"),`\n <button class='${e.join(" ")}' ${t?"disabled":""}>%choice%</button>\n `}}(i,a),on_load:()=>dv(i,a,r),on_finish:e=>function(e,t,n,i,s,o,a){var r,c,l,u;Bg.stopAndDisconnectNode(),Uc().debug&&document.body.removeChild(document.querySelector(".theta-estimate-container"));const p=s||Uc().nextStimulus,d=null==n?void 0:n[p.itemId],{runCat:m,corpus:h,isRoarApp:f}=Uc();let g=null,v=null,y=null;if(Yc()&&Ev(p.audioFile),"instructions"!==p.trialType){if(d){const{response:t}=d;if(!t)throw new Error("Choices not defined in the config");const n=sv(d);y=e.keyboard_response&&o?n.findIndex(t=>t.toLowerCase()===e.keyboard_response.toLowerCase()):e.button_response,g=t.values[y],v=t.target,e.correct=g===v}m&&ay(p,e.correct);const t="mouse";if(e.correct?("practice_response"!==p.assessmentStage&&(Uc.transact("totalCorrect",e=>e+1),Uc("numIncorrect",0)),lv=[]):("practice_response"!==p.assessmentStage&&Uc.transact("numIncorrect",e=>e+1),lv.push(g)),Fg.data.addDataToLastTrial({item:Br(p.item)||p.item,answer:v,distractors:p.distractors,corpusTrialType:p.trialType,responseType:t,responseLocation:y,itemUid:p.itemUid,audioFile:p.audioFile,corpus:h}),Uc().storeItemId&&Fg.data.addDataToLastTrial({corpusId:Uc().corpusId,itemId:p.itemId}),"practice_response"!==p.assessmentStage&&Fg.data.addDataToLastTrial({response:g}),"practice_response"===p.assessmentStage){const e=performance.now(),t=Math.round(e-rv);Fg.data.addDataToLastTrial({rt:t}),"trog"===Uc().task&&document.removeEventListener("keydown",cv)}}else Uc("numIncorrect",0),Fg.data.addDataToLastTrial({correct:!1});if(Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses}),"test_response"===p.assessmentStage&&Uc.transact("testTrialCount",e=>e+1),f){if(Yc()&&!(null===(r=p.assessmentStage)||void 0===r?void 0:r.includes("instruction"))){Uc("previousItem",p),Uc("previousAnswer",e.correct?1:0);const n=p.zetas.map(e=>e.cats[0]);if("trog"===Uc().task){a&&!(null===(c=p.assessmentStage)||void 0===c?void 0:c.includes("practice"))&&n.includes("composite")&&a.addResponseData(e.rt,e.keyboard_response?e.keyboard_response:e.button_response,e.correct?1:0);const{catsScaled:i}=Wr[t][Uc().scoringVersion],s=ey(Ag.theta,Ag.seMeasurement,Lg,i);Uc("irtEstimates",s),Fg.data.addDataToLastTrial({...ny(p),thetaEstimate:null===(l=s.composite)||void 0===l?void 0:l.thetaEstimate,thetaSE:null===(u=s.composite)||void 0===u?void 0:u.thetaSE}),Fg.data.write({...ty(s)})}}}else if("skip"!==d.inCorrectTrialConfig.onIncorrectTrial||m?Uc().numIncorrect>=Uc().maxIncorrect&&!m&&vv():Zv(p.trialType),i&&GO(),null==d?void 0:d.blockedTrials){const e=Uc().sequentialTrials.filter(e=>e.block_index===p.block_index);YO(e)}}(e,n,i,s,a,r,o),response_ends_trial:()=>"practice_response"!==(a||Uc().nextStimulus).assessmentStage}};function hv(){Uc("taskComplete",!0),window.removeEventListener("click",hv),window.removeEventListener("keydown",hv)}const fv=(e="taskFinished")=>({type:Hg,data:()=>({assessment_stage:"instructions"}),stimulus:()=>{const t=Uc().translations;return`\n <div class='lev-stimulus-container'>\n <div class='lev-row-container instruction'>\n <h1>${t[e]}</h1>\n </div>\n <footer>${t.generalFooter}</footer>\n </div>`},button_choices:["Continue"],keyboard_choices:"ALL_KEYS",button_html:'<button class="primary" style=margin-top:10%>Exit</button>',on_load:()=>{window.addEventListener("click",hv),window.addEventListener("keydown",hv),AM.audio[e]&&Bg.playAudio(AM.audio[e]);Ig.getInstance().capture("Task Finished",{taskName:Uc().task,taskFinished:Uc().taskComplete})}}),gv=(e=!1,t,n,i=!1)=>({timeline:[{type:Hg,stimulus:()=>{const e=Uc().translations,t=Uc().isCorrect,s=t?AM.images["smilingFace@2x"]:AM.images["sadFace@2x"];let o;switch(Uc().task){case"same-different-selection":o=e.sds2matchPrompt1;break;case"memory-game":o=n.toUpperCase().includes("BACKWARD")?e.memoryGameBackwardPrompt:e.memoryGameForwardPrompt;break;case"egma-math":o=e.numberLineSliderPrompt1;break;default:o=""}return`<div class="lev-stimulus-container">\n <div class="lev-row-container instruction">\n <p>${t?e.feedbackCorrect:e.feedbackNotQuiteRight}</p>\n </div>\n <div class="lev-stim-content">\n <img src=${s} alt="Image not loading: ${s}. Please continue the task."'/>\n </div>\n \n ${t||!i?"":`<div class="lev-row-container instruction"'>\n <p>${o}</p>\n </div>`}\n </div>`},button_choices:["Continue"],keyboard_choices:"NO_KEYS",prompt_above_buttons:!0,button_html:()=>`<button class="primary">${Uc().translations.continueButtonText}</button>`,on_load:()=>{const e=Uc().isCorrect?AM.audio[t]:AM.audio[n];Bg.stopAndDisconnectNode(),Bg.playAudio(e||AM.audio.nullAudio,{restrictRepetition:{enabled:!1,maxRepetitions:2}})},on_finish:()=>{Bg.stopAndDisconnectNode()}}],conditional_function:()=>{var t,n;return"practice"===(null===(t=Uc().nextStimulus)||void 0===t?void 0:t.notes)||"practice"===(null===(n=Uc().nextStimulus)||void 0===n?void 0:n.trialType)||e}});function vv(){const e=Uc().translations;setTimeout(()=>{const e=t=>{var n;if("click"===t.type){"exit-button"===(null===(n=t.target)||void 0===n?void 0:n.id)&&(document.body.innerHTML="",Uc("taskComplete",!0),window.removeEventListener("click",e),window.removeEventListener("keydown",e))}else"keydown"===t.type&&(document.body.innerHTML="",Uc("taskComplete",!0),window.removeEventListener("keydown",e),window.removeEventListener("click",e))};window.addEventListener("click",e),window.addEventListener("keydown",e);Ig.getInstance().capture("Task Aborted",{taskName:Uc().task,taskFinished:Uc().taskComplete})},50),Fg.endExperiment(`<div class='lev-stimulus-container'>\n <div class='lev-row-container instruction'>\n <h1>${e.taskFinished}</h1>\n </div>\n <footer>${e.generalFooter}</footer>\n <button id="exit-button" class="primary" style=margin-top:5%>Exit</button>\n </div>`,Bg.playAudio(AM.audio.taskFinished))}const yv={type:Hg,data:()=>({assessment_stage:"instructions"}),stimulus:()=>{const e=Uc().translations;return`<div class="lev-stimulus-container">\n ${Wv("replay-btn-revisited")}\n <div class="lev-row-container instruction">\n <p>${e.generalRepeatInstructions}</p>\n </div>\n </div>`},prompt_above_buttons:!0,button_choices:["Continue"],button_html:()=>`<button class="primary">${Uc().translations.continueButtonText}</button>`,keyboard_choices:"NO_KEYS",on_load:()=>{Bg.playAudio(AM.audio.generalRepeatInstructions);Gv(new _v("generalRepeatInstructions",!0)),ej(),tj()},on_finish:()=>{Bg.stopAndDisconnectNode()}};function bv(e,t){const n=document.querySelector(".primary");n&&Uc().totalTrialCount===t&&!Uc().isPaused&&setTimeout(()=>{n.disabled||(n.style.animation="pulse 2s infinite")},e)}const xv=(e,t=!1)=>{const n="trog"===Uc().task&&Uc().isRoarApp;return{timeline:[{type:Hg,data:()=>({assessment_stage:"instructions"}),stimulus:()=>{const t=n?"rocket":"rocket@2x",i=AM.images[t],s=Uc().translations;let o="generalYourTurn";e&&(o=e());const a=s[_r(o)];return`<div class="lev-stimulus-container">\n ${Wv("replay-btn-revisited")}\n <div class="lev-row-container instruction">\n <p>${a}</p>\n </div>\n <div class="lev-stim-content-x-3">\n <img\n src=${i}\n alt="Image not loading: ${i}. Please continue the task."\n />\n </div>\n </div>`},prompt_above_buttons:!0,button_choices:["Continue"],button_html:()=>`<button class="primary">${Uc().translations.continueButtonText}</button>`,keyboard_choices:n?["Enter"]:"NO_KEYS",post_trial_gap:350,on_load:()=>{let t="generalYourTurn";e&&(t=e());const n={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{bv(3e3,Uc().totalTrialCount)}};Bg.playAudio(AM.audio[_r(t)],n);Gv(new _v(_r(t),!0)),ej(),tj()},on_finish:()=>{Bg.stopAndDisconnectNode()}}],conditional_function:()=>{if(Uc().runCat||t)return!0;const e="instructions"!==Uc().nextStimulus.trialType&&"practice_response"!==Uc().nextStimulus.assessmentStage&&!Uc().testPhase;return e&&Uc("testPhase",!0),e}}};class _v{constructor(e,t){this.audioFile=e,"string"==typeof this.audioFile?this.audioUri=AM.audio[Ju(this.audioFile)]||AM.audio.nullAudio:this.audioUri=this.audioFile.map(e=>AM.audio[Ju(e)]),this.getbuffer(),this.replayBtn=document.getElementById("replay-btn-revisited"),this.playStimulusOnLoad=void 0===t||t}async getbuffer(){return this.audioBuffer?this.audioBuffer:"string"==typeof this.audioUri?(this.audioBuffer=await Fg.pluginAPI.getAudioBuffer(this.audioUri),this.audioBuffer):(this.audioBuffer=await Promise.all(this.audioUri.map(async e=>Fg.pluginAPI.getAudioBuffer(e))),this.audioBuffer)}async getStimulusDurationMs(){const e=await this.getbuffer();return e instanceof AudioBuffer?1e3*e.duration:e.reduce((e,t)=>e+1e3*t.duration,0)}isReplayBtnEnabled(){return this.replayBtn.hasAttribute("disabled")}enableReplayBtn(){this.replayBtn.disabled=!1}disableReplayBtn(){this.replayBtn.disabled=!0}}const wv={trog:{1:5},"roar-inference":{1:10}},kv=2e3;function Sv(){var e;const t=Uc().startTime;if("number"!=typeof t)return 0;const n=null!==(e=Uc().taskTimerPausedMs)&&void 0!==e?e:0,i=Uc().taskTimerPauseBeganAt,s="number"==typeof i?Date.now()-i:0;return Date.now()-t-n-s}async function Tv(e,t){const n=new _v(t,!1);e<await n.getStimulusDurationMs()+kv&&(clearTimeout(Uc().taskTimer),vv())}function Ev(e){var t,n;const{task:i,scoringVersion:s,maxTime:o}=Uc(),a=null!==(n=null===(t=wv[i])||void 0===t?void 0:t[s])&&void 0!==n?n:o;if(null==a)return;Tv(6e4*a-Sv(),e)}const Cv=(e,t)=>({timeline:[t],on_timeline_finish:async()=>{await e.firekit.updateUser({assessmentPid:e.pid||rl(),...e.userMetadata}),(e=>{const t=6e4*Math.max(e,1);Uc("startTime",Date.now()),Uc("taskTimerPausedMs",0),Uc("taskTimerPauseBeganAt",null);const n=setTimeout(()=>{Uc("maxTimeReached",!0),clearTimeout(n)},t);Uc("taskTimer",n)})(e.maxTime)}});const Iv={trog:{bucket:"roar-syntax",csv:"trog"},"roar-inference":{bucket:"roar-inference",csv:"inference"}};class Ov{constructor(e,t,n){this.getAgeForScore=({ageMin:e,ageMax:t})=>{var n,i,s,o;if(null==(null===(n=this.userMetadata)||void 0===n?void 0:n.age)||isNaN(Number(null===(i=this.userMetadata)||void 0===i?void 0:i.age))){if(!(null===(s=this.userMetadata)||void 0===s?void 0:s.grade))return;const e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:13,i=Number(e);if(null!=e){if(Number.isNaN(i)){var s={k:0,tk:0,pk:0,preschool:0,prekindergarten:0,transitionalkindergarten:0,kg:0,kindergarten:0,infanttoddler:0,infant:0,toddler:0,first:1,firstgrade:1,second:2,secondgrade:2,third:3,thirdgrade:3,fourth:4,fourthgrade:4,fifth:5,fifthgrade:5,sixth:6,sixthgrade:6,seventh:7,seventhgrade:7,eighth:8,eighthgrade:8,ninth:9,ninthgrade:9,tenth:10,tenthgrade:10,eleventh:11,eleventhgrade:11,twelfth:12,twelfthgrade:12,freshman:9,sophomore:10,junior:11,senior:12,postsecondary:13,ps:13,postgraduate:13,university:13,graduate:13,master:13,doctorate:13,masters:13}[e.toLowerCase().replace(/\s/g,"").replace(/-/g,"")];if(void 0===s)return;return s<t?t:s>n?n:s}return i<t?t:i>n?n:i}}(null===(o=this.userMetadata)||void 0===o?void 0:o.grade);if(null==e)return;this.ageForScore=66+12*Number(e)}else this.ageForScore=Number(this.userMetadata.age);this.ageForScore<e&&(this.ageForScore=e),this.ageForScore>t&&(this.ageForScore=t)},this.getNormedScores=async e=>{if(!this.lookupTableLoaded){this.lookupTablePromise||(this.lookupTablePromise=this.initTable());try{await this.lookupTablePromise,this.lookupTableError=null}catch(e){const t=e instanceof Error?e.message:String(e);(this.lookupTableError instanceof Error?this.lookupTableError.message:String(this.lookupTableError))!==t&&(console.error("Error loading scoring table:",t),this.lookupTableError=e)}}const t=Xf(e,e=>{var t,n;const i=void 0===(null===(t=e.test)||void 0===t?void 0:t.thetaEstimate)?null:null===(n=e.test)||void 0===n?void 0:n.thetaEstimate;let s={thetaEstimate:i,scoringVersion:this.scoringVersion};if(null!=i){const e=Number(i.toFixed(1)),t=this.lookupTable.find(t=>Number(Number(t.thetaEstimate).toFixed(1))===e);if(void 0!==t){const{ageMonths:e,thetaEstimate:n,...i}=t,o=Object.fromEntries(Object.entries(i).filter(([e])=>e&&"X"!==e));s={...s,...o}}}return s});return Object.entries(this.irtEstimates||{}).forEach(([e,n])=>{t[e]={...t[e],...n}}),t},this.getUnnormedScores=e=>{var t,n,i,s,o,a;const r=Xf(e,e=>{var t,n,i;return{subScore:(null===(t=e.test)||void 0===t?void 0:t.numCorrect)||0,subPercentCorrect:(null===(n=e.test)||void 0===n?void 0:n.numCorrect)/(null===(i=e.test)||void 0===i?void 0:i.numAttempted)||0}});return r.composite={totalCorrect:this.totalCorrect,totalNumAttempted:null===(n=null===(t=null==e?void 0:e.composite)||void 0===t?void 0:t.test)||void 0===n?void 0:n.numAttempted,totalPercentCorrect:(null===(s=null===(i=null==e?void 0:e.composite)||void 0===i?void 0:i.test)||void 0===s?void 0:s.numAttempted)>0?Math.round(this.totalCorrect/(null===(a=null===(o=null==e?void 0:e.composite)||void 0===o?void 0:o.test)||void 0===a?void 0:a.numAttempted)*100):0},r},this.computedScoreCallback=async e=>Object.keys(Iv).includes(this.task)&&this.scoringVersion&&this.scoringVersion>0?await this.getNormedScores(e):this.getUnnormedScores(e),this.task=e,this.totalCorrect=0,this.lookupTable=[],this.lookupTablePromise=null,this.lookupTableLoaded=!1,this.lookupTableError=null,this.ageForScore=void 0,this.scoringVersion=t,this.irtEstimates=null,this.userMetadata=n}async initTable(){const{bucket:e,csv:t}=Iv[this.task],n=`https://storage.googleapis.com/${e}/scores/${t}_lookup_v${this.scoringVersion}.csv`;return new Promise((e,t)=>{Tr.parse(n,{download:!0,header:!0,dynamicTyping:!0,skipEmptyLines:!0,complete:t=>{const n=t.data,i=Array.from(new Set(n.map(e=>e.ageMonths))).sort((e,t)=>e-t);0===i.length?console.error("Unable to get age ranges from lookup table. Table may be empty or malformed."):this.getAgeForScore({ageMin:i[0],ageMax:i[i.length-1]}),this.lookupTable=n.filter(e=>e.ageMonths===this.ageForScore),this.lookupTableLoaded=!0,e(n)},error:e=>{this.lookupTablePromise=null,this.lookupTable=[],t(e)}})})}}const jv=e=>{e.displayElement&&(Fg.opts.display_element=e.display_element);const t=(e,t)=>function(){e.apply(e,arguments),t.apply(e,arguments)};Fg.opts.on_finish=t(Fg.opts.on_finish,()=>{e.firekit.finishRun()}),Fg.opts.on_trial_finish=t(Fg.opts.on_trial_finish,()=>{Uc().maxTimeReached&&vv(),Uc().testTrialCount>=.8*Uc().totalTestTrials&&function(e){var t,n;(null===(n=null===(t=null==e?void 0:e.firekit)||void 0===t?void 0:t.run)||void 0===n?void 0:n.completed)||e.firekit.finishRun()}(e),Uc("totalTrialCount",Uc().totalTrialCount+1)});let n=null,i=null;e.isRoarApp&&(n=new Ov(e.task,e.scoringVersion,e.userMetadata),i=async e=>(n.totalCorrect=Uc().totalCorrect,n.irtEstimates=Uc().irtEstimates,await n.computedScoreCallback(e))),Fg.opts.on_data_update=t(Fg.opts.on_data_update,t=>{if(t.save_trial){const n=wf(t);delete n.save_trial,delete n.internal_node_id,delete n.button_response,delete n.response_source,n.responseSource=t.response_source,delete n.trial_type,n.trialIndex=n.trial_index,delete n.trial_index,n.taskId=Uc().task,e.isRoarApp?e.firekit.writeTrial(n,i):e.firekit.writeTrial(n).catch(e=>{delete n.stimulus,Ig.getInstance().capture("Error writing trial to Firestore",{error:e,data:n})})}})};async function Av(e,t={},n,i,s="",o={images:{},audio:{},video:{}}){const a=e.split("/"),r=a[0],c=a.slice(1).join("/");let l,u,p=`https://storage.googleapis.com/storage/v1/b/${r}/o?prefix=${c}/`;return s&&(p+=`&pageToken=${s}`),u=await fetch(p),l=await u.json(),l.items&&0!==l.items.length||("audio/en-US"===c?(u=await fetch(`https://storage.googleapis.com/storage/v1/b/${r}/o?prefix=audio/en/`),l=await u.json()):"audio/de-DE"===c&&(u=await fetch(`https://storage.googleapis.com/storage/v1/b/${r}/o?prefix=audio/de/`),l=await u.json())),l.items.forEach(e=>{var s;if(function(e,t,n){const i=e.split("/");if(3!==i.length)return!1;if("visual"===i[0])return i[1]===n&&0!==i[2].length;if("audio"===i[0])return(i[1]===t||i[1]===t.slice(0,2))&&0!==i[2].length;return!1}(e.name,n,i)&&function(e,t){const n=e.split("/");for(const[e,i]of Object.entries(t)){const t=n.indexOf(e);if(-1!==t&&n.length>t+1){const e=n[t+1];return!!i.includes(e)}}return!0}(e.name,t)){const t=e.contentType,n=e.name,i=`https://storage.googleapis.com/${r}/${n}`,a=_r((null===(s=n.split("/").pop())||void 0===s?void 0:s.split(".")[0])||"");t.startsWith("image/")?o.images[a]=i:t.startsWith("audio/")?o.audio[a]=i:t.startsWith("video/")&&(o.video[a]=i)}}),l.nextPageToken?Av(e,t,n,i,l.nextPageToken,o):o}async function Lv(e,t={},n,i="",s={images:{},audio:{},video:{}}){const o=Zu();let a=`https://storage.googleapis.com/storage/v1/b/${e}/o`;i&&(a+=`?pageToken=${i}`);const r=await fetch(a),c=await r.json();return c.items.forEach(i=>{var a;if(function(e,t,n){const i=e.split("/");if("shared"===i[0])return!0;if(i[0]===t)return i.length>1&&(i[1]===n||"shared"===i[1]);return!1}(i.name,n,o)&&function(e,t){const n=e.split("/");for(const[e,i]of Object.entries(t)){const t=n.indexOf(e);if(-1!==t&&n.length>t+1){const e=n[t+1];return!!i.includes(e)}}return!0}(i.name,t)){const t=i.contentType,n=i.name,o=`https://storage.googleapis.com/${e}/${n}`,r=_r((null===(a=n.split("/").pop())||void 0===a?void 0:a.split(".")[0])||"");t.startsWith("image/")?s.images[r]=o:t.startsWith("audio/")?s.audio[r]=o:t.startsWith("video/")&&(s.video[r]=o)}}),c.nextPageToken?Lv(e,t,n,c.nextPageToken,s):s}function Pv(){return{type:np,show_progress_bar:!0,continue_after_error:!1,error_message:"",show_detailed_errors:!0,max_load_time:null,on_error:null,on_success:null,images:[],audio:[],video:[]}}function Rv(e,t=[]){const n=t.length>0?t.reduce((e,t)=>(e[t]=Pv(),e),{}):{default:Pv()},i=(e,t)=>new URL(e).pathname.split("/").some(e=>e===t);return Object.entries(e).forEach(([e,s])=>{Object.entries(s).forEach(([s,o])=>{let a=!1;for(const s of t)if(i(o,s)){n[s][e].push(o),a=!0;break}a||0!==t.length||n.default[e].push(o)})}),n}const Mv=(e,t,n,i=!1)=>{let s,o;if(s=Uc().corpora,null!=t)o=jg.findNextItem(s[e][t]);else if(null!=n){const t=s[e].filter(e=>e.storyGroup===n);if(i){const n=t[Math.floor(Math.random()*t.length)],i=s[e].filter(e=>e.itemId!==n.itemId);o={nextStimulus:n,remainingStimuli:i}}else o=jg.findNextItem(t)}else o=jg.findNextItem(s[e]);const a=o.nextStimulus.audioFile;if("string"==typeof a)a&&!AM.audio[_r(a)]&&(console.warn("Trial skipped. Audio file not found:",a),Uc("skipCurrentTrial",!0),Fg.endCurrentTimeline());else{const e=a.map(e=>_r(e));e.some(e=>!AM.audio[e])&&(console.warn("Trial skipped. Audio file(s) not found:",e),Uc("skipCurrentTrial",!0),Fg.endCurrentTimeline())}Tv(6e4*Uc().maxTime-Sv(),a),Uc("nextStimulus",o.nextStimulus),"practice_response"===o.nextStimulus.assessmentStage&&Uc("testPhase",!1),null!=t?s[e][t]=o.remainingStimuli:s[e]=o.remainingStimuli,Uc("corpora",s)};function Nv(e){if("number"==typeof e||!e.includes("/"))return e;const t=e.includes("-")?"-":"+",n=e.split(t),i=n.map(e=>(e=>{const[t,n]=e.split("/");return`<mfrac><mrow><mn>${t}</mn></mrow><mrow><mn>${n}</mn></mrow></mfrac>`})(e.trim())),s=n.length>1?`<mo>${t}</mo>`:"";return`<math xmlns="http://www.w3.org/1998/Math/MathML">\n <mrow>\n ${i.join(s)}\n ${n.length>1?"<mo>=</mo>":""}\n </mrow>\n </math>`}const Dv=(e,t,n,i)=>{let s;switch(s=!e||t.includes(e)?[...t]:[e,...t],JSON.stringify([...s].sort())===JSON.stringify(["yes","no"].sort())&&(s=["yes","no"]),n){case"yes":default:s=Bc(s);break;case"no":break;case"at_block_level":const e=Uc().previousChoices;null!=e&&JSON.stringify([...s].sort())===JSON.stringify([...e].sort())?s=e:(s=Bc(s),Uc("previousChoices",s))}const o=[...s];"Fraction"===i&&(Uc("nonFractionSelections",s),s=s.map(e=>Nv(e)));const a="Fraction"===i?Uc().nonFractionSelections.indexOf(e):s.indexOf(e);return Uc("target",e),Uc("correctResponseIdx",a),Uc("choices",s),{target:e,choices:s,originalChoices:o,correctResponseIdx:a}};const Fv='\n<svg xmlns="http://www.w3.org/2000/svg" width="44" height="38" viewBox="0 0 44 38" fill="none">\n <path d="M34.561 11.7551C34.2268 11.3413 33.7419 11.0773 33.2131 11.021C32.6842 10.9648 32.1547 11.1209 31.741 11.4551C31.3272 11.7892 31.0632 12.2741 31.0069 12.8029C30.9507 13.3318 31.1068 13.8613 31.441 14.2751C32.4514 15.6489 32.9964 17.3097 32.9964 19.0151C32.9964 20.7205 32.4514 22.3812 31.441 23.7551C31.2025 24.049 31.0524 24.4045 31.008 24.7804C30.9635 25.1562 31.0267 25.537 31.1901 25.8784C31.3534 26.2198 31.6103 26.5078 31.9309 26.709C32.2514 26.9102 32.6225 27.0164 33.001 27.0151C33.2997 27.0161 33.595 26.9501 33.8649 26.8221C34.1349 26.694 34.3727 26.5071 34.561 26.2751C36.1474 24.1872 37.0063 21.6372 37.0063 19.0151C37.0063 16.3929 36.1474 13.8429 34.561 11.7551Z" fill="#275BDD"/>\n <path d="M37.28 5.47428C37.0778 5.30619 36.8444 5.17957 36.5932 5.10167C36.3421 5.02376 36.078 4.99609 35.8162 5.02024C35.5543 5.04438 35.2997 5.11986 35.0671 5.24238C34.8344 5.36489 34.6281 5.53204 34.46 5.73428C34.2919 5.93651 34.1653 6.16988 34.0874 6.42104C34.0095 6.67221 33.9818 6.93626 34.006 7.19812C34.0301 7.45999 34.1056 7.71453 34.2281 7.94722C34.3506 8.17991 34.5178 8.38619 34.72 8.55428C36.3241 9.79402 37.6307 11.3767 38.5442 13.1865C39.4578 14.9963 39.9552 16.9875 40 19.0143C39.9552 21.0411 39.4578 23.0322 38.5442 24.8421C37.6307 26.6519 36.3241 28.2345 34.72 29.4743C34.5175 29.6422 34.3501 29.8484 34.2274 30.0811C34.1047 30.3138 34.0291 30.5684 34.0049 30.8303C33.9808 31.0923 34.0085 31.3564 34.0866 31.6076C34.1647 31.8588 34.2916 32.0922 34.46 32.2943C34.648 32.52 34.8835 32.7016 35.1497 32.826C35.4159 32.9505 35.7062 33.0148 36 33.0143C36.4673 33.0152 36.9202 32.8524 37.28 32.5543C39.3409 30.9431 41.0144 28.8905 42.1773 26.5473C43.3403 24.2041 43.9631 21.6299 44 19.0143C43.9631 16.3986 43.3403 13.8245 42.1773 11.4813C41.0144 9.1381 39.3409 7.08542 37.28 5.47428ZM26.94 1.25428C26.636 1.07874 26.2911 0.986328 25.94 0.986328C25.5889 0.986328 25.244 1.07874 24.94 1.25428L12 10.1543H2C1.46957 10.1543 0.960859 10.365 0.585786 10.7401C0.210714 11.1151 0 11.6238 0 12.1543V25.8743C0 26.4047 0.210714 26.9134 0.585786 27.2885C0.960859 27.6636 1.46957 27.8743 2 27.8743H12L24.82 36.6743C25.1712 36.9015 25.5817 37.0198 26 37.0143C26.5304 37.0143 27.0391 36.8036 27.4142 36.4285C27.7893 36.0534 28 35.5447 28 35.0143V3.01428C27.999 2.65247 27.8999 2.2977 27.7133 1.98776C27.5266 1.67782 27.2594 1.42433 26.94 1.25428Z" fill="#275BDD"/>\n</svg>\n',Bv=[["arrowleft",'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none">\n <path d="M27.1414 41.7277L25.0602 43.809C24.1789 44.6902 22.7539 44.6902 21.882 43.809L3.65703 25.5934C2.77578 24.7121 2.77578 23.2871 3.65703 22.4152L21.882 4.19023C22.7633 3.30898 24.1883 3.30898 25.0602 4.19023L27.1414 6.27148C28.032 7.16211 28.0133 8.61523 27.1039 9.48711L15.807 20.2496H42.7508C43.9977 20.2496 45.0008 21.2527 45.0008 22.4996V25.4996C45.0008 26.7465 43.9977 27.7496 42.7508 27.7496H15.807L27.1039 38.5121C28.0227 39.384 28.0414 40.8371 27.1414 41.7277Z" fill="#FFFFFF"/>\n </svg>'],["arrowright",'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none">\n <path d="M20.8586 6.27227L22.9398 4.19102C23.8211 3.30977 25.2461 3.30977 26.118 4.19102L44.343 22.4066C45.2242 23.2879 45.2242 24.7129 44.343 25.5848L26.118 43.8098C25.2367 44.691 23.8117 44.691 22.9398 43.8098L20.8586 41.7285C19.968 40.8379 19.9867 39.3848 20.8961 38.5129L32.193 27.7504H5.24921C4.00234 27.7504 2.99921 26.7473 2.99921 25.5004V22.5004C2.99921 21.2535 4.00234 20.2504 5.24921 20.2504H32.193L20.8961 9.48789C19.9773 8.61602 19.9586 7.16289 20.8586 6.27227Z" fill="#FFFFFF"/>\n </svg>']],$v=[["arrowup",'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none">\n <path d="M41.7238 27.1414L43.8051 25.0602C44.6863 24.1789 44.6863 22.7539 43.8051 21.882L25.5895 3.65703C24.7082 2.77578 23.2832 2.77578 22.4113 3.65703L4.18633 21.882C3.30508 22.7633 3.30508 24.1883 4.18633 25.0602L6.26758 27.1414C7.1582 28.032 8.61133 28.0133 9.4832 27.1039L20.2457 15.807L20.2457 42.7508C20.2457 43.9977 21.2488 45.0008 22.4957 45.0008H25.4957C26.7426 45.0008 27.7457 43.9977 27.7457 42.7508L27.7457 15.807L38.5082 27.1039C39.3801 28.0227 40.8332 28.0414 41.7238 27.1414Z" fill="#A0BBFF"/>\n </svg>\n '],["arrowleft",'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none">\n <path d="M27.1414 41.7277L25.0602 43.809C24.1789 44.6902 22.7539 44.6902 21.882 43.809L3.65703 25.5934C2.77578 24.7121 2.77578 23.2871 3.65703 22.4152L21.882 4.19023C22.7633 3.30898 24.1883 3.30898 25.0602 4.19023L27.1414 6.27148C28.032 7.16211 28.0133 8.61523 27.1039 9.48711L15.807 20.2496H42.7508C43.9977 20.2496 45.0008 21.2527 45.0008 22.4996V25.4996C45.0008 26.7465 43.9977 27.7496 42.7508 27.7496H15.807L27.1039 38.5121C28.0227 39.384 28.0414 40.8371 27.1414 41.7277Z" fill="#A0BBFF"/>\n </svg>'],["arrowright",'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none">\n <path d="M20.8586 6.27227L22.9398 4.19102C23.8211 3.30977 25.2461 3.30977 26.118 4.19102L44.343 22.4066C45.2242 23.2879 45.2242 24.7129 44.343 25.5848L26.118 43.8098C25.2367 44.691 23.8117 44.691 22.9398 43.8098L20.8586 41.7285C19.968 40.8379 19.9867 39.3848 20.8961 38.5129L32.193 27.7504H5.24921C4.00234 27.7504 2.99921 26.7473 2.99921 25.5004V22.5004C2.99921 21.2535 4.00234 20.2504 5.24921 20.2504H32.193L20.8961 9.48789C19.9773 8.61602 19.9586 7.16289 20.8586 6.27227Z" fill="#A0BBFF"/>\n </svg>'],["arrowdown",'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none">\n <path d="M41.7238 20.8586L43.8051 22.9398C44.6863 23.8211 44.6863 25.2461 43.8051 26.118L25.5895 44.343C24.7082 45.2242 23.2832 45.2242 22.4113 44.343L4.18633 26.118C3.30508 25.2367 3.30508 23.8117 4.18633 22.9398L6.26758 20.8586C7.1582 19.968 8.61133 19.9867 9.4832 20.8961L20.2457 32.193L20.2457 5.24921C20.2457 4.00234 21.2488 2.99921 22.4957 2.99921H25.4957C26.7426 2.99921 27.7457 4.00234 27.7457 5.24921L27.7457 32.193L38.5082 20.8961C39.3801 19.9773 40.8332 19.9586 41.7238 20.8586Z" fill="#A0BBFF"/>\n </svg>']],zv='\n<svg xmlns="http://www.w3.org/2000/svg" width="88" height="32" viewBox="0 0 88 32" fill="none" aria-hidden="true">\n <rect x="1" y="1" width="80" height="24" rx="12" ry="12" fill="#275BDD" />\n</svg>\n',qv='\n<svg xmlns="http://www.w3.org/2000/svg" width="88" height="32" viewBox="0 0 88 32" fill="none" aria-hidden="true">\n <rect x="1" y="1" width="80" height="24" rx="12" ry="12" fill="#828282" />\n</svg>\n',Uv='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-xbox-x"><path stroke="none" d="M0 0h24v24H0z" fill="none" />\n <path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10 -10 10s-10 -4.477 -10 -10s4.477 -10 10 -10m3.6 5.2a1 1 0 0 0 -1.4 .2l-2.2 2.933l-2.2 -2.933a1 1 0 1 0 -1.6 1.2l2.55 3.4l-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2 -2.933l2.2 2.933a1 1 0 0 0 1.6 -1.2l-2.55 -3.4l2.55 -3.4a1 1 0 0 0 -.2 -1.4" fill="#7D7F7C"/>\n</svg>\n',Hv='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-player-pause">\n <path stroke="none" d="M0 0h24v24H0z" fill="none" />\n <path d="M9 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" fill="#7D7F7C"/>\n <path d="M17 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" fill="#7D7F7C"/>\n</svg>\n',Vv='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#275BDD" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-arrows-maximize">\n <path d="M16 4l4 0l0 4"/>\n <path d="M14 10l6 -6"/>\n <path d="M8 20l-4 0l0 -4"/>\n <path d="M4 20l6 -6"/>\n <path d="M16 20l4 0l0 -4"/>\n <path d="M14 14l6 6"/>\n <path d="M8 4l-4 0l0 4"/>\n <path d="M4 4l6 6"/>\n</svg>',Kv='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-menu-2"><path stroke="none" d="M0 0h24v24H0z" fill="none" />\n <path d="M21 6a1 1 0 0 1 -1 1h-16a1 1 0 1 1 0 -2h16a1 1 0 0 1 1 1" fill="#275BDD"/>\n <path d="M21 12a1 1 0 0 1 -1 1h-16a1 1 0 0 1 0 -2h16a1 1 0 0 1 1 1" fill="#275BDD"/>\n <path d="M21 18a1 1 0 0 1 -1 1h-16a1 1 0 0 1 0 -2h16a1 1 0 0 1 1 1" fill="#275BDD"/>\n</svg>';function Wv(e,t=!0){return`\n <div class="participant-button-container">\n <button class="utility" id="fullscreen" ${document.fullscreenElement?'style="visibility: hidden;"':""}>\n ${Vv}\n </button>\n ${t?`<button id="${e}" class="utility">\n ${Fv}\n </button>`:""}\n </div>\n `}async function Gv(e){if(Bg.replayPresses=0,e.replayBtn){if(e.playStimulusOnLoad){e.disableReplayBtn();const i=100,s=await e.getStimulusDurationMs();setTimeout(()=>{e.enableReplayBtn()},s+i)}const t={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{e.enableReplayBtn()}};async function n(){if(Bg.replayPresses++,e.disableReplayBtn(),"string"==typeof e.audioUri)Bg.playAudio(e.audioUri,t);else for(let n=0;n<e.audioUri.length;n++){const i=e.audioUri[n],s=n===e.audioUri.length-1;await new Promise(e=>{const n={...t,onEnded:()=>{var n;s&&(null===(n=t.onEnded)||void 0===n||n.call(t)),e()}};Bg.playAudio(i,n)})}}e.replayBtn.addEventListener("click",n)}}const Yv="levante-logo-loading";function Jv(){const e=qc.page.get("skipCurrentBlock");for(Uc("trialsSkipped",0);Uc().nextStimulus.trialType===e&&0!==Uc().corpora.stimulus.length;){Mv("stimulus");const e=Uc().trialsSkipped;Uc("trialsSkipped",e+1)}}const Zv=e=>{qc.page.get("failedPrimaryTrials")&&Uc().numIncorrect>=1&&!Uc().heavyInstructions?(Uc("numIncorrect",0),qc.page.set("skipCurrentBlock",e),Jv()):Uc().numIncorrect>=Uc().maxIncorrect&&(Uc("numIncorrect",0),qc.page.set("skipCurrentBlock",e),qc.page.set("failedPrimaryTrials",!0),Jv())},Xv={trog:{1:{responseTimeLowThreshold:1500,accuracyThreshold:.65,minResponsesRequired:10,includedReliabilityFlags:["notEnoughResponses","accuracyTooLowAndResponseTimeTooFast"],customValidations:[{logicalOperation:"and",conditions:[e=>e.existingFlags.includes("responseTimeTooFast"),e=>e.existingFlags.includes("accuracyTooLow")],flag:"accuracyTooLowAndResponseTimeTooFast"}]}},"roar-inference":{1:{responseTimeLowThreshold:500,accuracyThreshold:.5,minResponsesRequired:10,includedReliabilityFlags:["notEnoughResponses","accuracyTooLowAndResponseTimeTooFast"],customValidations:[{logicalOperation:"and",conditions:[e=>e.existingFlags.includes("responseTimeTooFast"),e=>e.existingFlags.includes("accuracyTooLow")],flag:"accuracyTooLowAndResponseTimeTooFast"}]}}};function Qv(e){var t;const{task:n,scoringVersion:i}=Uc(),s=null===(t=Xv[n])||void 0===t?void 0:t[i];if(!s)throw new Error(`No reliability configuration found for task "${n}" version ${i}`);const o=Qu({...s});return new ep({evaluateValidity:o,handleEngagementFlags:(t,n)=>{var i;return e.firekit.run.started?null===(i=e.firekit)||void 0===i?void 0:i.updateEngagementFlags(t,n):null}})}function ey(e,t,n,i){const s=i.reduce((i,s)=>{const{thetaEstimate:o,thetaSE:a}=n(e[s],t[s],s);return i[s]={thetaEstimate:o,thetaEstimateRaw:e[s],thetaSE:a,thetaSERaw:Yr(t[s])},i},{});return s}function ty(e){const t={},n={};return Object.keys(e).forEach(i=>{t[i]=e[i].thetaEstimate,n[i]=e[i].thetaSE}),{thetas:t,thetaSEs:n}}function ny(e){return e.zetas.reduce((e,t)=>(e[t.cats[0]]=t.zeta,e),{})}function iy(e,t=!0,n,i=!1){const s=["3D","polygon"],o=Uc().runCat;let a,r=[],c=[];n&&(r=n.filter(e=>"instructions"===e.trialType||"practice_response"===e.assessmentStage),c=n.filter(e=>!r.includes(e)));const l=e.filter(e=>"instructions"===e.trialType||"practice_response"===e.assessmentStage),u=e.filter(e=>!l.includes(e)),p={ipHeavy:r,ipLight:l,test:u,downexTest:c};i&&p.test.forEach((e,t)=>{if("something-same-1"===e.trialType){const n=p.test[t+1];"something-same-2"===n.trialType&&(e.difficulty=n.difficulty)}});const d=p.test.filter(e=>null==e.difficulty||isNaN(Number(e.difficulty))),m=p.test.filter(e=>!d.includes(e)),h=sy(m.filter(e=>!s.includes(e.trialType)&&("egma-math"==Uc().task&&0===e.block_index||"egma-math"!==Uc().task)&&Number(e.difficulty)<=0),5),f=t?m.filter(e=>!h.includes(e)):m,g=c.filter(e=>null==e.difficulty||isNaN(Number(e.difficulty))),v=c.filter(e=>!g.includes(e));if(a={ipHeavy:p.ipHeavy,ipLight:p.ipLight,start:h,unnormed:d,downexUnnormed:g,cat:f,downexCat:v},o){Uc("corpora",{downex:c,stimulus:f})}else{const e={practice:c,stimulus:p.test};Uc("corpora",e)}return a}function sy(e,t){const n=[],i=Bc(e);for(let e=t;e>0;e--){const e=i.pop();void 0!==e&&n.push(e)}return n}function oy(e,t=!0){const n=[];t&&e.sort((e,t)=>Number(e.block_index)-Number(t.block_index));let i=-1;return e.forEach(e=>{const t=i;i=Number(e.block_index),null!=i&&(i!==t?n.push([e]):n[n.length-1].push(e))}),n}function ay(e,t){if(Uc().runCat){const n={a:1,b:e.difficulty,c:e.chanceLevel,d:1};if(!Number.isNaN(n.b)&&null!==n.b&&"practice_response"!==e.assessmentStage){const e=t?1:0;jg.updateAbilityEstimate(n,e)}}Fg.data.addDataToLastTrial({thetaEstimate:jg.theta})}const ry=e=>"string"==typeof e?e:e.join(", "),cy=(e,t,n,i)=>{const s=[];if(e.playAudioOnLoad)if(i.audioFile)if("string"==typeof i.audioFile){const o=_r(i.audioFile);t.audio[o]||s.push(`Missing audio asset: ${o}`),e.prompt.enabled&&!n[o]&&s.push(`Missing prompt for: ${o}`)}else{i.audioFile.map(e=>_r(e)).forEach(e=>{t.audio[e]||s.push(`Missing audio asset: ${e}`)})}else s.push("Missing audioFile string");return e.isImageButtonResponse&&e.response.values.forEach(n=>{const i=_r(n);i||s.push(`Missing image button string: ${i}`),t.images[i]||s.push(`Missing imageAsset: ${i}`),e.isStaggered&&!t.audio[i]&&s.push(`Missing audio for staggered button: ${i}`)}),s},ly=e=>e.map(e=>e.toString()),uy="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,py="8.55.0",dy=globalThis;function my(e,t,n){const i=n||dy,s=i.__SENTRY__=i.__SENTRY__||{},o=s[py]=s[py]||{};return o[e]||(o[e]=t())}const hy="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,fy=["debug","info","warn","error","log","assert","trace"],gy={};function vy(e){if(!("console"in dy))return e();const t=dy.console,n={},i=Object.keys(gy);i.forEach(e=>{const i=gy[e];n[e]=t[e],t[e]=i});try{return e()}finally{i.forEach(e=>{t[e]=n[e]})}}const yy=my("logger",function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return hy?fy.forEach(n=>{t[n]=(...t)=>{e&&vy(()=>{dy.console[n](`Sentry Logger [${n}]:`,...t)})}}):fy.forEach(e=>{t[e]=()=>{}}),t}),by="?",xy=/\(error: (.*)\)/,_y=/captureMessage|captureException/;function wy(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,i=0)=>{const s=[],o=e.split("\n");for(let e=n;e<o.length;e++){const n=o[e];if(n.length>1024)continue;const a=xy.test(n)?n.replace(xy,"$1"):n;if(!a.match(/\S*Error: /)){for(const e of t){const t=e(a);if(t){s.push(t);break}}if(s.length>=50+i)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(ky(t).function||"")&&t.pop();t.reverse(),_y.test(ky(t).function||"")&&(t.pop(),_y.test(ky(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||ky(t).filename,function:e.function||by}))}(s.slice(i))}}function ky(e){return e[e.length-1]||{}}const Sy="<anonymous>";function Ty(e){try{return e&&"function"==typeof e&&e.name||Sy}catch(e){return Sy}}function Ey(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch(e){return}}}const Cy={},Iy={};function Oy(e,t){Cy[e]=Cy[e]||[],Cy[e].push(t)}function jy(e,t){if(!Iy[e]){Iy[e]=!0;try{t()}catch(t){hy&&yy.error(`Error while instrumenting ${e}`,t)}}}function Ay(e,t){const n=e&&Cy[e];if(n)for(const i of n)try{i(t)}catch(t){hy&&yy.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ty(i)}\nError:`,t)}}let Ly=null;function Py(e){const t="error";Oy(t,e),jy(t,Ry)}function Ry(){Ly=dy.onerror,dy.onerror=function(e,t,n,i,s){return Ay("error",{column:i,error:s,line:n,msg:e,url:t}),!!Ly&&Ly.apply(this,arguments)},dy.onerror.__SENTRY_INSTRUMENTED__=!0}let My=null;function Ny(e){const t="unhandledrejection";Oy(t,e),jy(t,Dy)}function Dy(){My=dy.onunhandledrejection,dy.onunhandledrejection=function(e){return Ay("unhandledrejection",e),!My||My.apply(this,arguments)},dy.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Fy(){return By(dy),dy}function By(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||py,t[py]=t[py]||{}}const $y=Object.prototype.toString;function zy(e){switch($y.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Zy(e,Error)}}function qy(e,t){return $y.call(e)===`[object ${t}]`}function Uy(e){return qy(e,"ErrorEvent")}function Hy(e){return qy(e,"DOMError")}function Vy(e){return qy(e,"String")}function Ky(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Wy(e){return null===e||Ky(e)||"object"!=typeof e&&"function"!=typeof e}function Gy(e){return qy(e,"Object")}function Yy(e){return"undefined"!=typeof Event&&Zy(e,Event)}function Jy(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Zy(e,t){try{return e instanceof t}catch(e){return!1}}function Xy(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Qy=dy;function eb(e,t={}){if(!e)return"<unknown>";try{let n=e;const i=5,s=[];let o=0,a=0;const r=" > ",c=r.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<i&&(l=tb(n,u),!("html"===l||o>1&&a+s.length*c+l.length>=p));)s.push(l),a+=l.length,n=n.parentNode;return s.reverse().join(r)}catch(e){return"<unknown>"}}function tb(e,t){const n=e,i=[];if(!n||!n.tagName)return"";if(Qy.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}i.push(n.tagName.toLowerCase());const s=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(s&&s.length)s.forEach(e=>{i.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&i.push(`#${n.id}`);const e=n.className;if(e&&Vy(e)){const t=e.split(/\s+/);for(const e of t)i.push(`.${e}`)}}const o=["aria-label","type","name","title","alt"];for(const e of o){const t=n.getAttribute(e);t&&i.push(`[${e}="${t}"]`)}return i.join("")}function nb(){try{return Qy.document.location.href}catch(e){return""}}function ib(e){if(!Qy.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function sb(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function ob(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const i=e[t];try{Xy(i)?n.push("[VueViewModel]"):n.push(String(i))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function ab(e,t,n=!1){return!!Vy(e)&&(qy(t,"RegExp")?t.test(e):!!Vy(t)&&(n?e===t:e.includes(t)))}function rb(e,t=[],n=!1){return t.some(t=>ab(e,t,n))}function cb(e,t,n){if(!(t in e))return;const i=e[t],s=n(i);"function"==typeof s&&ub(s,i);try{e[t]=s}catch(n){hy&&yy.log(`Failed to replace method "${t}" in object`,e)}}function lb(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){hy&&yy.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ub(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,lb(e,"__sentry_original__",t)}catch(e){}}function pb(e){return e.__sentry_original__}function db(e){if(zy(e))return{message:e.message,name:e.name,stack:e.stack,...hb(e)};if(Yy(e)){const t={type:e.type,target:mb(e.target),currentTarget:mb(e.currentTarget),...hb(e)};return"undefined"!=typeof CustomEvent&&Zy(e,CustomEvent)&&(t.detail=e.detail),t}return e}function mb(e){try{return t=e,"undefined"!=typeof Element&&Zy(t,Element)?eb(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}var t}function hb(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function fb(e){return gb(e,new Map)}function gb(e,t){if(function(e){if(!Gy(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const i={};t.set(e,i);for(const n of Object.getOwnPropertyNames(e))void 0!==e[n]&&(i[n]=gb(e[n],t));return i}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const i=[];return t.set(e,i),e.forEach(e=>{i.push(gb(e,t))}),i}return e}function vb(){return Date.now()/1e3}const yb=function(){const{performance:e}=dy;if(!e||!e.now)return vb;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}(),bb=(()=>{const{performance:e}=dy;if(!e||!e.now)return;const t=36e5,n=e.now(),i=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-i):t,o=s<t,a=e.timing&&e.timing.navigationStart,r="number"==typeof a?Math.abs(a+n-i):t;return o||r<t?s<=r?e.timeOrigin:a:i})();function xb(){const e=dy,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function _b(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function wb(e){const{message:t,event_id:n}=e;if(t)return t;const i=_b(e);return i?i.type&&i.value?`${i.type}: ${i.value}`:i.type||i.value||n||"<unknown>":n||"<unknown>"}function kb(e,t,n){const i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function Sb(e,t){const n=_b(e);if(!n)return;const i=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...i,...t},t&&"data"in t){const e={...i&&i.data,...t.data};n.mechanism.data=e}}function Tb(e){if(function(e){try{return e.__sentry_captured__}catch(e){}}(e))return!0;try{lb(e,"__sentry_captured__",!0)}catch(e){}return!1}var Eb;function Cb(e){return new Ob(t=>{t(e)})}function Ib(e){return new Ob((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Eb||(Eb={}));let Ob=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=Eb.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,n){return new e((e,i)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(e){i(e)}else e(n)},t=>{if(n)try{e(n(t))}catch(e){i(e)}else i(t)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let i,s;return this.then(e=>{s=!1,i=e,t&&t()},e=>{s=!0,i=e,t&&t()}).then(()=>{s?n(i):e(i)})})}__init(){this._resolve=e=>{this._setResult(Eb.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Eb.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===Eb.PENDING&&(Jy(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Eb.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===Eb.RESOLVED&&e[1](this._value),this._state===Eb.REJECTED&&e[2](this._value),e[0]=!0)})}}};function jb(e){const t=yb(),n={sid:xb(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return fb({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&Ab(n,e),n}function Ab(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||yb(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:xb()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Lb(){return xb()}function Pb(){return xb().substring(16)}function Rb(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const i={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(i[e]=Rb(i[e],t[e],n-1));return i}const Mb="_sentrySpan";function Nb(e,t){t?lb(e,Mb,t):delete e[Mb]}function Db(e){return e[Mb]}class Fb{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Lb(),spanId:Pb()}}clone(){const e=new Fb;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,Nb(e,Db(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ab(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,i]=t instanceof Bb?[t.getScopeData(),t.getRequestSession()]:Gy(t)?[e,e.requestSession]:[],{tags:s,extra:o,user:a,contexts:r,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...r},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Nb(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Lb()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const i={timestamp:vb(),...e};return this._breadcrumbs.push(i),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Db(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Rb(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Pb(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:xb();if(!this._client)return yy.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},this),n}captureMessage(e,t,n){const i=n&&n.event_id?n.event_id:xb();if(!this._client)return yy.warn("No client configured on scope - will not capture message!"),i;const s=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:i},this),i}captureEvent(e,t){const n=t&&t.event_id?t.event_id:xb();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(yy.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}const Bb=Fb;class $b{constructor(e,t){let n,i;n=e||new Bb,i=t||new Bb,this._stack=[{scope:n}],this._isolationScope=i}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return Jy(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function zb(){const e=By(Fy());return e.stack=e.stack||new $b(my("defaultCurrentScope",()=>new Bb),my("defaultIsolationScope",()=>new Bb))}function qb(e){return zb().withScope(e)}function Ub(e,t){const n=zb();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Hb(e){return zb().withScope(()=>e(zb().getIsolationScope()))}function Vb(e){const t=By(e);return t.acs?t.acs:{withIsolationScope:Hb,withScope:qb,withSetScope:Ub,withSetIsolationScope:(e,t)=>Hb(t),getCurrentScope:()=>zb().getScope(),getIsolationScope:()=>zb().getIsolationScope()}}function Kb(){return Vb(Fy()).getCurrentScope()}function Wb(){return Vb(Fy()).getIsolationScope()}function Gb(...e){const t=Vb(Fy());if(2===e.length){const[n,i]=e;return n?t.withSetScope(n,i):t.withScope(i)}return t.withScope(e[0])}function Yb(){return Kb().getClient()}function Jb(e){const t=e.getPropagationContext(),{traceId:n,spanId:i,parentSpanId:s}=t;return fb({trace_id:n,span_id:i,parent_span_id:s})}function Zb(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[e,i]]of t){(n[e]||(n[e]=[])).push(fb(i))}return n}const Xb="sentry.source",Qb="sentry.sample_rate",ex="sentry.op",tx="sentry.origin",nx="sentry.idle_span_finish_reason",ix="sentry.measurement_unit",sx="sentry.measurement_value",ox="sentry.custom_span_name",ax="sentry.exclusive_time";function rx(e,t){e.setAttribute("http.response.status_code",t);const n=function(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}(t);"unknown_error"!==n.message&&e.setStatus(n)}const cx="sentry-",lx=/^sentry-/;function ux(e){const t=function(e){if(!e||!Vy(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=dx(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return dx(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(lx)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function px(e){if(!e)return;return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce((e,[t,n],i)=>{const s=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=0===i?s:`${e},${s}`;return o.length>8192?(hy&&yy.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${cx}${t}`]=n),e),{}))}function dx(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const mx=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function hx(e,t){const n=function(e){if(!e)return;const t=e.match(mx);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),i=ux(t);if(!n||!n.traceId)return{traceId:Lb(),spanId:Pb()};const{traceId:s,parentSpanId:o,parentSampled:a}=n;return{traceId:s,parentSpanId:o,spanId:Pb(),sampled:a,dsc:i||{}}}function fx(e=Lb(),t=Pb(),n){let i="";return void 0!==n&&(i=n?"-1":"-0"),`${e}-${t}${i}`}let gx=!1;function vx(e){const{spanId:t,traceId:n}=e.spanContext(),{data:i,op:s,parent_span_id:o,status:a,origin:r}=_x(e);return fb({parent_span_id:o,span_id:t,trace_id:n,data:i,op:s,status:a,origin:r})}function yx(e){const{spanId:t,traceId:n,isRemote:i}=e.spanContext();return fb({parent_span_id:i?t:_x(e).parent_span_id,span_id:i?Pb():t,trace_id:n})}function bx(e){return"number"==typeof e?xx(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?xx(e.getTime()):yb()}function xx(e){return e>9999999999?e/1e3:e}function _x(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:i,startTime:s,name:o,endTime:a,parentSpanId:r,status:c}=e;return fb({span_id:t,trace_id:n,data:i,description:o,parent_span_id:r,start_timestamp:bx(s),timestamp:bx(a)||void 0,status:kx(c),op:i[ex],origin:i[tx],_metrics_summary:Zb(e)})}return{span_id:t,trace_id:n}}catch(e){return{}}}function wx(e){const{traceFlags:t}=e.spanContext();return 1===t}function kx(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const Sx="_sentryChildSpans",Tx="_sentryRootSpan";function Ex(e,t){const n=e[Tx]||e;lb(t,Tx,n),e[Sx]?e[Sx].add(t):lb(e,Sx,new Set([t]))}function Cx(e){const t=new Set;return function e(n){if(!t.has(n)&&wx(n)){t.add(n);const i=n[Sx]?Array.from(n[Sx]):[];for(const t of i)e(t)}}(e),Array.from(t)}function Ix(e){return e[Tx]||e}function Ox(){const e=Vb(Fy());return e.getActiveSpan?e.getActiveSpan():Db(Kb())}function jx(){gx||(vy(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),gx=!0)}let Ax=!1;function Lx(){const e=Ox(),t=e&&Ix(e);if(t){const e="internal_error";uy&&yy.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}Lx.tag="sentry_tracingErrorCallback";const Px="_sentryScope",Rx="_sentryIsolationScope";function Mx(e){return{scope:e[Px],isolationScope:e[Rx]}}function Nx(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=Yb(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class Dx{constructor(e={}){this._traceId=e.traceId||Lb(),this._spanId=e.spanId||Pb()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}const Fx="production",Bx="_frozenDsc";function $x(e,t){lb(e,Bx,t)}function zx(e,t){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},s=fb({environment:n.environment||Fx,release:n.release,public_key:i,trace_id:e});return t.emit("createDsc",s),s}function qx(e,t){const n=t.getPropagationContext();return n.dsc||zx(n.traceId,e)}function Ux(e){const t=Yb();if(!t)return{};const n=Ix(e),i=n[Bx];if(i)return i;const s=n.spanContext().traceState,o=s&&s.get("sentry.dsc"),a=o&&ux(o);if(a)return a;const r=zx(e.spanContext().traceId,t),c=_x(n),l=c.data||{},u=l[Qb];null!=u&&(r.sample_rate=`${u}`);const p=l[Xb],d=c.description;return"url"!==p&&d&&(r.transaction=d),Nx()&&(r.sampled=String(wx(n))),t.emit("createDsc",r,n),r}function Hx(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;uy&&yy.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}const Vx=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Kx(e,t=!1){const{host:n,path:i,pass:s,port:o,projectId:a,protocol:r,publicKey:c}=e;return`${r}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${i?`${i}/`:i}${a}`}function Wx(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Gx(e){const t="string"==typeof e?function(e){const t=Vx.exec(e);if(!t)return void vy(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,i,s="",o="",a="",r=""]=t.slice(1);let c="",l=r;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return Wx({host:o,pass:s,path:c,projectId:l,port:a,protocol:n,publicKey:i})}(e):Wx(e);if(t&&function(e){if(!hy)return!0;const{port:t,projectId:n,protocol:i}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(yy.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(i)?t&&isNaN(parseInt(t,10))&&(yy.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(yy.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),1):(yy.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function Yx(e,t=100,n=1/0){try{return Zx("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Jx(e,t=3,n=102400){const i=Yx(e,t);return s=i,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(s))>n?Jx(e,t-1,n):i;var s}function Zx(e,t,n=1/0,i=1/0,s=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,a]=s;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const r=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(Xy(t))return"[VueViewModel]";if(Gy(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Ty(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const i=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!r.startsWith("[object "))return r;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return r.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return Zx("",l.toJSON(),c-1,i,s)}catch(e){}const u=Array.isArray(t)?[]:{};let p=0;const d=db(t);for(const e in d){if(!Object.prototype.hasOwnProperty.call(d,e))continue;if(p>=i){u[e]="[MaxProperties ~]";break}const t=d[e];u[e]=Zx(e,t,c-1,i,s),p++}return a(t),u}function Xx(e,t=[]){return[e,t]}function Qx(e,t){const[n,i]=e;return[n,[...i,t]]}function e_(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function t_(e){return dy.__SENTRY__&&dy.__SENTRY__.encodePolyfill?dy.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function n_(e){const[t,n]=e;let i=JSON.stringify(t);function s(e){"string"==typeof i?i="string"==typeof e?i+e:[t_(i),e]:i.push("string"==typeof e?t_(e):e)}for(const e of n){const[t,n]=e;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(Yx(n))}s(e)}}return"string"==typeof i?i:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let i=0;for(const t of e)n.set(t,i),i+=t.length;return n}(i)}function i_(e){return[{type:"span"},e]}function s_(e){const t="string"==typeof e.data?t_(e.data):e.data;return[fb({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const o_={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function a_(e){return o_[e]}function r_(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function c_(e,t,n,i){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&i&&{dsn:Kx(i)},...s&&{trace:fb({...s})}}}function l_(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},i=n[ix],s=n[sx];"string"==typeof i&&"number"==typeof s&&(t[e.name]={value:s,unit:i})}),t}class u_{constructor(e={}){this._traceId=e.traceId||Lb(),this._spanId=e.spanId||Pb(),this._startTime=e.startTimestamp||yb(),this._attributes={},this.setAttributes({[tx]:"manual",[ex]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=bx(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(Xb,"custom"),this}end(e){this._endTime||(this._endTime=bx(e),function(e){if(!uy)return;const{description:t="< unknown name >",op:n="< unknown op >"}=_x(e),{spanId:i}=e.spanContext(),s=`[Tracing] Finishing "${n}" ${Ix(e)===e?"root ":""}span "${t}" with ID ${i}`;yy.log(s)}(this),this._onSpanEnded())}getSpanJSON(){return fb({data:this._attributes,description:this._name,op:this._attributes[ex],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:kx(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[tx],_metrics_summary:Zb(this),profile_id:this._attributes["sentry.profile_id"],exclusive_time:this._attributes[ax],measurements:l_(this._events),is_segment:this._isStandaloneSpan&&Ix(this)===this||void 0,segment_id:this._isStandaloneSpan?Ix(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){uy&&yy.log("[Tracing] Adding an event to span:",e);const i=p_(t)?t:n||yb(),s=p_(t)?{}:t||{},o={name:e,time:bx(i),attributes:s};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=Yb();e&&e.emit("spanEnd",this);if(!(this._isStandaloneSpan||this===Ix(this)))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=Yb();if(!t)return;const n=e[1];if(!n||0===n.length)return void t.recordDroppedEvent("before_send","span");t.sendEnvelope(e)}(function(e,t){const n=Ux(e[0]),i=t&&t.getDsn(),s=t&&t.getOptions().tunnel,o={sent_at:(new Date).toISOString(),...function(e){return!!e.trace_id&&!!e.public_key}(n)&&{trace:n},...!!s&&i&&{dsn:Kx(i)}},a=t&&t.getOptions().beforeSendSpan,r=a?e=>{const t=a(_x(e));return t||jx(),t}:e=>_x(e),c=[];for(const t of e){const e=r(t);e&&c.push(i_(e))}return Xx(o,c)}([this],e)):(uy&&yy.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));const t=this._convertSpanToTransaction();if(t){(Mx(this).scope||Kb()).captureEvent(t)}}_convertSpanToTransaction(){if(!d_(_x(this)))return;this._name||(uy&&yy.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:t}=Mx(this),n=(e||Kb()).getClient()||Yb();if(!0!==this._sampled)return uy&&yy.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(n&&n.recordDroppedEvent("sample_rate","transaction"));const i=Cx(this).filter(e=>e!==this&&!function(e){return e instanceof u_&&e.isStandaloneSpan()}(e)).map(e=>_x(e)).filter(d_),s=this._attributes[Xb];delete this._attributes[ox],i.forEach(e=>{e.data&&delete e.data[ox]});const o={contexts:{trace:vx(this)},spans:i.length>1e3?i.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,...fb({dynamicSamplingContext:Ux(this)})},_metrics_summary:Zb(this),...s&&{transaction_info:{source:s}}},a=l_(this._events);return a&&Object.keys(a).length&&(uy&&yy.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),o.measurements=a),o}}function p_(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function d_(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}const m_="__SENTRY_SUPPRESS_TRACING__";function h_(e){const t=g_();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=function(e){const t=e.experimental||{},n={isStandalone:t.standalone,...e};if(e.startTime){const t={...n};return t.startTimestamp=bx(e.startTime),delete t.startTime,t}return n}(e),{forceTransaction:i,parentSpan:s}=e;return(e.scope?t=>Gb(e.scope,t):void 0!==s?e=>f_(s,e):e=>e())(()=>{const t=Kb(),s=function(e){const t=Db(e);if(!t)return;const n=Yb(),i=n?n.getOptions():{};if(i.parentSpanIsAlwaysRootSpan)return Ix(t);return t}(t);return e.onlyIfParent&&!s?new Dx:function({parentSpan:e,spanArguments:t,forceTransaction:n,scope:i}){if(!Nx())return new Dx;const s=Wb();let o;if(e&&!n)o=function(e,t,n){const{spanId:i,traceId:s}=e.spanContext(),o=!t.getScopeData().sdkProcessingMetadata[m_]&&wx(e),a=o?new u_({...n,parentSpanId:i,traceId:s,sampled:o}):new Dx({traceId:s});Ex(e,a);const r=Yb();r&&(r.emit("spanStart",a),n.endTimestamp&&r.emit("spanEnd",a));return a}(e,i,t),Ex(e,o);else if(e){const n=Ux(e),{traceId:s,spanId:a}=e.spanContext(),r=wx(e);o=v_({traceId:s,parentSpanId:a,...t},i,r),$x(o,n)}else{const{traceId:e,dsc:n,parentSpanId:a,sampled:r}={...s.getPropagationContext(),...i.getPropagationContext()};o=v_({traceId:e,parentSpanId:a,...t},i,r),n&&$x(o,n)}return function(e){if(!uy)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:i}=_x(e),{spanId:s}=e.spanContext(),o=wx(e),a=Ix(e),r=a===e,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${r?"root ":""}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(i&&l.push(`parent ID: ${i}`),!r){const{op:e,description:t}=_x(a);l.push(`root ID: ${a.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}yy.log(`${c}\n ${l.join("\n ")}`)}(o),function(e,t,n){e&&(lb(e,Rx,n),lb(e,Px,t))}(o,i,s),o}({parentSpan:s,spanArguments:n,forceTransaction:i,scope:t})})}function f_(e,t){const n=g_();return n.withActiveSpan?n.withActiveSpan(e,t):Gb(n=>(Nb(n,e||void 0),t(n)))}function g_(){return Vb(Fy())}function v_(e,t,n){const i=Yb(),s=i&&i.getOptions()||{},{name:o="",attributes:a}=e,[r,c]=t.getScopeData().sdkProcessingMetadata[m_]?[!1]:function(e,t){if(!Nx(e))return[!1];const n=Wb().getScopeData().sdkProcessingMetadata.normalizedRequest,i={...t,normalizedRequest:t.normalizedRequest||n};let s;s="function"==typeof e.tracesSampler?e.tracesSampler(i):void 0!==i.parentSampled?i.parentSampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1;const o=Hx(s);return void 0===o?(uy&&yy.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):o?Math.random()<o?[!0,o]:(uy&&yy.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[!1,o]):(uy&&yy.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,o])}(s,{name:o,parentSampled:n,attributes:a,transactionContext:{name:o,parentSampled:n}}),l=new u_({...e,attributes:{[Xb]:"custom",...e.attributes},sampled:r});return void 0!==c&&l.setAttribute(Qb,c),i&&i.emit("spanStart",l),l}const y_={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function b_(e,t={}){const n=new Map;let i,s=!1,o="externalFinish",a=!t.disableAutoFinish;const r=[],{idleTimeout:c=y_.idleTimeout,finalTimeout:l=y_.finalTimeout,childSpanTimeout:u=y_.childSpanTimeout,beforeSpanEnd:p}=t,d=Yb();if(!d||!Nx())return new Dx;const m=Kb(),h=Ox(),f=function(e){const t=h_(e);return Nb(Kb(),t),uy&&yy.log("[Tracing] Started span is an idle span"),t}(e);function g(){i&&(clearTimeout(i),i=void 0)}function v(e){g(),i=setTimeout(()=>{!s&&0===n.size&&a&&(o="idleTimeout",f.end(e))},c)}function y(e){i=setTimeout(()=>{!s&&a&&(o="heartbeatFailed",f.end(e))},u)}function b(e){s=!0,n.clear(),r.forEach(e=>e()),Nb(m,h);const t=_x(f),{start_timestamp:i}=t;if(!i)return;(t.data||{})[nx]||f.setAttribute(nx,o),yy.log(`[Tracing] Idle span "${t.op}" finished`);const a=Cx(f).filter(e=>e!==f);let u=0;a.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),uy&&yy.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));const n=_x(t),{timestamp:i=0,start_timestamp:s=0}=n,o=s<=e,a=i-s<=(l+c)/1e3;if(uy){const e=JSON.stringify(t,void 0,2);o?a||yy.log("[Tracing] Discarding span since it finished after idle span final timeout",e):yy.log("[Tracing] Discarding span since it happened after idle span was finished",e)}a&&o||(!function(e,t){e[Sx]&&e[Sx].delete(t)}(f,t),u++)}),u>0&&f.setAttribute("sentry.idle_span_discarded_spans",u)}return f.end=new Proxy(f.end,{apply(e,t,n){p&&p(f);const[i,...s]=n,o=bx(i||yb()),a=Cx(f).filter(e=>e!==f);if(!a.length)return b(o),Reflect.apply(e,t,[o,...s]);const r=a.map(e=>_x(e).timestamp).filter(e=>!!e),c=r.length?Math.max(...r):void 0,u=_x(f).start_timestamp,d=Math.min(u?u+l/1e3:1/0,Math.max(u||-1/0,Math.min(o,c||1/0)));return b(d),Reflect.apply(e,t,[d,...s])}}),r.push(d.on("spanStart",e=>{if(s||e===f||_x(e).timestamp)return;var t;Cx(f).includes(e)&&(t=e.spanContext().spanId,g(),n.set(t,!0),y(yb()+u/1e3))})),r.push(d.on("spanEnd",e=>{var t;s||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&v(yb()+c/1e3))})),r.push(d.on("idleSpanEnableAutoFinish",e=>{e===f&&(a=!0,v(),n.size&&y())})),t.disableAutoFinish||v(),setTimeout(()=>{s||(f.setStatus({code:2,message:"deadline_exceeded"}),o="finalTimeout",f.end())},l),f}function x_(e,t,n,i=0){return new Ob((s,o)=>{const a=e[i];if(null===t||"function"!=typeof a)s(t);else{const r=a({...t},n);uy&&a.id&&null===r&&yy.log(`Event processor "${a.id}" dropped event`),Jy(r)?r.then(t=>x_(e,t,n,i+1).then(s)).then(null,o):x_(e,r,n,i+1).then(s).then(null,o)}})}let __,w_,k_;function S_(e,t){const{fingerprint:n,span:i,breadcrumbs:s,sdkProcessingMetadata:o}=t;!function(e,t){const{extra:n,tags:i,user:s,contexts:o,level:a,transactionName:r}=t,c=fb(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=fb(i);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=fb(s);u&&Object.keys(u).length&&(e.user={...u,...e.user});const p=fb(o);p&&Object.keys(p).length&&(e.contexts={...p,...e.contexts});a&&(e.level=a);r&&"transaction"!==e.type&&(e.transaction=r)}(e,t),i&&function(e,t){e.contexts={trace:yx(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Ux(t),...e.sdkProcessingMetadata};const n=Ix(t),i=_x(n).description;i&&!e.transaction&&"transaction"===e.type&&(e.transaction=i)}(e,i),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,s),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}function T_(e,t){const{extra:n,tags:i,user:s,contexts:o,level:a,sdkProcessingMetadata:r,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:p,propagationContext:d,transactionName:m,span:h}=t;E_(e,"extra",n),E_(e,"tags",i),E_(e,"user",s),E_(e,"contexts",o),e.sdkProcessingMetadata=Rb(e.sdkProcessingMetadata,r,2),a&&(e.level=a),m&&(e.transactionName=m),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...d}}function E_(e,t,n){e[t]=Rb(e[t],n,1)}function C_(e,t,n,i,s,o){const{normalizeDepth:a=3,normalizeMaxBreadth:r=1e3}=e,c={...t,event_id:t.event_id||n.event_id||xb(),timestamp:t.timestamp||vb()},l=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:i,dist:s,maxValueLength:o=250}=t;e.environment=e.environment||n||Fx,!e.release&&i&&(e.release=i);!e.dist&&s&&(e.dist=s);e.message&&(e.message=sb(e.message,o));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=sb(a.value,o));const r=e.request;r&&r.url&&(r.url=sb(r.url,o))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),s&&s.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=dy._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return k_&&n.length===w_||(w_=n.length,k_=n.reduce((n,i)=>{__||(__={});const s=__[i];if(s)n[s[0]]=s[1];else{const s=e(i);for(let e=s.length-1;e>=0;e--){const o=s[e],a=o&&o.filename,r=t[i];if(a&&r){n[a]=r,__[i]=[a,r];break}}}return n},{})),k_}(t);try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{n&&e.filename&&(e.debug_id=n[e.filename])})})}catch(e){}}(c,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new Bb;return n.update(t),n}(i,n.captureContext);n.mechanism&&Sb(c,n.mechanism);const p=s?s.getEventProcessors():[],d=my("globalScope",()=>new Bb).getScopeData();if(o){T_(d,o.getScopeData())}if(u){T_(d,u.getScopeData())}const m=[...n.attachments||[],...d.attachments];m.length&&(n.attachments=m),S_(c,d);return x_([...p,...d.eventProcessors],c,n).then(e=>(e&&function(e){const t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof a&&a>0?function(e,t,n){if(!e)return null;const i={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Yx(e.data,t,n)}}))},...e.user&&{user:Yx(e.user,t,n)},...e.contexts&&{contexts:Yx(e.contexts,t,n)},...e.extra&&{extra:Yx(e.extra,t,n)}};e.contexts&&e.contexts.trace&&i.contexts&&(i.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(i.contexts.trace.data=Yx(e.contexts.trace.data,t,n)));e.spans&&(i.spans=e.spans.map(e=>({...e,...e.data&&{data:Yx(e.data,t,n)}})));e.contexts&&e.contexts.flags&&i.contexts&&(i.contexts.flags=Yx(e.contexts.flags,3,n));return i}(e,a,r):e))}function I_(e){if(e)return function(e){return e instanceof Bb||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>O_.includes(e))}(e)?{captureContext:e}:e}const O_=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function j_(e,t){return Kb().captureException(e,I_(t))}function A_(e,t){return Kb().captureEvent(e,t)}function L_(e,t){Wb().setContext(e,t)}function P_(e){const t=Yb(),n=Wb(),i=Kb(),{release:s,environment:o=Fx}=t&&t.getOptions()||{},{userAgent:a}=dy.navigator||{},r=jb({release:s,environment:o,user:i.getUser()||n.getUser(),...a&&{userAgent:a},...e}),c=n.getSession();return c&&"ok"===c.status&&Ab(c,{status:"exited"}),R_(),n.setSession(r),i.setSession(r),r}function R_(){const e=Wb(),t=Kb(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),Ab(e,n)}(n),M_(),e.setSession(),t.setSession()}function M_(){const e=Wb(),t=Kb(),n=Yb(),i=t.getSession()||e.getSession();i&&n&&n.captureSession(i)}function N_(e=!1){e?R_():M_()}function D_(e,t,n){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const F_=[];function B_(e){const t=e.defaultIntegrations||[],n=e.integrations;let i;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))i=[...t,...n];else if("function"==typeof n){const e=n(t);i=Array.isArray(e)?e:[e]}else i=t;const s=function(e){const t={};return e.forEach(e=>{const{name:n}=e,i=t[n];i&&!i.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(i),o=s.findIndex(e=>"Debug"===e.name);if(o>-1){const[e]=s.splice(o,1);s.push(e)}return s}function $_(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function z_(e,t,n){if(n[t.name])uy&&yy.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===F_.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),F_.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,i)=>n(t,i,e))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),i=Object.assign((t,i)=>n(t,i,e),{id:t.name});e.addEventProcessor(i)}uy&&yy.log(`Integration installed: ${t.name}`)}}class q_ extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}const U_="Not capturing exception because it's already been captured.";class H_{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Gx(e.dsn):uy&&yy.warn("No DSN provided, client will not send events."),this._dsn){const t=D_(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}const t=["enableTracing","tracesSampleRate","tracesSampler"].find(t=>t in e&&null==e[t]);t&&vy(()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(e,t,n){const i=xb();if(Tb(e))return uy&&yy.log(U_),i;const s={event_id:i,...t};return this._process(this.eventFromException(e,s).then(e=>this._captureEvent(e,s,n))),s.event_id}captureMessage(e,t,n,i){const s={event_id:xb(),...n},o=Ky(e)?e:String(e),a=Wy(e)?this.eventFromMessage(o,t,s):this.eventFromException(e,s);return this._process(a.then(e=>this._captureEvent(e,s,i))),s.event_id}captureEvent(e,t,n){const i=xb();if(t&&t.originalException&&Tb(t.originalException))return uy&&yy.log(U_),i;const s={event_id:i,...t},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,s,o||n)),s.event_id}captureSession(e){"string"!=typeof e.release?uy&&yy.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Ab(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):Cb(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.emit("close"),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];z_(this,e,this._integrations),t||$_(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,i){const s=r_(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const a=c_(e,s,i,t);return delete e.sdkProcessingMetadata,Xx(a,[[{type:o},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Qx(n,s_(e));const i=this.sendEnvelope(n);i&&i.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){const t=function(e,t,n,i){const s=r_(n);return Xx({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!i&&t&&{dsn:Kx(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const i="number"==typeof n?n:1,s=`${e}:${t}`;uy&&yy.log(`Recording outcome: "${s}"${i>1?` (${i} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+i}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,e=>(uy&&yy.error("Error while sending envelope:",e),e)):(uy&&yy.error("Transport disabled"),Cb({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&z_(e,t,n)}),n}(this,e),$_(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,i=!1;const s=t.exception&&t.exception.values;if(s){i=!0;for(const e of s){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(Ab(e,{...n&&{status:"crashed"},errors:e.errors||Number(i||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Ob(t=>{let n=0;const i=setInterval(()=>{0==this._numProcessing?(clearInterval(i),t(!0)):(n+=1,e&&n>=e&&(clearInterval(i),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n=Kb(),i=Wb()){const s=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||i.setLastEventId(e.event_id||t.event_id),C_(s,e,t,n,this,i).then(e=>{if(null===e)return e;e.contexts={trace:Jb(n),...e.contexts};const t=qx(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:t,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{uy&&(e instanceof q_&&"log"===e.logLevel?yy.log(e.message):yy.warn(e))})}_processEvent(e,t,n){const i=this.getOptions(),{sampleRate:s}=i,o=K_(e),a=V_(e),r=e.type||"error",c=`before send for type \`${r}\``,l=void 0===s?void 0:Hx(s);if(a&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),Ib(new q_(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const u="replay_event"===r?"replay":r,p=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,p).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new q_("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const s=function(e,t,n,i){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:a}=t;if(V_(n)&&s)return s(n,i);if(K_(n)){if(n.spans&&a){const t=[];for(const i of n.spans){const n=a(i);n?t.push(n):(jx(),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(o){if(n.spans){const e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(n,i)}}return n}(this,i,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Jy(e))return e.then(e=>{if(!Gy(e)&&null!==e)throw new q_(n);return e},e=>{throw new q_(`${t} rejected with ${e}`)});if(!Gy(e)&&null!==e)throw new q_(n);return e}(s,c)}).then(i=>{if(null===i){if(this.recordDroppedEvent("before_send",u,e),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new q_(`${c} returned \`null\`, will not send event.`,"log")}const s=n&&n.getSession();if(!o&&s&&this._updateSessionFromEvent(s,i),o){const e=(i.sdkProcessingMetadata&&i.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const a=i.transaction_info;if(o&&a&&i.transaction!==e.transaction){const e="custom";i.transaction_info={...a,source:e}}return this.sendEvent(i,t),i}).then(null,e=>{if(e instanceof q_)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new q_(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,i]=e.split(":");return{reason:n,category:i,quantity:t}})}_flushOutcomes(){uy&&yy.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(uy&&yy.log("No outcomes to send"));if(!this._dsn)return void(uy&&yy.log("No dsn provided, will not send outcomes"));uy&&yy.log("Sending outcomes:",e);const t=(n=e,Xx((i=this._options.tunnel&&Kx(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:s||vb(),discarded_events:n}]]));var n,i,s;this.sendEnvelope(t)}}function V_(e){return void 0===e.type}function K_(e){return"transaction"===e.type}function W_(e,t){!0===t.debug&&(uy?yy.enable():vy(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}));Kb().update(t.initialScope);const n=new e(t);return function(e){Kb().setClient(e)}(n),n.init(),n}function G_(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(i){if(!(void 0===e||t.length<e))return Ib(new q_("Not adding Promise because buffer limit was reached."));const s=i();return-1===t.indexOf(s)&&t.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s},drain:function(e){return new Ob((n,i)=>{let s=t.length;if(!s)return n(!0);const o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Cb(e).then(()=>{--s||(clearTimeout(o),n(!0))},i)})})}}}function Y_(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function J_(e,{statusCode:t,headers:n},i=Date.now()){const s={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),a=parseInt(t,10),r=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e&&o&&!o.split(";").includes("custom")||(s[e]=i+r);else s.all=i+r}else a?s.all=i+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const i=Date.parse(`${e}`);return isNaN(i)?6e4:i-t}(a,i):429===t&&(s.all=i+6e4);return s}function Z_(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function X_(e,t){const n=t&&t.getDsn(),i=t&&t.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(e,n)||function(e,t){if(!t)return!1;return Q_(e)===Q_(t)}(e,i)}function Q_(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function ew(e={}){const t=Yb();if(!function(){const e=Yb();return!!e&&!1!==e.getOptions().enabled&&!!e.getTransport()}()||!t)return{};const n=Vb(Fy());if(n.getTraceData)return n.getTraceData(e);const i=Kb(),s=e.span||Ox(),o=s?function(e){const{traceId:t,spanId:n}=e.spanContext();return fx(t,n,wx(e))}(s):function(e){const{traceId:t,sampled:n,spanId:i}=e.getPropagationContext();return fx(t,i,n)}(i),a=px(s?Ux(s):qx(t,i));return mx.test(o)?{"sentry-trace":o,baggage:a}:(yy.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}const tw=100;function nw(e,t){const n=Yb(),i=Wb();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=tw}=n.getOptions();if(o<=0)return;const a={timestamp:vb(),...e},r=s?vy(()=>s(a,t)):a;null!==r&&(n.emit&&n.emit("beforeAddBreadcrumb",r,t),i.addBreadcrumb(r,o))}let iw;const sw=new WeakMap,ow=()=>({name:"FunctionToString",setupOnce(){iw=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=pb(this),n=sw.has(Yb())&&void 0!==t?t:this;return iw.apply(n,e)}}catch(e){}},setup(e){sw.set(e,!0)}}),aw=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],rw=(e={})=>({name:"InboundFilters",processEvent(t,n,i){const s=i.getOptions(),o=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:aw],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,s);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return uy&&yy.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${wb(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(e){}n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`));return t}(e).some(e=>rb(e,t))}(e,t.ignoreErrors))return uy&&yy.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${wb(e)}`),!0;if(function(e){if(e.type)return!1;if(!e.exception||!e.exception.values||0===e.exception.values.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return uy&&yy.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${wb(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&rb(n,t)}(e,t.ignoreTransactions))return uy&&yy.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${wb(e)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=cw(e);return!!n&&rb(n,t)}(e,t.denyUrls))return uy&&yy.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${wb(e)}.\nUrl: ${cw(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=cw(e);return!n||rb(n,t)}(e,t.allowUrls))return uy&&yy.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${wb(e)}.\nUrl: ${cw(e)}`),!0;return!1}(t,o)?null:t}});function cw(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return uy&&yy.error(`Cannot extract url for event ${wb(e)}`),null}}function lw(e,t,n=250,i,s,o,a){if(!(o.exception&&o.exception.values&&a&&Zy(a.originalException,Error)))return;const r=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,l;r&&(o.exception.values=(c=uw(e,t,s,a.originalException,i,o.exception.values,r,0),l=n,c.map(e=>(e.value&&(e.value=sb(e.value,l)),e))))}function uw(e,t,n,i,s,o,a,r){if(o.length>=n+1)return o;let c=[...o];if(Zy(i[s],Error)){pw(a,r);const o=e(t,i[s]),l=c.length;dw(o,s,l,r),c=uw(e,t,n,i[s],s,[o,...c],o,l)}return Array.isArray(i.errors)&&i.errors.forEach((i,o)=>{if(Zy(i,Error)){pw(a,r);const l=e(t,i),u=c.length;dw(l,`errors[${o}]`,u,r),c=uw(e,t,n,i,s,[l,...c],l,u)}}),c}function pw(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function dw(e,t,n,i){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:i}}function mw(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",i=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:i,relative:t[5]+n+i}}function hw(){"console"in dy&&fy.forEach(function(e){e in dy.console&&cb(dy.console,e,function(t){return gy[e]=t,function(...t){Ay("console",{args:t,level:e});const n=gy[e];n&&n.apply(dy.console,t)}})})}function fw(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const gw=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,i=t.message;if(!n&&!i)return!1;if(n&&!i||!n&&i)return!1;if(n!==i)return!1;if(!yw(e,t))return!1;if(!vw(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=bw(t),i=bw(e);if(!n||!i)return!1;if(n.type!==i.type||n.value!==i.value)return!1;if(!yw(e,t))return!1;if(!vw(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return uy&&yy.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function vw(e,t){let n=Ey(e),i=Ey(t);if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;if(i.length!==n.length)return!1;for(let e=0;e<i.length;e++){const t=i[e],s=n[e];if(t.filename!==s.filename||t.lineno!==s.lineno||t.colno!==s.colno||t.function!==s.function)return!1}return!0}function yw(e,t){let n=e.fingerprint,i=t.fingerprint;if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;try{return!(n.join("")!==i.join(""))}catch(e){return!1}}function bw(e){return e.exception&&e.exception.values&&e.exception.values[0]}function xw(e,t,n,i,s="auto.http.browser"){if(!e.fetchData)return;const o=Nx()&&t(e.fetchData.url);if(e.endTimestamp&&o){const t=e.fetchData.__span;if(!t)return;const n=i[t];return void(n&&(!function(e,t){if(t.response){rx(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),delete i[t]))}const{method:a,url:r}=e.fetchData,c=function(e){try{return new URL(e).href}catch(e){return}}(r),l=c?mw(c).host:void 0,u=!!Ox(),p=o&&u?h_({name:`${a} ${r}`,attributes:{url:r,type:"fetch","http.method":a,"http.url":c,"server.address":l,[tx]:s,[ex]:"http.client"}}):new Dx;if(e.fetchData.__span=p.spanContext().spanId,i[p.spanContext().spanId]=p,n(e.fetchData.url)){const t=e.args[0],n=e.args[1]||{},i=function(e,t,n){const i=ew({span:n}),s=i["sentry-trace"],o=i.baggage;if(!s)return;const a=t.headers||(function(e){return"undefined"!=typeof Request&&Zy(e,Request)}(e)?e.headers:void 0);if(a){if(function(e){return"undefined"!=typeof Headers&&Zy(e,Headers)}(a)){const e=new Headers(a);if(e.set("sentry-trace",s),o){const t=e.get("baggage");if(t){const n=_w(t);e.set("baggage",n?`${n},${o}`:o)}else e.set("baggage",o)}return e}if(Array.isArray(a)){const e=[...a.filter(e=>!(Array.isArray(e)&&"sentry-trace"===e[0])).map(e=>{if(Array.isArray(e)&&"baggage"===e[0]&&"string"==typeof e[1]){const[t,n,...i]=e;return[t,_w(n),...i]}return e}),["sentry-trace",s]];return o&&e.push(["baggage",o]),e}{const e="baggage"in a?a.baggage:void 0;let t=[];return Array.isArray(e)?t=e.map(e=>"string"==typeof e?_w(e):e).filter(e=>""===e):e&&t.push(_w(e)),o&&t.push(o),{...a,"sentry-trace":s,baggage:t.length>0?t.join(","):void 0}}}return{...i}}(t,n,Nx()&&u?p:void 0);i&&(e.args[1]=n,n.headers=i)}return p}function _w(e){return e.split(",").filter(e=>!e.split("=")[0].startsWith(cx)).join(",")}function ww(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const kw=dy;function Sw(){if(!("fetch"in kw))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function Tw(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Ew(e,t){const n="fetch";Oy(n,e),jy(n,()=>Cw(void 0,t))}function Cw(e,t=!1){t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!Sw())return!1;if(Tw(kw.fetch))return!0;let e=!1;const t=kw.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Tw(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){hy&&yy.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}()||cb(dy,"fetch",function(t){return function(...n){const i=new Error,{method:s,url:o}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:jw(t),method:Ow(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:jw(t),method:Ow(t,"method")?String(t.method).toUpperCase():"GET"}}(n),a={args:n,fetchData:{method:s,url:o},startTimestamp:1e3*yb(),virtualError:i};return e||Ay("fetch",{...a}),t.apply(dy,n).then(async t=>(e?e(t):Ay("fetch",{...a,endTimestamp:1e3*yb(),response:t}),t),e=>{throw Ay("fetch",{...a,endTimestamp:1e3*yb(),error:e}),zy(e)&&void 0===e.stack&&(e.stack=i.stack,lb(e,"framesToPop",1)),e})}})}function Iw(e){let t;try{t=e.clone()}catch(e){return}!async function(e,t){if(e&&e.body){const n=e.body,i=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let o=!0;for(;o;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:s}=await i.read();clearTimeout(e),s&&(t(),o=!1)}catch(e){o=!1}finally{clearTimeout(e)}}clearTimeout(s),i.releaseLock(),n.cancel().then(null,()=>{})}}(t,()=>{Ay("fetch-body-resolved",{endTimestamp:1e3*yb(),response:e})})}function Ow(e,t){return!!e&&"object"==typeof e&&!!e[t]}function jw(e){return"string"==typeof e?e:e?Ow(e,"url")?e.url:e.toString?e.toString():"":""}function Aw(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function Lw(){return"undefined"!=typeof window&&(!Aw()||function(){const e=dy.process;return!!e&&"renderer"===e.type}())}const Pw=dy;function Rw(e){let t,n=e[0],i=1;for(;i<e.length;){const s=e[i],o=e[i+1];if(i+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}const Mw=dy;let Nw=0;function Dw(){return Nw>0}function Fw(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(pb(e))return e}catch(t){return e}const n=function(...n){try{const i=n.map(e=>Fw(e,t));return e.apply(this,i)}catch(e){throw Nw++,setTimeout(()=>{Nw--}),Gb(i=>{i.addEventProcessor(e=>(t.mechanism&&(kb(e,void 0,void 0),Sb(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),j_(e)}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch(e){}ub(n,e),lb(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch(e){}return n}const Bw="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function $w(e,t){const n=Uw(e,t),i={type:Kw(t),value:Ww(t)};return n.length&&(i.stacktrace={frames:n}),void 0===i.type&&""===i.value&&(i.value="Unrecoverable error caught"),i}function zw(e,t,n,i){const s=Yb(),o=s&&s.getOptions().normalizeDepth,a=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}return}(t),r={__serialized__:Jx(t,o)};if(a)return{exception:{values:[$w(e,a)]},extra:r};const c={exception:{values:[{type:Yy(t)?t.constructor.name:i?"UnhandledRejection":"Error",value:Jw(t,{isUnhandledRejection:i})}]},extra:r};if(n){const t=Uw(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function qw(e,t){return{exception:{values:[$w(e,t)]}}}function Uw(e,t){const n=t.stacktrace||t.stack||"",i=function(e){if(e&&Hw.test(e.message))return 1;return 0}(t),s=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,i,s)}catch(e){}return[]}const Hw=/Minified React error #\d+;/i;function Vw(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function Kw(e){const t=e&&e.name;if(!t&&Vw(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function Ww(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:Vw(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function Gw(e,t,n,i,s){let o;if(Uy(t)&&t.error){return qw(e,t.error)}if(Hy(t)||qy(t,"DOMException")){const s=t;if("stack"in t)o=qw(e,t);else{const t=s.name||(Hy(s)?"DOMError":"DOMException"),a=s.message?`${t}: ${s.message}`:t;o=Yw(e,a,n,i),kb(o,a)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}if(zy(t))return qw(e,t);if(Gy(t)||Yy(t)){return o=zw(e,t,n,s),Sb(o,{synthetic:!0}),o}return o=Yw(e,t,n,i),kb(o,`${t}`,void 0),Sb(o,{synthetic:!0}),o}function Yw(e,t,n,i){const s={};if(i&&n){const i=Uw(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),Sb(s,{synthetic:!0})}if(Ky(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return s.logentry={message:e,params:n},s}return s.message=t,s}function Jw(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(db(e));n.sort();const i=n[0];if(!i)return"[object has no keys]";if(i.length>=t)return sb(i,t);for(let e=n.length;e>0;e--){const i=n.slice(0,e).join(", ");if(!(i.length>t))return e===n.length?i:sb(i,t)}return""}(e),i=t?"promise rejection":"exception";if(Uy(e))return`Event \`ErrorEvent\` captured as ${i} with message \`${e.message}\``;if(Yy(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${i}`}return`Object captured as ${i} with keys: ${n}`}class Zw extends H_{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};!function(e,t,n=[t],i="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${i}:@sentry/${e}`,version:py})),version:py}),e._metadata=s}(t,"browser",["browser"],Mw.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&Mw.document&&Mw.document.addEventListener("visibilitychange",()=>{"hidden"===Mw.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,i){const s=Gw(e,t,n&&n.syntheticException||void 0,i);return Sb(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),Cb(s)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",i,s){const o=Yw(e,t,i&&i.syntheticException||void 0,s);return o.level=n,i&&i.event_id&&(o.event_id=i.event_id),Cb(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Bw&&yy.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:i}){const s={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!i&&{dsn:Kx(i)}},o=function(e){return[{type:"user_report"},e]}(e);return Xx(s,[o])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}const Xw="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Qw=(e,t,n,i)=>{let s,o;return a=>{t.value>=0&&(a||i)&&(o=t.value-(s||0),(o||void 0===s)&&(s=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},ek=dy,tk=(e=!0)=>{const t=ek.performance&&ek.performance.getEntriesByType&&ek.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},nk=()=>{const e=tk();return e&&e.activationStart||0},ik=(e,t)=>{const n=tk();let i="navigate";n&&(ek.document&&ek.document.prerendering||nk()>0?i="prerender":ek.document&&ek.document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-")));return{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},sk=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return i.observe(Object.assign({type:e,buffered:!0},n||{})),i}}catch(e){}},ok=e=>{const t=t=>{("pagehide"===t.type||ek.document&&"hidden"===ek.document.visibilityState)&&e(t)};ek.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},ak=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let rk=-1;const ck=e=>{"hidden"===ek.document.visibilityState&&rk>-1&&(rk="visibilitychange"===e.type?e.timeStamp:0,lk())},lk=()=>{removeEventListener("visibilitychange",ck,!0),removeEventListener("prerenderingchange",ck,!0)},uk=()=>(ek.document&&rk<0&&(rk="hidden"!==ek.document.visibilityState||ek.document.prerendering?1/0:0,addEventListener("visibilitychange",ck,!0),addEventListener("prerenderingchange",ck,!0)),{get firstHiddenTime(){return rk}}),pk=e=>{ek.document&&ek.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},dk=[1800,3e3],mk=[.1,.25],hk=(e,t={})=>{((e,t={})=>{pk(()=>{const n=uk(),i=ik("FCP");let s;const o=sk("paint",e=>{e.forEach(e=>{"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-nk(),0),i.entries.push(e),s(!0)))})});o&&(s=Qw(e,i,dk,t.reportAllChanges))})})(ak(()=>{const n=ik("CLS",0);let i,s=0,o=[];const a=e=>{e.forEach(e=>{if(!e.hadRecentInput){const t=o[0],n=o[o.length-1];s&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,o.push(e)):(s=e.value,o=[e])}}),s>n.value&&(n.value=s,n.entries=o,i())},r=sk("layout-shift",a);r&&(i=Qw(e,n,mk,t.reportAllChanges),ok(()=>{a(r.takeRecords()),i(!0)}),setTimeout(i,0))}))},fk=[100,300];let gk=0,vk=1/0,yk=0;const bk=e=>{e.forEach(e=>{e.interactionId&&(vk=Math.min(vk,e.interactionId),yk=Math.max(yk,e.interactionId),gk=yk?(yk-vk)/7+1:0)})};let xk;const _k=()=>{"interactionCount"in performance||xk||(xk=sk("event",bk,{type:"event",buffered:!0,durationThreshold:0}))},wk=[],kk=new Map;const Sk=()=>(xk?gk:performance.interactionCount||0)-0,Tk=[],Ek=e=>{if(Tk.forEach(t=>t(e)),!e.interactionId&&"first-input"!==e.entryType)return;const t=wk[wk.length-1],n=kk.get(e.interactionId);if(n||wk.length<10||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(e);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};kk.set(t.id,t),wk.push(t)}wk.sort((e,t)=>t.latency-e.latency),wk.length>10&&wk.splice(10).forEach(e=>kk.delete(e.id))}},Ck=e=>{const t=ek.requestIdleCallback||ek.setTimeout;let n=-1;return e=ak(e),ek.document&&"hidden"===ek.document.visibilityState?e():(n=t(e),ok(e)),n},Ik=[200,500],Ok=(e,t={})=>{"PerformanceEventTiming"in ek&&"interactionId"in PerformanceEventTiming.prototype&&pk(()=>{_k();const n=ik("INP");let i;const s=e=>{Ck(()=>{e.forEach(Ek);const t=(()=>{const e=Math.min(wk.length-1,Math.floor(Sk()/50));return wk[e]})();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,i())})},o=sk("event",s,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});i=Qw(e,n,Ik,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),ok(()=>{s(o.takeRecords()),i(!0)}))})},jk=[2500,4e3],Ak={},Lk=[800,1800],Pk=e=>{ek.document&&ek.document.prerendering?pk(()=>Pk(e)):ek.document&&"complete"!==ek.document.readyState?addEventListener("load",()=>Pk(e),!0):setTimeout(e,0)},Rk={},Mk={};let Nk,Dk,Fk,Bk,$k;function zk(e,t=!1){return Xk("cls",e,Wk,Nk,t)}function qk(e,t=!1){return Xk("lcp",e,Yk,Fk,t)}function Uk(e){return Xk("fid",e,Gk,Dk)}function Hk(e){return Xk("inp",e,Zk,$k)}function Vk(e,t){return Qk(e,t),Mk[e]||(!function(e){const t={};"event"===e&&(t.durationThreshold=0);sk(e,t=>{Kk(e,{entries:t})},t)}(e),Mk[e]=!0),eS(e,t)}function Kk(e,t){const n=Rk[e];if(n&&n.length)for(const i of n)try{i(t)}catch(t){Xw&&yy.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ty(i)}\nError:`,t)}}function Wk(){return hk(e=>{Kk("cls",{metric:e}),Nk=e},{reportAllChanges:!0})}function Gk(){return((e,t={})=>{pk(()=>{const n=uk(),i=ik("FID");let s;const o=e=>{e.startTime<n.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),s(!0))},a=e=>{e.forEach(o)},r=sk("first-input",a);s=Qw(e,i,fk,t.reportAllChanges),r&&ok(ak(()=>{a(r.takeRecords()),r.disconnect()}))})})(e=>{Kk("fid",{metric:e}),Dk=e})}function Yk(){return((e,t={})=>{pk(()=>{const n=uk(),i=ik("LCP");let s;const o=e=>{t.reportAllChanges||(e=e.slice(-1)),e.forEach(e=>{e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-nk(),0),i.entries=[e],s())})},a=sk("largest-contentful-paint",o);if(a){s=Qw(e,i,jk,t.reportAllChanges);const n=ak(()=>{Ak[i.id]||(o(a.takeRecords()),a.disconnect(),Ak[i.id]=!0,s(!0))});["keydown","click"].forEach(e=>{ek.document&&addEventListener(e,()=>Ck(n),{once:!0,capture:!0})}),ok(n)}})})(e=>{Kk("lcp",{metric:e}),Fk=e},{reportAllChanges:!0})}function Jk(){return((e,t={})=>{const n=ik("TTFB"),i=Qw(e,n,Lk,t.reportAllChanges);Pk(()=>{const e=tk();e&&(n.value=Math.max(e.responseStart-nk(),0),n.entries=[e],i(!0))})})(e=>{Kk("ttfb",{metric:e}),Bk=e})}function Zk(){return Ok(e=>{Kk("inp",{metric:e}),$k=e})}function Xk(e,t,n,i,s=!1){let o;return Qk(e,t),Mk[e]||(o=n(),Mk[e]=!0),i&&t({metric:i}),eS(e,t,s?o:void 0)}function Qk(e,t){Rk[e]=Rk[e]||[],Rk[e].push(t)}function eS(e,t,n){return()=>{n&&n();const i=Rk[e];if(!i)return;const s=i.indexOf(t);-1!==s&&i.splice(s,1)}}function tS(e){return"number"==typeof e&&isFinite(e)}function nS(e,t,n,{...i}){const s=_x(e).start_timestamp;return s&&s>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),f_(e,()=>{const e=h_({startTime:t,...i});return e&&e.end(n),e})}function iS(e){const t=Yb();if(!t)return;const{name:n,transaction:i,attributes:s,startTime:o}=e,{release:a,environment:r}=t.getOptions(),c=t.getIntegrationByName("Replay"),l=c&&c.getReplayId(),u=Kb(),p=u.getUser(),d=void 0!==p?p.email||p.id||p.ip_address:void 0;let m;try{m=u.getScopeData().contexts.profile.profile_id}catch(e){}return h_({name:n,attributes:{release:a,environment:r,user:d||void 0,profile_id:m||void 0,replay_id:l||void 0,transaction:i,"user_agent.original":ek.navigator&&ek.navigator.userAgent,...s},startTime:o,experimental:{standalone:!0}})}function sS(){return ek&&ek.addEventListener&&ek.performance}function oS(e){return e/1e3}function aS(e){let t="unknown",n="unknown",i="";for(const s of e){if("/"===s){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t="h"===i?"http":i,n=e.split(i)[1];break}i+=s}return i===e&&(t=i),{name:t,version:n}}function rS(){let e,t,n=0;if(!function(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch(e){return!1}}())return;let i=!1;function s(){i||(i=!0,t&&function(e,t,n){Xw&&yy.log(`Sending CLS span (${e})`);const i=oS((bb||0)+(t&&t.startTime||0)),s=Kb().getScopeData().transactionName,o=t?eb(t.sources[0]&&t.sources[0].node):"Layout shift",a=fb({[tx]:"auto.http.browser.cls",[ex]:"ui.webvital.cls",[ax]:t&&t.duration||0,"sentry.pageload.span_id":n}),r=iS({name:o,transaction:s,attributes:a,startTime:i});r&&(r.addEvent("cls",{[ix]:"",[sx]:e}),r.end(i))}(n,e,t),o())}const o=zk(({metric:t})=>{const i=t.entries[t.entries.length-1];i&&(n=t.value,e=i)},!0);ok(()=>{s()}),setTimeout(()=>{const e=Yb();if(!e)return;const n=e.on("startNavigationSpan",()=>{s(),n&&n()}),i=Ox(),o=i&&Ix(i),a=o&&_x(o);a&&"pageload"===a.op&&(t=o.spanContext().spanId)},0)}let cS,lS,uS=0,pS={};function dS({recordClsStandaloneSpans:e}){const t=sS();if(t&&bb){t.mark&&ek.performance.mark("sentry-tracing-init");const n=Uk(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=oS(bb),i=oS(t.startTime);pS.fid={value:e.value,unit:"millisecond"},pS["mark.fid"]={value:n+i,unit:"second"}}),i=qk(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(pS.lcp={value:e.value,unit:"millisecond"},cS=t)},!0),s=Xk("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(pS.ttfb={value:e.value,unit:"millisecond"})},Jk,Bk),o=e?rS():zk(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(pS.cls={value:e.value,unit:""},lS=t)},!0);return()=>{n(),i(),s(),o&&o()}}return()=>{}}function mS(e,t){const n=sS();if(!n||!n.getEntries||!bb)return;const i=oS(bb),s=n.getEntries(),{op:o,start_timestamp:a}=_x(e);if(s.slice(uS).forEach(t=>{const n=oS(t.startTime),s=oS(Math.max(0,t.duration));if(!("navigation"===o&&a&&i+n<a))switch(t.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(i=>{hS(e,t,i,n)}),hS(e,t,"secureConnection",n,"TLS/SSL"),hS(e,t,"fetch",n,"cache"),hS(e,t,"domainLookup",n,"DNS"),function(e,t,n){const i=n+oS(t.requestStart),s=n+oS(t.responseEnd),o=n+oS(t.responseStart);t.responseEnd&&(nS(e,i,s,{op:"browser.request",name:t.name,attributes:{[tx]:"auto.ui.browser.metrics"}}),nS(e,o,s,{op:"browser.response",name:t.name,attributes:{[tx]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,t,i);break;case"mark":case"paint":case"measure":{!function(e,t,n,i,s){const o=tk(!1),a=oS(o?o.requestStart:0),r=s+Math.max(n,a),c=s+n,l=c+i,u={[tx]:"auto.resource.browser.metrics"};r!==c&&(u["sentry.browser.measure_happened_before_request"]=!0,u["sentry.browser.measure_start_time"]=r);nS(e,r,l,{name:t.name,op:t.entryType,attributes:u})}(e,t,n,s,i);const o=uk(),a=t.startTime<o.firstHiddenTime;"first-paint"===t.name&&a&&(pS.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&a&&(pS.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":!function(e,t,n,i,s,o){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const a=mw(n),r={[tx]:"auto.resource.browser.metrics"};fS(r,t,"transferSize","http.response_transfer_size"),fS(r,t,"encodedBodySize","http.response_content_length"),fS(r,t,"decodedBodySize","http.decoded_response_content_length");const c=t.deliveryType;null!=c&&(r["http.response_delivery_type"]=c);const l=t.renderBlockingStatus;l&&(r["resource.render_blocking_status"]=l);a.protocol&&(r["url.scheme"]=a.protocol.split(":").pop());a.host&&(r["server.address"]=a.host);r["url.same_origin"]=n.includes(ek.location.origin);const{name:u,version:p}=aS(t.nextHopProtocol);r["network.protocol.name"]=u,r["network.protocol.version"]=p;const d=o+i,m=d+s;nS(e,d,m,{name:n.replace(ek.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:r})}(e,t,t.name,n,s,i)}}),uS=Math.max(s.length-1,0),function(e){const t=ek.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),tS(n.rtt)&&(pS["connection.rtt"]={value:n.rtt,unit:"millisecond"}));tS(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`);tS(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===o){!function(e){const t=tk(!1);if(!t)return;const{responseStart:n,requestStart:i}=t;i<=n&&(e["ttfb.requestTime"]={value:n-i,unit:"millisecond"})}(pS);const n=pS["mark.fid"];n&&pS.fid&&(nS(e,n.value,n.value+oS(pS.fid.value),{name:"first input delay",op:"ui.action",attributes:{[tx]:"auto.ui.browser.metrics"}}),delete pS["mark.fid"]),"fcp"in pS&&t.recordClsOnPageloadSpan||delete pS.cls,Object.entries(pS).forEach(([e,t])=>{!function(e,t,n,i=Ox()){const s=i&&Ix(i);s&&(uy&&yy.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[sx]:t,[ix]:n}))}(e,t.value,t.unit)}),e.setAttribute("performance.timeOrigin",i),e.setAttribute("performance.activationStart",nk()),function(e){cS&&(cS.element&&e.setAttribute("lcp.element",eb(cS.element)),cS.id&&e.setAttribute("lcp.id",cS.id),cS.url&&e.setAttribute("lcp.url",cS.url.trim().slice(0,200)),null!=cS.loadTime&&e.setAttribute("lcp.loadTime",cS.loadTime),null!=cS.renderTime&&e.setAttribute("lcp.renderTime",cS.renderTime),e.setAttribute("lcp.size",cS.size));lS&&lS.sources&&lS.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,eb(t.node)))}(e)}cS=void 0,lS=void 0,pS={}}function hS(e,t,n,i,s=n){const o=function(e){if("secureConnection"===e)return"connectEnd";if("fetch"===e)return"domainLookupStart";return`${e}End`}(n),a=t[o],r=t[`${n}Start`];r&&a&&nS(e,i+oS(r),i+oS(a),{op:`browser.${s}`,name:t.name,attributes:{[tx]:"auto.ui.browser.metrics"}})}function fS(e,t,n,i){const s=t[n];null!=s&&s<2147483647&&(e[i]=s)}let gS,vS,yS,bS;function xS(e){Oy("dom",e),jy("dom",_S)}function _S(){if(!ek.document)return;const e=Ay.bind(null,"dom"),t=wS(e,!0);ek.document.addEventListener("click",t,!1),ek.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=ek[t],i=n&&n.prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(cb(i,"addEventListener",function(t){return function(n,i,s){if("click"===n||"keypress"==n)try{const i=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=i[n]=i[n]||{refCount:0};if(!o.handler){const i=wS(e);o.handler=i,t.call(this,n,i,s)}o.refCount++}catch(e){}return t.call(this,n,i,s)}}),cb(i,"removeEventListener",function(e){return function(t,n,i){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},s=n[t];s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,i),s.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,i)}}))})}function wS(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const i=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,i))return;lb(n,"_sentryCaptured",!0),i&&!i._sentryId&&lb(i,"_sentryId",xb());const s="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==vS)return!1;try{if(!e.target||e.target._sentryId!==yS)return!1}catch(e){}return!0}(n)){e({event:n,name:s,global:t}),vS=n.type,yS=i?i._sentryId:void 0}clearTimeout(gS),gS=ek.setTimeout(()=>{yS=void 0,vS=void 0},1e3)}}function kS(e){const t="history";Oy(t,e),jy(t,SS)}function SS(){if(!function(){const e=Pw.chrome,t=e&&e.app&&e.app.runtime,n="history"in Pw&&!!Pw.history.pushState&&!!Pw.history.replaceState;return!t&&n}())return;const e=ek.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=bS,t=String(n);bS=t;Ay("history",{from:e,to:t})}return e.apply(this,t)}}ek.onpopstate=function(...t){const n=ek.location.href,i=bS;bS=n;if(Ay("history",{from:i,to:n}),e)try{return e.apply(this,t)}catch(e){}},cb(ek.history,"pushState",t),cb(ek.history,"replaceState",t)}const TS={};function ES(e){const t=TS[e];if(t)return t;let n=ek[e];if(Tw(n))return TS[e]=n.bind(ek);const i=ek.document;if(i&&"function"==typeof i.createElement)try{const t=i.createElement("iframe");t.hidden=!0,i.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(n=s[e]),i.head.removeChild(t)}catch(t){Xw&&yy.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?TS[e]=n.bind(ek):n}function CS(e){TS[e]=void 0}function IS(...e){return ES("setTimeout")(...e)}const OS="__sentry_xhr_v3__";function jS(e){Oy("xhr",e),jy("xhr",AS)}function AS(){if(!ek.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const i=new Error,s=1e3*yb(),o=Vy(n[0])?n[0].toUpperCase():void 0,a=function(e){if(Vy(e))return e;try{return e.toString()}catch(e){}return}(n[1]);if(!o||!a)return e.apply(t,n);t[OS]={method:o,url:a,request_headers:{}},"POST"===o&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const r=()=>{const e=t[OS];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}Ay("xhr",{endTimestamp:1e3*yb(),startTimestamp:s,xhr:t,virtualError:i})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(r(),e.apply(t,n))}):t.addEventListener("readystatechange",r),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[i,s]=n,o=t[OS];return o&&Vy(i)&&Vy(s)&&(o.request_headers[i.toLowerCase()]=s),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const i=t[OS];if(!i)return e.apply(t,n);void 0!==n[0]&&(i.body=n[0]);return Ay("xhr",{startTimestamp:1e3*yb(),xhr:t}),e.apply(t,n)}})}const LS=[],PS=new Map;function RS(){if(sS()&&bb){const e=Hk(({metric:e})=>{if(null==e.value)return;const t=e.entries.find(t=>t.duration===e.value&&MS[t.name]);if(!t)return;const{interactionId:n}=t,i=MS[t.name],s=oS(bb+t.startTime),o=oS(e.value),a=Ox(),r=a?Ix(a):void 0,c=(null!=n?PS.get(n):void 0)||r,l=c?_x(c).description:Kb().getScopeData().transactionName,u=iS({name:eb(t.target),transaction:l,attributes:fb({[tx]:"auto.http.browser.inp",[ex]:`ui.interaction.${i}`,[ax]:t.duration}),startTime:s});u&&(u.addEvent("inp",{[ix]:"millisecond",[sx]:e.value}),u.end(s+o))});return()=>{e()}}return()=>{}}const MS={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function NS(e,t=ES("fetch")){let n=0,i=0;return function(e,t,n=G_(e.bufferSize||64)){let i={};return{send:function(s){const o=[];if(e_(s,(t,n)=>{const s=a_(n);if(Y_(i,s)){const i=Z_(t,n);e.recordDroppedEvent("ratelimit_backoff",s,i)}else o.push(t)}),0===o.length)return Cb({});const a=Xx(s[0],o),r=t=>{e_(a,(n,i)=>{const s=Z_(n,i);e.recordDroppedEvent(t,a_(i),s)})};return n.add(()=>t({body:n_(a)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&uy&&yy.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),i=J_(i,e),e),e=>{throw r("network_error"),e})).then(e=>e,e=>{if(e instanceof q_)return uy&&yy.error("Skipped sending event because buffer is full."),r("queue_overflow"),Cb({});throw e})},flush:e=>n.drain(e)}}(e,function(s){const o=s.body.length;n+=o,i++;const a={body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&i<15,...e.fetchOptions};if(!t)return CS("fetch"),Ib("No fetch implementation available");try{return t(e.url,a).then(e=>(n-=o,i--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(e){return CS("fetch"),n-=o,i--,Ib(e)}})}function DS(e,t,n,i){const s={filename:e,function:"<anonymous>"===t?by:t,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==i&&(s.colno=i),s}const FS=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,BS=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,$S=/\((\S*)(?::(\d+))(?::(\d+))\)/,zS=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,qS=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,US=wy(...[[30,e=>{const t=FS.exec(e);if(t){const[,e,n,i]=t;return DS(e,by,+n,+i)}const n=BS.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=$S.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=HS(n[1]||by,n[2]);return DS(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=zS.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=qS.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||by;return[n,e]=HS(n,e),DS(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),HS=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),i=-1!==e.indexOf("safari-web-extension");return n||i?[-1!==e.indexOf("@")?e.split("@")[0]:by,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},VS=1024,KS=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){t.console&&function(e){const t="console";Oy(t,e),jy(t,hw)}(function(e){return function(t){if(Yb()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:fw(t.level),message:ob(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${ob(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}nw(n,{input:t.args,level:t.level})}}(e)),t.dom&&xS(function(e,t){return function(n){if(Yb()!==e)return;let i,s,o="object"==typeof t?t.serializeAttribute:void 0,a="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;a&&a>VS&&(Bw&&yy.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=VS),"string"==typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;i=eb(t,{keyAttrs:o,maxStringLength:a}),s=ib(t)}catch(e){i="<unknown>"}if(0===i.length)return;const r={category:`ui.${n.name}`,message:i};s&&(r.data={"ui.component_name":s}),nw(r,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&jS(function(e){return function(t){if(Yb()!==e)return;const{startTimestamp:n,endTimestamp:i}=t,s=t.xhr[OS];if(!n||!i||!s)return;const{method:o,url:a,status_code:r,body:c}=s,l={method:o,url:a,status_code:r},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:i};nw({category:"xhr",data:l,type:"http",level:ww(r)},u)}}(e)),t.fetch&&Ew(function(e){return function(t){if(Yb()!==e)return;const{startTimestamp:n,endTimestamp:i}=t;if(i&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){nw({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:i})}else{const e=t.response,s={...t.fetchData,status_code:e&&e.status},o={input:t.args,response:e,startTimestamp:n,endTimestamp:i};nw({category:"fetch",data:s,type:"http",level:ww(s.status_code)},o)}}}(e)),t.history&&kS(function(e){return function(t){if(Yb()!==e)return;let n=t.from,i=t.to;const s=mw(Mw.location.href);let o=n?mw(n):void 0;const a=mw(i);o&&o.path||(o=s),s.protocol===a.protocol&&s.host===a.host&&(i=a.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),nw({category:"navigation",data:{from:n,to:i}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Yb()===e&&nw({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:wb(t)},{event:t})}}(e))}}};const WS=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],GS=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&cb(Mw,"setTimeout",YS),t.setInterval&&cb(Mw,"setInterval",YS),t.requestAnimationFrame&&cb(Mw,"requestAnimationFrame",JS),t.XMLHttpRequest&&"XMLHttpRequest"in Mw&&cb(XMLHttpRequest.prototype,"send",ZS);const e=t.eventTarget;if(e){(Array.isArray(e)?e:WS).forEach(XS)}}}};function YS(e){return function(...t){const n=t[0];return t[0]=Fw(n,{mechanism:{data:{function:Ty(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function JS(e){return function(t){return e.apply(this,[Fw(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ty(e)},handled:!1,type:"instrument"}})])}}function ZS(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&cb(n,e,function(t){const n={mechanism:{data:{function:e,handler:Ty(t)},handled:!1,type:"instrument"}},i=pb(t);return i&&(n.mechanism.data.handler=Ty(i)),Fw(t,n)})}),e.apply(this,t)}}function XS(e){const t=Mw[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(cb(n,"addEventListener",function(t){return function(n,i,s){try{"function"==typeof i.handleEvent&&(i.handleEvent=Fw(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ty(i),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,Fw(i,{mechanism:{data:{function:"addEventListener",handler:Ty(i),target:e},handled:!1,type:"instrument"}}),s])}}),cb(n,"removeEventListener",function(e){return function(t,n,i){try{const s=n.__sentry_wrapped__;s&&e.call(this,t,s,i)}catch(e){}return e.call(this,t,n,i)}}))}const QS=()=>({name:"BrowserSession",setupOnce(){void 0!==Mw.document?(P_({ignoreDuration:!0}),N_(),kS(({from:e,to:t})=>{void 0!==e&&e!==t&&(P_({ignoreDuration:!0}),N_())})):Bw&&yy.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),eT=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){Py(t=>{const{stackParser:n,attachStacktrace:i}=nT();if(Yb()!==e||Dw())return;const{msg:s,url:o,line:a,column:r,error:c}=t,l=function(e,t,n,i){const s=e.exception=e.exception||{},o=s.values=s.values||[],a=o[0]=o[0]||{},r=a.stacktrace=a.stacktrace||{},c=r.frames=r.frames||[],l=i,u=n,p=Vy(t)&&t.length>0?t:nb();0===c.length&&c.push({colno:l,filename:p,function:by,in_app:!0,lineno:u});return e}(Gw(n,c||s,void 0,i,!1),o,a,r);l.level="error",A_(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}(e),tT("onerror")),t.onunhandledrejection&&(!function(e){Ny(t=>{const{stackParser:n,attachStacktrace:i}=nT();if(Yb()!==e||Dw())return;const s=function(e){if(Wy(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}(t),o=Wy(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:Gw(n,s,void 0,i,!0);o.level="error",A_(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(e),tT("onunhandledrejection"))}}};function tT(e){Bw&&yy.log(`Global Handler attached: ${e}`)}function nT(){const e=Yb();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const iT=()=>({name:"HttpContext",preprocessEvent(e){if(!Mw.navigator&&!Mw.location&&!Mw.document)return;const t=e.request&&e.request.url||Mw.location&&Mw.location.href,{referrer:n}=Mw.document||{},{userAgent:i}=Mw.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...i&&{"User-Agent":i}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),sT=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,i,s){const o=s.getOptions();lw($w,o.stackParser,o.maxValueLength,n,t,e,i)}}};function oT(e){const t=[rw(),ow(),GS(),KS(),eT(),sT(),gw(),iT()];return!1!==e.autoSessionTracking&&t.push(QS()),t}function aT(e={}){const t=function(e={}){const t={defaultIntegrations:oT(e),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Mw.SENTRY_RELEASE&&Mw.SENTRY_RELEASE.id?Mw.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}(e);if(!t.skipBrowserExtensionCheck&&function(){const e=void 0!==Mw.window&&Mw;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],n=t&&t.runtime&&t.runtime.id,i=Mw.location&&Mw.location.href||"",s=!!n&&Mw===Mw.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some(e=>i.startsWith(`${e}//`)),o=void 0!==e.nw;return!!n&&!s&&!o}())return void vy(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});Bw&&(Sw()||yy.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:(i=t.stackParser||US,Array.isArray(i)?wy(...i):i),integrations:B_(t),transport:t.transport||NS};var i;return W_(Zw,n)}const rT=dy,cT="sentryReplaySession",lT="Unable to send Replay",uT=15e4,pT=5e3,dT=2e7,mT=36e5;function hT(e,t){return null!=e?e:t()}function fT(e){let t,n=e[0],i=1;for(;i<e.length;){const s=e[i],o=e[i+1];if(i+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}var gT;function vT(e){const t=fT([e,"optionalAccess",e=>e.host]);return Boolean(fT([t,"optionalAccess",e=>e.shadowRoot])===e)}function yT(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function bT(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,xT).join("")).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):null}catch(e){return null}var t}function xT(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=bT(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)){let t=e.cssText;const n=e.selectorText.includes(":"),i="string"==typeof e.style.all&&e.style.all;if(i&&(t=function(e){let t="";for(let n=0;n<e.style.length;n++){const i=e.style,s=i[n],o=i.getPropertyPriority(s);t+=`${s}:${i.getPropertyValue(s)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}(e)),n&&(t=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(t)),n||i)return t}return t||e.cssText}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(gT||(gT={}));class _T{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;return hT(fT([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),()=>-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){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wT({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function kT({isMasked:e,element:t,value:n,maskInputFn:i}){let s=n||"";return e?(i&&(s=i(s,t)),"*".repeat(s.length)):s}function ST(e){return e.toLowerCase()}function TT(e){return e.toUpperCase()}const ET="__rrweb_original__";function CT(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ST(t):null}function IT(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function OT(e,t){let n;try{n=new URL(e,hT(t,()=>window.location.href))}catch(e){return null}return hT(fT([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),()=>null)}const jT={};function AT(e){const t=jT[e];if(t)return t;const n=window.document;let i=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(i=s[e]),n.head.removeChild(t)}catch(e){}return jT[e]=i.bind(window)}function LT(...e){return AT("setTimeout")(...e)}function PT(...e){return AT("clearTimeout")(...e)}function RT(e){try{return e.contentDocument}catch(e){}}let MT=1;const NT=new RegExp("[^a-z0-9-_:]");function DT(){return MT++}let FT,BT;const $T=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zT=/^(?:[a-z+]+:)?\/\//i,qT=/^www\..*/i,UT=/^(data:)([^,]*),(.*)/i;function HT(e,t){return(e||"").replace($T,(e,n,i,s,o,a)=>{const r=i||o||a,c=n||s||"";if(!r)return e;if(zT.test(r)||qT.test(r))return`url(${c}${r}${c})`;if(UT.test(r))return`url(${c}${r}${c})`;if("/"===r[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+r}${c})`;const l=t.split("/"),u=r.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`})}const VT=/^[^ \t\n\r\u000c]+/,KT=/^[, \t\n\r\u000c]+/;const WT=new WeakMap;function GT(e,t){return t&&""!==t.trim()?JT(e,t):t}function YT(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function JT(e,t){let n=WT.get(e);if(n||(n=e.createElement("a"),WT.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function ZT(e,t,n,i,s,o){return i?"src"===n||"href"===n&&("use"!==t||"#"!==i[0])||"xlink:href"===n&&"#"!==i[0]?GT(e,i):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function i(e){let i;const s=e.exec(t.substring(n));return s?(i=s[0],n+=i.length,i):""}const s=[];for(;i(KT),!(n>=t.length);){let o=i(VT);if(","===o.slice(-1))o=GT(e,o.substring(0,o.length-1)),s.push(o);else{let i="";o=GT(e,o);let a=!1;for(;;){const e=t.charAt(n);if(""===e){s.push((o+i).trim());break}if(a)")"===e&&(a=!1);else{if(","===e){n+=1,s.push((o+i).trim());break}"("===e&&(a=!0)}i+=e,n+=1}}}return s.join(", ")}(e,i):"style"===n?HT(i,JT(e)):"object"===t&&"data"===n?GT(e,i):"function"==typeof o?o(n,i,s):i:GT(e,i):i}function XT(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function QT(e,t,n=1/0,i=0){return e?e.nodeType!==e.ELEMENT_NODE||i>n?-1:t(e)?i:QT(e.parentNode,t,n,i+1):-1}function eE(e,t){return n=>{const i=n;if(null===i)return!1;try{if(e)if("string"==typeof e){if(i.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const i=e.classList[n];if(t.test(i))return!0}return!1}(i,e))return!0;return!(!t||!i.matches(t))}catch(e){return!1}}}function tE(e,t,n,i,s,o){try{const a=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===a)return!1;if("INPUT"===a.tagName){const e=a.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let r=-1,c=-1;if(o){if(c=QT(a,eE(i,s)),c<0)return!0;r=QT(a,eE(t,n),c>=0?c:1/0)}else{if(r=QT(a,eE(t,n)),r<0)return!1;c=QT(a,eE(i,s),r>=0?r:1/0)}return r>=0?!(c>=0)||r<=c:!(c>=0)&&!!o}catch(e){}return!!o}function nE(e,t){const{doc:n,mirror:i,blockClass:s,blockSelector:o,unblockSelector:a,maskAllText:r,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:d,inlineStylesheet:m,maskInputOptions:h={},maskTextFn:f,maskInputFn:g,dataURLOptions:v={},inlineImages:y,recordCanvas:b,keepIframeSrcFn:x,newlyAddedElement:_=!1}=t,w=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,i);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:gT.Document,childNodes:[],compatMode:e.compatMode}:{type:gT.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:gT.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:i,blockSelector:s,unblockSelector:o,inlineStylesheet:a,maskInputOptions:r={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:m,newlyAddedElement:h=!1,rootId:f,maskAllText:g,maskTextClass:v,unmaskTextClass:y,maskTextSelector:b,unmaskTextSelector:x}=t,_=function(e,t,n,i){try{if(i&&e.matches(i))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const i=e.classList[n];if(t.test(i))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,i,s,o),w=function(e){if(e instanceof HTMLFormElement)return"form";const t=ST(e.tagName);return NT.test(t)?"div":t}(e);let k={};const S=e.attributes.length;for(let t=0;t<S;t++){const i=e.attributes[t];i.name&&!XT(w,i.name,i.value)&&(k[i.name]=ZT(n,w,ST(i.name),i.value,e,c))}if("link"===w&&a){const t=Array.from(n.styleSheets).find(t=>t.href===e.href);let i=null;t&&(i=bT(t)),i&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=HT(i,t.href))}if("style"===w&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=bT(e.sheet);t&&(k._cssText=HT(t,JT(n)))}if("input"===w||"textarea"===w||"select"===w||"option"===w){const t=e,n=CT(t),i=IT(t,TT(w),n),s=t.checked;if("submit"!==n&&"button"!==n&&i){const e=tE(t,v,b,y,x,wT({type:n,tagName:TT(w),maskInputOptions:r}));k.value=kT({isMasked:e,element:t,value:i,maskInputFn:l})}s&&(k.checked=s)}"option"===w&&(e.selected&&!r.select?k.selected=!0:delete k.selected);if("canvas"===w&&d)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let i=0;i<e.height;i+=50){const s=t.getImageData,o=ET in s?s[ET]:s;if(new Uint32Array(o.call(t,n,i,Math.min(50,e.width-n),Math.min(50,e.height-i)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(k.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),i=n.createElement("canvas");i.width=e.width,i.height=e.height;t!==i.toDataURL(u.type,u.quality)&&(k.rr_dataURL=t)}if("img"===w&&p){FT||(FT=n.createElement("canvas"),BT=FT.getContext("2d"));const t=e,i=t.currentSrc||t.getAttribute("src")||"<unknown-src>",s=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{FT.width=t.naturalWidth,FT.height=t.naturalHeight,BT.drawImage(t,0,0),k.rr_dataURL=FT.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${i}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(s?k.crossOrigin=s:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}"audio"!==w&&"video"!==w||(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime);h||(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop));if(_){const{width:t,height:n}=e.getBoundingClientRect();k={class:k.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==w||m(k.src)||(_||RT(e)||(k.rr_src=k.src),delete k.src);let T;try{customElements.get(w)&&(T=!0)}catch(e){}return{type:gT.Element,tagName:w,attributes:k,childNodes:[],isSVG:YT(e)||void 0,needBlock:_,rootId:f,isCustom:T}}(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:a,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:h,maskInputFn:g,dataURLOptions:v,inlineImages:y,recordCanvas:b,keepIframeSrcFn:x,newlyAddedElement:_,rootId:w,maskAllText:r,maskTextClass:l,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:d});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:i,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:a,maskTextFn:r,maskInputOptions:c,maskInputFn:l,rootId:u}=t,p=e.parentNode&&e.parentNode.tagName;let d=e.textContent;const m="STYLE"===p||void 0,h="SCRIPT"===p||void 0,f="TEXTAREA"===p||void 0;if(m&&d){try{e.nextSibling||e.previousSibling||fT([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(d=bT(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}d=HT(d,JT(t.doc))}h&&(d="SCRIPT_PLACEHOLDER");const g=tE(e,i,o,s,a,n);m||h||f||!d||!g||(d=r?r(d,e.parentElement):d.replace(/[\S]/g,"*"));f&&d&&(c.textarea||g)&&(d=l?l(d,e.parentNode):d.replace(/[\S]/g,"*"));if("OPTION"===p&&d){d=kT({isMasked:tE(e,i,o,s,a,wT({type:null,tagName:p,maskInputOptions:c})),element:e,value:d,maskInputFn:l})}return{type:gT.Text,textContent:d||"",isStyle:m,rootId:u}}(e,{doc:n,maskAllText:r,maskTextClass:l,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:d,maskTextFn:f,maskInputOptions:h,maskInputFn:g,rootId:w});case e.CDATA_SECTION_NODE:return{type:gT.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:gT.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}function iE(e){return null==e?"":e.toLowerCase()}function sE(e,t){const{doc:n,mirror:i,blockClass:s,blockSelector:o,unblockSelector:a,maskAllText:r,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,skipChild:d=!1,inlineStylesheet:m=!0,maskInputOptions:h={},maskAttributeFn:f,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b={},inlineImages:x=!1,recordCanvas:_=!1,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:I=!1}=t;let{preserveWhiteSpace:O=!0}=t;const j=nE(e,{doc:n,mirror:i,blockClass:s,blockSelector:o,maskAllText:r,unblockSelector:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:f,maskTextFn:g,maskInputFn:v,dataURLOptions:b,inlineImages:x,recordCanvas:_,keepIframeSrcFn:C,newlyAddedElement:I});if(!j)return console.warn(e,"not serialized"),null;let A;A=i.hasNode(e)?i.getId(e):!function(e,t){if(t.comment&&e.type===gT.Comment)return!0;if(e.type===gT.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===OT(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(iE(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===iE(e.attributes.name)||"icon"===iE(e.attributes.rel)||"apple-touch-icon"===iE(e.attributes.rel)||"shortcut icon"===iE(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&iE(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(iE(e.attributes.property).match(/^(og|twitter|fb):/)||iE(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===iE(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===iE(e.attributes.name)||"googlebot"===iE(e.attributes.name)||"bingbot"===iE(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===iE(e.attributes.name)||"generator"===iE(e.attributes.name)||"framework"===iE(e.attributes.name)||"publisher"===iE(e.attributes.name)||"progid"===iE(e.attributes.name)||iE(e.attributes.property).match(/^article:/)||iE(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===iE(e.attributes.name)||"yandex-verification"===iE(e.attributes.name)||"csrf-token"===iE(e.attributes.name)||"p:domain_verify"===iE(e.attributes.name)||"verify-v1"===iE(e.attributes.name)||"verification"===iE(e.attributes.name)||"shopify-checkout-api-token"===iE(e.attributes.name)))return!0}}return!1}(j,y)&&(O||j.type!==gT.Text||j.isStyle||j.textContent.replace(/^\s+|\s+$/gm,"").length)?DT():-2;const L=Object.assign(j,{id:A});if(i.add(e,L),-2===A)return null;w&&w(e);let P=!d;if(L.type===gT.Element){P=P&&!L.needBlock,delete L.needBlock;const t=e.shadowRoot;t&&yT(t)&&(L.isShadowHost=!0)}if((L.type===gT.Document||L.type===gT.Element)&&P){y.headWhitespace&&L.type===gT.Element&&"head"===L.tagName&&(O=!1);const t={doc:n,mirror:i,blockClass:s,blockSelector:o,maskAllText:r,unblockSelector:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,skipChild:d,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:f,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b,inlineImages:x,recordCanvas:_,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:C};for(const n of Array.from(e.childNodes)){const e=sE(n,t);e&&L.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const i=sE(n,t);i&&(yT(e.shadowRoot)&&(i.isShadow=!0),L.childNodes.push(i))}}return e.parentNode&&vT(e.parentNode)&&yT(e.parentNode)&&(L.isShadow=!0),L.type===gT.Element&&"iframe"===L.tagName&&function(e,t,n){const i=e.contentWindow;if(!i)return;let s,o=!1;try{s=i.document.readyState}catch(e){return}if("complete"!==s){const i=LT(()=>{o||(t(),o=!0)},n);return void e.addEventListener("load",()=>{PT(i),o=!0,t()})}const a="about:blank";if(i.location.href!==a||e.src===a||""===e.src)return LT(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=RT(e);if(t&&k){const n=sE(t,{doc:t,mirror:i,blockClass:s,blockSelector:o,unblockSelector:a,maskAllText:r,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:f,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b,inlineImages:x,recordCanvas:_,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:C});n&&k(e,n)}},S),L.type===gT.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===OT(L.attributes.href))&&function(e,t,n){let i,s=!1;try{i=e.sheet}catch(e){return}if(i)return;const o=LT(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{PT(o),s=!0,t()})}(e,()=>{if(T){const t=sE(e,{doc:n,mirror:i,blockClass:s,blockSelector:o,unblockSelector:a,maskAllText:r,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:f,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b,inlineImages:x,recordCanvas:_,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:C});t&&T(e,t)}},E),L}function oE(e){let t,n=e[0],i=1;for(;i<e.length;){const s=e[i],o=e[i+1];if(i+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}function aE(e,t,n=document){const i={capture:!0,passive:!0};return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}const rE="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let cE={map:{},getId:()=>(console.error(rE),-1),getNode:()=>(console.error(rE),null),removeNodeFromMap(){console.error(rE)},has:()=>(console.error(rE),!1),reset(){console.error(rE)}};function lE(e,t,n={}){let i=null,s=0;return function(...o){const a=Date.now();s||!1!==n.leading||(s=a);const r=t-(a-s),c=this;r<=0||r>t?(i&&(!function(...e){OE("clearTimeout")(...e)}(i),i=null),s=a,e.apply(c,o)):i||!1===n.trailing||(i=jE(()=>{s=!1===n.leading?0:Date.now(),i=null,e.apply(c,o)},r))}}function uE(e,t,n,i,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,i?n:{set(e){jE(()=>{n.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>uE(e,t,o||{},!0)}function pE(e,t,n){try{if(!(t in e))return()=>{};const i=e[t],s=n(i);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=s,()=>{e[t]=i}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(cE=new Proxy(cE,{get:(e,t,n)=>("map"===t&&console.error(rE),Reflect.get(e,t,n))}));let dE=Date.now;function mE(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:oE([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||oE([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||oE([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:oE([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||oE([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||oE([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function hE(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function fE(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function gE(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}function vE(e,t,n,i,s){if(!e)return!1;const o=gE(e);if(!o)return!1;const a=eE(t,n);if(!s){const e=i&&o.matches(i);return a(o)&&!e}const r=QT(o,a);let c=-1;return!(r<0)&&(i&&(c=QT(o,eE(null,i))),r>-1&&c<0||r<c)}function yE(e,t){return-2===t.getId(e)}function bE(e,t){if(vT(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||bE(e.parentNode,t))}function xE(e){return Boolean(e.changedTouches)}function _E(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function wE(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function kE(e){return Boolean(oE([e,"optionalAccess",e=>e.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(dE=()=>(new Date).getTime());class SE{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return t=this.styleIDMap.get(e),n=()=>-1,null!=t?t:n();var t,n}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function TE(e){let t=null;return oE([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function EE(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=TE(n);)n=t;return n}(e);return t.contains(n)}function CE(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||EE(e))}const IE={};function OE(e){const t=IE[e];if(t)return t;const n=window.document;let i=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(i=s[e]),n.head.removeChild(t)}catch(e){}return IE[e]=i.bind(window)}function jE(...e){return OE("setTimeout")(...e)}var AE,LE,PE=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(PE||{}),RE=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(RE||{}),ME=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ME||{}),NE=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(NE||{});function DE(e){try{return e.contentDocument}catch(e){}}function FE(e){let t,n=e[0],i=1;for(;i<e.length;){const s=e[i],o=e[i+1];if(i+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}function BE(e){return"__ln"in e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(AE||(AE={})),function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(LE||(LE={}));class $E{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=FE([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&BE(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&BE(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const zE=(e,t)=>`${e}@${t}`;class qE{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new $E,i=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},s=s=>{if(!s.parentNode||!CE(s))return;const o=vT(s.parentNode)?this.mirror.getId(TE(s)):this.mirror.getId(s.parentNode),a=i(s);if(-1===o||-1===a)return n.addNode(s);const r=sE(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{_E(e,this.mirror)&&!vE(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),wE(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),kE(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{vE(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});r&&(e.push({parentId:o,nextId:a,node:r}),t.add(r.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)HE(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||s(e);for(const e of this.addedSet)VE(this.droppedSet,e)||HE(this.removes,e,this.mirror)?VE(this.movedSet,e)?s(e):this.droppedSet.add(e):s(e);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=i(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===i(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const i=t.parentNode.host;if(-1!==this.mirror.getId(i)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),s(e.value)}const a={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),i=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+i).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.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.movedMap={},this.mutationCb(a))},this.processMutation=e=>{if(!yE(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;vE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:tE(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,gE(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,i=e.target.getAttribute(n);if("value"===n){const n=CT(t),s=t.tagName;i=IT(t,s,n);const o=wT({maskInputOptions:this.maskInputOptions,tagName:s,type:n});i=kT({isMasked:tE(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:i,maskInputFn:this.maskInputFn})}if(vE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===e.oldValue)return;let s=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(i)){if(DE(t))return;n="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!XT(t.tagName,n)&&(s.attributes[n]=ZT(this.doc,ST(t.tagName),ST(n),i,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const i=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);i!==n.style.getPropertyValue(e)||o!==n.style.getPropertyPriority(e)?s.styleDiff[e]=""===o?i:[i,o]:s._unchangedStyles[e]=[i,o]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(s.styleDiff[e]=!1)}break}case"childList":if(vE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),i=vT(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);vE(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||yE(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(UE(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||bE(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[zE(n,i)]?UE(this.movedSet,t):this.removes.push({parentId:i,id:n,isShadow:!(!vT(e.target)||!yT(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(yE(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[zE(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);vE(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach(e=>this.genAdds(e)),kE(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function UE(e,t){e.delete(t),t.childNodes.forEach(t=>UE(e,t))}function HE(e,t,n){return 0!==e.length&&function(e,t,n){let i=t.parentNode;for(;i;){const t=n.getId(i);if(e.some(e=>e.id===t))return!0;i=i.parentNode}return!1}(e,t,n)}function VE(e,t){return 0!==e.size&&KE(e,t)}function KE(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||KE(e,n))}let WE;function GE(e){WE=e}function YE(){WE=void 0}const JE=e=>{if(!WE)return e;return(...t)=>{try{return e(...t)}catch(e){if(WE&&!0===WE(e))return()=>{};throw e}}};function ZE(e){let t,n=e[0],i=1;for(;i<e.length;){const s=e[i],o=e[i+1];if(i+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}const XE=[];function QE(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function eC(e,t){const n=new qE;XE.push(n),n.init(e);let i=window.MutationObserver||window.__rrMutationObserver;const s=ZE([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);s&&window[s]&&(i=window[s]);const o=new i(JE(t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function tC({mouseInteractionCb:e,doc:t,mirror:n,blockClass:i,blockSelector:s,unblockSelector:o,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const r=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,c=[];let l=null;return Object.keys(ME).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==r[e]).forEach(a=>{let r=ST(a);const u=(t=>a=>{const r=QE(a);if(vE(r,i,s,o,!0))return;let c=null,u=t;if("pointerType"in a){switch(a.pointerType){case"mouse":c=NE.Mouse;break;case"touch":c=NE.Touch;break;case"pen":c=NE.Pen}c===NE.Touch?ME[t]===ME.MouseDown?u="TouchStart":ME[t]===ME.MouseUp&&(u="TouchEnd"):NE.Pen}else xE(a)&&(c=NE.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===NE.Touch||u.startsWith("Mouse")&&c===NE.Mouse)&&(c=null)):ME[t]===ME.Click&&(c=l,l=null);const p=xE(a)?a.changedTouches[0]:a;if(!p)return;const d=n.getId(r),{clientX:m,clientY:h}=p;JE(e)({type:ME[u],id:d,x:m,y:h,...null!==c&&{pointerType:c}})})(a);if(window.PointerEvent)switch(ME[a]){case ME.MouseDown:case ME.MouseUp:r=r.replace("mouse","pointer");break;case ME.TouchStart:case ME.TouchEnd:return}c.push(aE(r,u,t))}),JE(()=>{c.forEach(e=>e())})}function nC({scrollCb:e,doc:t,mirror:n,blockClass:i,blockSelector:s,unblockSelector:o,sampling:a}){return aE("scroll",JE(lE(JE(a=>{const r=QE(a);if(!r||vE(r,i,s,o,!0))return;const c=n.getId(r);if(r===t&&t.defaultView){const n=mE(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:r.scrollLeft,y:r.scrollTop})}),a.scroll||100)),t)}const iC=["INPUT","TEXTAREA","SELECT"],sC=new WeakMap;function oC({inputCb:e,doc:t,mirror:n,blockClass:i,blockSelector:s,unblockSelector:o,ignoreClass:a,ignoreSelector:r,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:p,maskTextClass:d,unmaskTextClass:m,maskTextSelector:h,unmaskTextSelector:f}){function g(e){let n=QE(e);const u=e.isTrusted,g=n&&TT(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||iC.indexOf(g)<0||vE(n,i,s,o,!0))return;const y=n;if(y.classList.contains(a)||r&&y.matches(r))return;const b=CT(n);let x=IT(y,g,b),_=!1;const w=wT({maskInputOptions:c,tagName:g,type:b}),k=tE(n,d,h,m,f,w);"radio"!==b&&"checkbox"!==b||(_=n.checked),x=kT({isMasked:k,element:n,value:x,maskInputFn:l}),v(n,p?{text:x,isChecked:_,userTriggered:u}:{text:x,isChecked:_});const S=n.name;"radio"===b&&S&&_&&t.querySelectorAll(`input[type="radio"][name="${S}"]`).forEach(e=>{if(e!==n){const t=kT({isMasked:k,element:e,value:IT(e,g,b),maskInputFn:l});v(e,p?{text:t,isChecked:!_,userTriggered:!1}:{text:t,isChecked:!_})}})}function v(t,i){const s=sC.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){sC.set(t,i);const s=n.getId(t);JE(e)({...i,id:s})}}const y=("last"===u.input?["change"]:["input","change"]).map(e=>aE(e,JE(g),t)),b=t.defaultView;if(!b)return()=>{y.forEach(e=>e())};const x=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),_=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return x&&x.set&&y.push(..._.map(e=>uE(e[0],e[1],{set(){JE(g)({target:this,isTrusted:!1})}},!1,b))),JE(()=>{y.forEach(e=>e())})}function aC(e){return function(e,t){if(uC("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||uC("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||uC("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||uC("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function rC(e,t,n){let i,s;return e?(e.ownerNode?i=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:i}):{}}function cC({mirror:e,stylesheetManager:t},n){let i=null;i="#document"===n.nodeName?e.getId(n):e.getId(n.host);const s="#document"===n.nodeName?ZE([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):ZE([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),o=ZE([s,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(ZE([s,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&s&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return ZE([o,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=ZE([o,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==i&&-1!==i)try{t.adoptStyleSheets(e,i)}catch(e){}return n}}),JE(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})})):()=>{}}function lC(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let i;e.recordDOM&&(i=eC(e,e.doc));const s=function({mousemoveCb:e,sampling:t,doc:n,mirror:i}){if(!1===t.mousemove)return()=>{};const s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let a,r=[];const c=lE(JE(t=>{const n=Date.now()-a;e(r.map(e=>(e.timeOffset-=n,e)),t),r=[],a=null}),o),l=JE(lE(JE(e=>{const t=QE(e),{clientX:n,clientY:s}=xE(e)?e.changedTouches[0]:e;a||(a=dE()),r.push({x:n,y:s,id:i.getId(t),timeOffset:dE()-a}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?RE.Drag:e instanceof MouseEvent?RE.MouseMove:RE.TouchMove)}),s,{trailing:!1})),u=[aE("mousemove",l,n),aE("touchmove",l,n),aE("drag",l,n)];return JE(()=>{u.forEach(e=>e())})}(e),o=tC(e),a=nC(e),r=function({viewportResizeCb:e},{win:t}){let n=-1,i=-1;return aE("resize",JE(lE(JE(()=>{const t=hE(),s=fE();n===t&&i===s||(e({width:Number(s),height:Number(t)}),n=t,i=s)}),200)),t)}(e,{win:n}),c=oC(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:i,mirror:s,sampling:o,doc:a}){const r=JE(a=>lE(JE(o=>{const r=QE(o);if(!r||vE(r,t,n,i,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:p}=r;e({type:a,id:s.getId(r),currentTime:c,volume:l,muted:u,playbackRate:p})}),o.media||500)),c=[aE("play",r(0),a),aE("pause",r(1),a),aE("seeked",r(2),a),aE("volumechange",r(3),a),aE("ratechange",r(4),a)];return JE(()=>{c.forEach(e=>e())})}(e);let u=()=>{},p=()=>{},d=()=>{},m=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:JE((i,s,o)=>{const[a,r]=o,{id:c,styleId:l}=rC(s,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:a,index:r}]}),i.apply(s,o)})});const o=i.CSSStyleSheet.prototype.deleteRule;let a,r;i.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:JE((i,s,o)=>{const[a]=o,{id:r,styleId:c}=rC(s,t,n.styleMirror);return(r&&-1!==r||c&&-1!==c)&&e({id:r,styleId:c,removes:[{index:a}]}),i.apply(s,o)})}),i.CSSStyleSheet.prototype.replace&&(a=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:JE((i,s,o)=>{const[a]=o,{id:r,styleId:c}=rC(s,t,n.styleMirror);return(r&&-1!==r||c&&-1!==c)&&e({id:r,styleId:c,replace:a}),i.apply(s,o)})})),i.CSSStyleSheet.prototype.replaceSync&&(r=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(r,{apply:JE((i,s,o)=>{const[a]=o,{id:r,styleId:c}=rC(s,t,n.styleMirror);return(r&&-1!==r||c&&-1!==c)&&e({id:r,styleId:c,replaceSync:a}),i.apply(s,o)})}));const c={};pC("CSSGroupingRule")?c.CSSGroupingRule=i.CSSGroupingRule:(pC("CSSMediaRule")&&(c.CSSMediaRule=i.CSSMediaRule),pC("CSSConditionRule")&&(c.CSSConditionRule=i.CSSConditionRule),pC("CSSSupportsRule")&&(c.CSSSupportsRule=i.CSSSupportsRule));const l={};return Object.entries(c).forEach(([i,s])=>{l[i]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(l[i].insertRule,{apply:JE((i,s,o)=>{const[a,r]=o,{id:c,styleId:l}=rC(s.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:a,index:[...aC(s),r||0]}]}),i.apply(s,o)})}),s.prototype.deleteRule=new Proxy(l[i].deleteRule,{apply:JE((i,s,o)=>{const[a]=o,{id:r,styleId:c}=rC(s.parentStyleSheet,t,n.styleMirror);return(r&&-1!==r||c&&-1!==c)&&e({id:r,styleId:c,removes:[{index:[...aC(s),a]}]}),i.apply(s,o)})})}),JE(()=>{i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=o,a&&(i.CSSStyleSheet.prototype.replace=a),r&&(i.CSSStyleSheet.prototype.replaceSync=r),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}(e,{win:n}),p=cC(e,e.doc),d=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:i},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:JE((s,a,r)=>{const[c,l,u]=r;if(n.has(c))return o.apply(a,[c,l,u]);const{id:p,styleId:d}=rC(ZE([a,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,i.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:l,priority:u},index:aC(a.parentRule)}),s.apply(a,r)})});const a=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:JE((s,o,r)=>{const[c]=r;if(n.has(c))return a.apply(o,[c]);const{id:l,styleId:u}=rC(ZE([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,i.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,remove:{property:c},index:aC(o.parentRule)}),s.apply(o,r)})}),JE(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}(e,{win:n}),e.collectFonts&&(m=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const i=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const i=new o(e,t,n);return s.set(i,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),i};const a=pE(t.fonts,"add",function(t){return function(n){return jE(JE(()=>{const t=s.get(n);t&&(e(t),s.delete(n))}),0),t.apply(this,[n])}});return i.push(()=>{n.FontFace=o}),i.push(a),JE(()=>{i.forEach(e=>e())})}(e)));const h=function(e){const{doc:t,mirror:n,blockClass:i,blockSelector:s,unblockSelector:o,selectionCb:a}=e;let r=!0;const c=JE(()=>{const e=t.getSelection();if(!e||r&&ZE([e,"optionalAccess",e=>e.isCollapsed]))return;r=e.isCollapsed||!1;const c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const a=e.getRangeAt(t),{startContainer:r,startOffset:l,endContainer:u,endOffset:p}=a;vE(r,i,s,o,!0)||vE(u,i,s,o,!0)||c.push({start:n.getId(r),startOffset:l,end:n.getId(u),endOffset:p})}a({ranges:c})});return c(),aE("selectionchange",c)}(e),f=function({doc:e,customElementCb:t}){const n=e.defaultView;if(!n||!n.customElements)return()=>{};const i=pE(n.customElements,"define",function(e){return function(n,i,s){try{t({define:{name:n}})}catch(e){}return e.apply(this,[n,i,s])}});return i}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return JE(()=>{XE.forEach(e=>e.reset()),ZE([i,"optionalAccess",e=>e.disconnect,"call",e=>e()]),s(),o(),a(),r(),c(),l(),u(),p(),d(),m(),h(),f(),g.forEach(e=>e())})}function uC(e){return void 0!==window[e]}function pC(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class dC{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,i){const s=n||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let a=s.get(t);return a||(a=this.generateIdFn(),s.set(t,a),o.set(a,t)),a}getIds(e,t){const n=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,i))}getRemoteId(e,t,n){const i=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const s=i.get(t);return s||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function mC(e){let t,n=e[0],i=1;for(;i<e.length;){const s=e[i],o=e[i+1];if(i+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}class hC{constructor(){this.crossOriginIframeMirror=new dC(DT),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class fC{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new dC(DT),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new dC(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,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),mC([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);const n=DE(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const i=this.transformCrossOriginEvent(n,t.data.event);i&&this.wrappedEmit(i,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case PE.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:PE.IncrementalSnapshot,data:{source:RE.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case PE.Meta:case PE.Load:case PE.DomContentLoaded:return!1;case PE.Plugin:return t;case PE.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case PE.IncrementalSnapshot:switch(t.data.source){case RE.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case RE.Drag:case RE.TouchMove:case RE.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case RE.ViewportResize:return!1;case RE.MediaInteraction:case RE.MouseInteraction:case RE.Scroll:case RE.CanvasMutation:case RE.Input:return this.replaceIds(t.data,e,["id"]),t;case RE.StyleSheetRule:case RE.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case RE.Font:return t;case RE.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case RE.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),mC([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t(t=>{this.replaceStyleIds(t,e,["styleId"])})]),t}}return!1}replace(e,t,n,i){for(const s of i)(Array.isArray(t[s])||"number"==typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===gT.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class gC{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class vC{constructor(e){this.shadowDoms=new WeakSet,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,t){if(!yT(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=eC({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(nC({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),jE(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(cC({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const t=DE(e),n=function(e){try{return e.contentWindow}catch(e){}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(pE(e.prototype,"attachShadow",function(e){return function(i){const s=e.call(this,i);return this.shadowRoot&&CE(this)&&n.addShadowRoot(this.shadowRoot,t),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class yC{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class bC{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new SE,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},i=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),i.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:xT(e),index:t}))})),n.styleIds.push(e)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class xC{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){OE("requestAnimationFrame")(...e)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let _C,wC;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Rw([e,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const kC=new _T;function SC(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:a=null,ignoreClass:r="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:p=null,maskTextSelector:d=null,unmaskTextSelector:m=null,inlineStylesheet:h=!0,maskAllInputs:f,maskInputOptions:g,slimDOMOptions:v,maskAttributeFn:y,maskInputFn:b,maskTextFn:x,maxCanvasSize:_=null,packFn:w,sampling:k={},dataURLOptions:S={},mousemoveWait:T,recordDOM:E=!0,recordCanvas:C=!1,recordCrossOriginIframes:I=!1,recordAfter:O=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:j=!1,collectFonts:A=!1,inlineImages:L=!1,plugins:P,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:N,onMutation:D,getCanvasManager:F}=e;GE(N);const B=!I||window.parent===window;let $=!1;if(!B)try{window.parent.document&&($=!1)}catch(e){$=!0}if(B&&!t)throw new Error("emit function is required");if(!B&&!$)return()=>{};void 0!==T&&void 0===k.mousemove&&(k.mousemove=T),kC.reset();const z=!0===f?{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,radio:!0,checkbox:!0}:void 0!==g?g:{},q=!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===v,headMetaDescKeywords:"all"===v}:v||{};let U;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let H=0;const V=e=>{for(const t of P||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!$&&(e=w(e)),e};_C=(e,s)=>{const o=e;if(o.timestamp=dE(),!Rw([XE,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])||o.type===PE.FullSnapshot||o.type===PE.IncrementalSnapshot&&o.data.source===RE.Mutation||XE.forEach(e=>e.unfreeze()),B)Rw([t,"optionalCall",e=>e(V(o),s)]);else if($){const e={type:"rrweb",event:V(o),origin:window.location.origin,isCheckout:s};window.parent.postMessage(e,"*")}if(o.type===PE.FullSnapshot)U=o,H=0;else if(o.type===PE.IncrementalSnapshot){if(o.data.source===RE.Mutation&&o.data.isAttachIframe)return;H++;const e=i&&H>=i,t=n&&U&&o.timestamp-U.timestamp>n;(e||t)&&ee(!0)}};const K=e=>{_C({type:PE.IncrementalSnapshot,data:{source:RE.Mutation,...e}})},W=e=>_C({type:PE.IncrementalSnapshot,data:{source:RE.Scroll,...e}}),G=e=>_C({type:PE.IncrementalSnapshot,data:{source:RE.CanvasMutation,...e}}),Y=new bC({mutationCb:K,adoptedStyleSheetCb:e=>_C({type:PE.IncrementalSnapshot,data:{source:RE.AdoptedStyleSheet,...e}})}),J="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new hC:new fC({mirror:kC,mutationCb:K,stylesheetManager:Y,recordCrossOriginIframes:I,wrappedEmit:_C});for(const e of P||[])e.getMirror&&e.getMirror({nodeMirror:kC,crossOriginIframeMirror:J.crossOriginIframeMirror,crossOriginIframeStyleMirror:J.crossOriginIframeStyleMirror});const Z=new xC,X=function(e,t){try{return e?e(t):new yC}catch(e){return console.warn("Unable to initialize CanvasManager"),new yC}}(F,{mirror:kC,win:window,mutationCb:e=>_C({type:PE.IncrementalSnapshot,data:{source:RE.CanvasMutation,...e}}),recordCanvas:C,blockClass:s,blockSelector:o,unblockSelector:a,maxCanvasSize:_,sampling:k.canvas,dataURLOptions:S,errorHandler:N}),Q="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new gC:new vC({mutationCb:K,scrollCb:W,bypassOptions:{onMutation:D,blockClass:s,blockSelector:o,unblockSelector:a,maskAllText:l,maskTextClass:u,unmaskTextClass:p,maskTextSelector:d,unmaskTextSelector:m,inlineStylesheet:h,maskInputOptions:z,dataURLOptions:S,maskAttributeFn:y,maskTextFn:x,maskInputFn:b,recordCanvas:C,inlineImages:L,sampling:k,slimDOMOptions:q,iframeManager:J,stylesheetManager:Y,canvasManager:X,keepIframeSrcFn:R,processedNodeManager:Z},mirror:kC}),ee=(e=!1)=>{if(!E)return;_C({type:PE.Meta,data:{href:window.location.href,width:fE(),height:hE()}},e),Y.reset(),Q.init(),XE.forEach(e=>e.lock());const t=function(e,t){const{mirror:n=new _T,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:a=!1,maskTextClass:r="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:p=!0,inlineImages:d=!1,recordCanvas:m=!1,maskAllInputs:h=!1,maskAttributeFn:f,maskTextFn:g,maskInputFn:v,slimDOM:y=!1,dataURLOptions:b,preserveWhiteSpace:x,onSerialize:_,onIframeLoad:w,iframeLoadTimeout:k,onStylesheetLoad:S,stylesheetLoadTimeout:T,keepIframeSrcFn:E=()=>!1}=t||{};return sE(e,{doc:e,mirror:n,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:r,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:!0===h?{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}:!1===h?{}:h,maskAttributeFn:f,maskTextFn:g,maskInputFn:v,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:b,inlineImages:d,recordCanvas:m,preserveWhiteSpace:x,onSerialize:_,onIframeLoad:w,iframeLoadTimeout:k,onStylesheetLoad:S,stylesheetLoadTimeout:T,keepIframeSrcFn:E,newlyAddedElement:!1})}(document,{mirror:kC,blockClass:s,blockSelector:o,unblockSelector:a,maskAllText:l,maskTextClass:u,unmaskTextClass:p,maskTextSelector:d,unmaskTextSelector:m,inlineStylesheet:h,maskAllInputs:z,maskAttributeFn:y,maskInputFn:b,maskTextFn:x,slimDOM:q,dataURLOptions:S,recordCanvas:C,inlineImages:L,onSerialize:e=>{_E(e,kC)&&J.addIframe(e),wE(e,kC)&&Y.trackLinkElement(e),kE(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{J.attachIframe(e,t),e.contentWindow&&X.addWindow(e.contentWindow),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");_C({type:PE.FullSnapshot,data:{node:t,initialOffset:mE(window)}}),XE.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,kC.getId(document))};wC=ee;try{const e=[],t=e=>JE(lC)({onMutation:D,mutationCb:K,mousemoveCb:(e,t)=>_C({type:PE.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>_C({type:PE.IncrementalSnapshot,data:{source:RE.MouseInteraction,...e}}),scrollCb:W,viewportResizeCb:e=>_C({type:PE.IncrementalSnapshot,data:{source:RE.ViewportResize,...e}}),inputCb:e=>_C({type:PE.IncrementalSnapshot,data:{source:RE.Input,...e}}),mediaInteractionCb:e=>_C({type:PE.IncrementalSnapshot,data:{source:RE.MediaInteraction,...e}}),styleSheetRuleCb:e=>_C({type:PE.IncrementalSnapshot,data:{source:RE.StyleSheetRule,...e}}),styleDeclarationCb:e=>_C({type:PE.IncrementalSnapshot,data:{source:RE.StyleDeclaration,...e}}),canvasMutationCb:G,fontCb:e=>_C({type:PE.IncrementalSnapshot,data:{source:RE.Font,...e}}),selectionCb:e=>{_C({type:PE.IncrementalSnapshot,data:{source:RE.Selection,...e}})},customElementCb:e=>{_C({type:PE.IncrementalSnapshot,data:{source:RE.CustomElement,...e}})},blockClass:s,ignoreClass:r,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:p,maskTextSelector:d,unmaskTextSelector:m,maskInputOptions:z,inlineStylesheet:h,sampling:k,recordDOM:E,recordCanvas:C,inlineImages:L,userTriggeredOnInput:j,collectFonts:A,doc:e,maskAttributeFn:y,maskInputFn:b,maskTextFn:x,keepIframeSrcFn:R,blockSelector:o,unblockSelector:a,slimDOMOptions:q,dataURLOptions:S,mirror:kC,iframeManager:J,stylesheetManager:Y,shadowDomManager:Q,processedNodeManager:Z,canvasManager:X,ignoreCSSAttributes:M,plugins:Rw([P,"optionalAccess",e=>e.filter,"call",e=>e(e=>e.observer),"optionalAccess",e=>e.map,"call",e=>e(e=>({observer:e.observer,options:e.options,callback:t=>_C({type:PE.Plugin,data:{plugin:e.name,payload:t}})}))])||[]},{});J.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});const n=()=>{ee(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(aE("DOMContentLoaded",()=>{_C({type:PE.DomContentLoaded,data:{}}),"DOMContentLoaded"===O&&n()})),e.push(aE("load",()=>{_C({type:PE.Load,data:{}}),"load"===O&&n()},window))),()=>{e.forEach(e=>e()),Z.destroy(),wC=void 0,YE()}}catch(e){console.warn(e)}}SC.mirror=kC,SC.takeFullSnapshot=function(e){if(!wC)throw new Error("please take full snapshot after start recording");wC(e)};function TC(e){return e>9999999999?e:1e3*e}function EC(e){return e>9999999999?e/1e3:e}function CC(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:PE.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:Yx(t,10,1e3)}}),"console"===t.category)))}function IC(e){return e.closest("button,a")||e}function OC(e){const t=jC(e);return t&&t instanceof Element?IC(t):t}function jC(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let AC;function LC(e){return AC||(AC=[],cb(rT,"open",function(e){return function(...t){if(AC)try{AC.forEach(e=>e())}catch(e){}return e.apply(rT,t)}})),AC.push(e),()=>{const t=AC?AC.indexOf(e):-1;t>-1&&AC.splice(t,1)}}const PC=new Set([RE.Mutation,RE.StyleSheetRule,RE.StyleDeclaration,RE.AdoptedStyleSheet,RE.CanvasMutation,RE.Selection,RE.MediaInteraction]);class RC{constructor(e,t,n=CC){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=LC(()=>{this._lastMutation=NC()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){if(!MC.includes(e.tagName))return!0;if("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||""))return!0;if("A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))return!0;if(t&&e.matches(t))return!0;return!1}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:EC(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=EC(e)}registerScroll(e=Date.now()){this._lastScroll=EC(e)}registerClick(e){const t=IC(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){const e=[],t=NC();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,i=e.mutationAfter&&e.mutationAfter<=this._threshold,s=!n&&!i,{clickCount:o,clickBreadcrumb:a}=e;if(s){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),i=n<1e3*this._timeout?"mutation":"timeout",s={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:rT.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:i,clickCount:o||1}};return void this._addBreadcrumbEvent(t,s)}if(o>1){const e={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:rT.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=IS(()=>this._checkClicks(),1e3)}}const MC=["A","BUTTON","INPUT"];function NC(){return Date.now()/1e3}function DC(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(PC.has(n)&&e.registerMutation(t.timestamp),n===RE.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===RE.MouseInteraction}(t)){const{type:n,id:i}=t.data,s=SC.mirror.getNode(i);s instanceof HTMLElement&&n===ME.Click&&e.registerClick(s)}}catch(e){}}function FC(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var BC;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(BC||(BC={}));const $C=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function zC(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if($C.has(n)){let i=n;"data-testid"!==n&&"data-test-id"!==n||(i="testId"),t[i]=e[n]}return t}const qC=e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,i=null;try{i=t?OC(e.event):jC(e.event),n=eb(i,{maxStringLength:200})||"<unknown>"}catch(e){n="<unknown>"}return{target:i,message:n}}(e);return FC({category:`ui.${e.name}`,...UC(t,n)})}(t);if(!n)return;const i="click"===t.name,s=i?t.event:void 0;var o,a,r;!(i&&e.clickDetector&&s&&s.target)||s.altKey||s.metaKey||s.ctrlKey||s.shiftKey||(o=e.clickDetector,a=n,r=OC(t.event),o.handleClick(a,r)),CC(e,n)};function UC(e,t){const n=SC.mirror.getId(e),i=n&&SC.mirror.getNode(n),s=i&&SC.mirror.getMeta(i),o=s&&function(e){return e.type===BC.Element}(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(e=>e.type===BC.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:zC(o.attributes)}}:{}}}function HC(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:i,altKey:s,key:o,target:a}=e;if(!a||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(a)||!o)return null;const r=t||i||s,c=1===o.length;if(!r&&c)return null;const l=eb(a,{maxStringLength:200})||"<unknown>",u=UC(a,l);return FC({category:"ui.keyDown",message:l,data:{...u.data,metaKey:t,shiftKey:n,ctrlKey:i,altKey:s,key:o}})}(t);n&&CC(e,n)}const VC={resource:function(e){const{entryType:t,initiatorType:n,name:i,responseEnd:s,startTime:o,decodedBodySize:a,encodedBodySize:r,responseStatus:c,transferSize:l}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:GC(o),end:GC(s),name:i,data:{size:l,statusCode:c,decodedBodySize:a,encodedBodySize:r}}},paint:function(e){const{duration:t,entryType:n,name:i,startTime:s}=e,o=GC(s);return{type:n,name:i,start:o,end:o+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:i,duration:s,domComplete:o,encodedBodySize:a,domContentLoadedEventStart:r,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:p,redirectCount:d,startTime:m,transferSize:h,type:f}=e;if(0===s)return null;return{type:`${t}.${f}`,start:GC(m),end:GC(o),name:n,data:{size:h,decodedBodySize:i,encodedBodySize:a,duration:s,domInteractive:l,domContentLoadedEventStart:r,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:p,domComplete:o,redirectCount:d}}}};function KC(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function WC(e){const t=VC[e.entryType];return t?t(e):null}function GC(e){return((bb||rT.performance.timeOrigin)+e)/1e3}function YC(e){const t=e.entries[e.entries.length-1];return eI(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function JC(e){return void 0!==e.sources}function ZC(e){const t=[],n=[];for(const i of e.entries)if(JC(i)){const e=[];for(const t of i.sources)if(t.node){n.push(t.node);const i=SC.mirror.getId(t.node);i&&e.push(i)}t.push({value:i.value,nodeIds:e.length?e:void 0})}return eI(e,"cumulative-layout-shift",n,t)}function XC(e){const t=e.entries[e.entries.length-1];return eI(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function QC(e){const t=e.entries[e.entries.length-1];return eI(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function eI(e,t,n,i){const s=e.value,o=e.rating,a=GC(s);return{type:"web-vital",name:t,start:a,end:a,data:{value:s,size:s,rating:o,nodeIds:n?n.map(e=>SC.mirror.getId(e)):void 0,attributions:i}}}const tI="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;const nI=["info","warn","error","log"],iI="[Replay] ";function sI(e,t="info"){nw({category:"console",data:{logger:"replay"},level:t,message:`${iI}${e}`},{level:t})}const oI=function(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=n.captureExceptions,t=n.traceInternals}};return tI?(nI.forEach(e=>{n[e]=(...n)=>{yy[e](iI,...n),t&&sI(n.join(""),fw(e))}}),n.exception=(i,...s)=>{s.length&&n.error&&n.error(...s),yy.error(iI,i),e?j_(i):t&&sI(i,"error")},n.infoTick=(...e)=>{yy.info(iI,...e),t&&setTimeout(()=>sI(e[0]),0)}):nI.forEach(e=>{n[e]=()=>{}}),n}();class aI extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class rI{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>dT)throw new aI;this.events.push(e)}finish(){return new Promise(e=>{const t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map(e=>e.timestamp).sort()[0];return e?TC(e):null}}class cI{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:n})=>{n.success?e():t()},{once:!0}),this._worker.addEventListener("error",e=>{t(e)},{once:!0})})),this._ensureReadyPromise}destroy(){tI&&oI.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise((i,s)=>{const o=({data:t})=>{const a=t;if(a.method===e&&a.id===n){if(this._worker.removeEventListener("message",o),!a.success)return tI&&oI.error("Error in compression worker: ",a.response),void s(new Error("Error in compression worker"));i(a.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})})}_getAndIncrementId(){return this._id++}}class lI{constructor(e){this._worker=new cI(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=TC(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>dT?Promise.reject(new aI):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{tI&&oI.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class uI{constructor(e){this._fallback=new rI,this._compression=new lI(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(tI&&oI.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,i=[];for(const t of e)i.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(i),this._fallback.clear()}catch(e){tI&&oI.exception(e,"Failed to add events when switching buffers.")}}}function pI({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}();return""}();if(!t)return;tI&&oI.info("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new uI(n)}catch(e){tI&&oI.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return tI&&oI.info("Using simple buffer"),new rI}function dI(){try{return"sessionStorage"in rT&&!!rT.sessionStorage}catch(e){return!1}}function mI(e){!function(){if(!dI())return;try{rT.sessionStorage.removeItem(cT)}catch(e){}}(),e.session=void 0}function hI(e){return void 0!==e&&Math.random()<e}function fI(e){const t=Date.now();return{id:e.id||xb(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function gI(e){if(dI())try{rT.sessionStorage.setItem(cT,JSON.stringify(e))}catch(e){}}function vI({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:i}={}){const s=function(e,t){return hI(e)?"session":!!t&&"buffer"}(e,t),o=fI({sampled:s,previousSessionId:i});return n&&gI(o),o}function yI(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function bI(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:i=Date.now()}){return yI(e.started,t,i)||yI(e.lastActivity,n,i)}function xI(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!bI(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function _I({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},i){const s=i.stickySession&&function(){if(!dI())return null;try{const e=rT.sessionStorage.getItem(cT);if(!e)return null;const t=JSON.parse(e);return tI&&oI.infoTick("Loading existing session"),fI(t)}catch(e){return null}}();return s?xI(s,{sessionIdleExpire:e,maxReplayDuration:t})?(tI&&oI.infoTick("Session in sessionStorage is expired, creating new one..."),vI(i,{previousSessionId:s.id})):s:(tI&&oI.infoTick("Creating new session"),vI(i,{previousSessionId:n}))}function wI(e,t,n){return!!SI(e,t)&&(kI(e,t,n),!0)}async function kI(e,t,n){const{eventBuffer:i}=e;if(!i||i.waitForCheckout&&!n)return null;const s="buffer"===e.recordingMode;try{n&&s&&i.clear(),n&&(i.hasCheckout=!0,i.waitForCheckout=!1);const o=function(e,t){try{if("function"==typeof t&&function(e){return e.type===PE.Custom}(e))return t(e)}catch(e){return tI&&oI.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}(t,e.getOptions().beforeAddRecordingEvent);if(!o)return;return await i.addEvent(o)}catch(t){const n=t&&t instanceof aI,o=n?"addEventSizeExceeded":"addEvent";if(n&&s)return i.clear(),i.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:o});const a=Yb();a&&a.recordDroppedEvent("internal_sdk_error","replay")}}function SI(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=TC(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(tI&&oI.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function TI(e){return!e.type}function EI(e){return"transaction"===e.type}function CI(e){return"feedback"===e.type}function II(e){return(t,n)=>{if(!e.isEnabled()||!TI(t)&&!EI(t))return;const i=n&&n.statusCode;!i||i<200||i>=300||(EI(t)?function(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,t):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);if("buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:i}=e.getOptions();if("function"==typeof i&&!i(t))return;IS(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t))}}function OI(e){return t=>{e.isEnabled()&&TI(t)&&function(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if("string"!=typeof n)return;if(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){CC(e,FC({category:"replay.hydrate-error",data:{url:nb()}}))}}(e,t)}}function jI(e){const t=Yb();t&&t.on("beforeAddBreadcrumb",t=>function(e,t){if(!e.isEnabled()||!AI(t))return;const n=function(e){if(!AI(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))return null;if("console"===e.category)return function(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return FC(e);let n=!1;const i=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>pT?(n=!0,`${e.slice(0,pT)}…`):e;if("object"==typeof e)try{const t=Yx(e,7);return JSON.stringify(t).length>pT?(n=!0,`${JSON.stringify(t,null,2).slice(0,pT)}…`):t}catch(e){}return e});return FC({...e,data:{...e.data,arguments:i,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e);return FC(e)}(t);n&&CC(e,n)}(e,t))}function AI(e){return!!e.category}function LI(){const e=Kb().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ox();if(t){delete Ux(t).replay_id}}function PI(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!TI(t)&&!EI(t)&&!CI(t))return t;if(!e.checkAndHandleExpiredSession())return LI(),t;if(CI(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:PE.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1))}(e,t),t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length||!t.originalException||!t.originalException.__rrweb__)}(t,n)&&!e.getOptions()._experiments.captureExceptions)return tI&&oI.log("Ignoring error from rrweb internals",t),null;const i=function(e,t){return"buffer"===e.recordingMode&&t.message!==lT&&!(!t.exception||t.type)&&hI(e.getOptions().errorSampleRate)}(e,t);return(i||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t},{id:"Replay"})}function RI(e,t){return t.map(({type:t,start:n,end:i,name:s,data:o})=>{const a=e.throttledAddEvent({type:PE.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:s,startTimestamp:n,endTimestamp:i,data:o}}});return"string"==typeof a?Promise.resolve(null):a})}function MI(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,i=Date.now()/1e3;return{type:"navigation.push",start:i,end:i,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(RI(e,[n]),!1)))}}function NI(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!tI||!e.getOptions()._experiments.traceInternals)&&X_(t,Yb())}(e,t.name)||e.addUpdate(()=>(RI(e,[t]),!0)))}function DI(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=VI(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function FI(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function BI(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[VI(e)];if(!e)return[void 0]}catch(t){return tI&&oI.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return tI&&oI.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function $I(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},i=n.warnings||[];return n.warnings=[...i,t],e._meta=n,e}function zI(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:i,url:s,method:o,statusCode:a,request:r,response:c}=t;return{type:e,start:n/1e3,end:i/1e3,name:s,data:fb({method:o,statusCode:a,request:r,response:c})}}function qI(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function UI(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const i={headers:e,size:t},{body:s,warnings:o}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>uT,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,uT);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(e){}return{body:e}}(n);return i.body=s,o&&o.length>0&&(i._meta={warnings:o}),i}function HI(e,t){return Object.entries(e).reduce((n,[i,s])=>{const o=i.toLowerCase();return t.includes(o)&&e[i]&&(n[o]=s),n},{})}function VI(e){return new URLSearchParams(e).toString()}function KI(e,t){const n=function(e,t=rT.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(rT.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const i=n.href;if(!e.endsWith("/")&&i.endsWith("/"))return i.slice(0,-1);return i}(e);return rb(n,t)}async function WI(e,t,n){try{const i=await async function(e,t,n){const i=Date.now(),{startTimestamp:s=i,endTimestamp:o=i}=t,{url:a,method:r,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,p=KI(a,n.networkDetailAllowUrls)&&!KI(a,n.networkDetailDenyUrls),d=p?function({networkCaptureBodies:e,networkRequestHeaders:t},n,i){const s=n?function(e,t){if(1===e.length&&"string"!=typeof e[0])return JI(e[0],t);if(2===e.length)return JI(e[1],t);return{}}(n,t):{};if(!e)return UI(s,i,void 0);const o=GI(n),[a,r]=BI(o),c=UI(s,i,a);if(r)return $I(c,r);return c}(n,t.input,l):qI(l),m=await async function(e,{networkCaptureBodies:t,networkResponseHeaders:n},i,s){if(!e&&void 0!==s)return qI(s);const o=i?YI(i.headers,n):{};if(!i||!t&&void 0!==s)return UI(o,s,void 0);const[a,r]=await async function(e){const t=function(e){try{return e.clone()}catch(e){tI&&oI.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise((t,n)=>{const i=IS(()=>n(new Error("Timeout while trying to read response body")),500);(async function(e){return await e.text()})(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(i))})}(t);return[e]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(tI&&oI.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(tI&&oI.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(i),c=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:i,headers:s}){try{const o=e&&e.length&&void 0===n?DI(e):n;return i?UI(s,o,t?e:void 0):qI(o)}catch(e){return tI&&oI.exception(e,"Failed to serialize response body"),UI(s,n,void 0)}}(a,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:o});if(r)return $I(c,r);return c}(p,n,t.response,u);return{startTimestamp:s,endTimestamp:o,url:a,method:r,statusCode:c,request:d,response:m}}(e,t,n),s=zI("resource.fetch",i);NI(n.replay,s)}catch(e){tI&&oI.exception(e,"Failed to capture fetch breadcrumb")}}function GI(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function YI(e,t){const n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function JI(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?YI(n,t):Array.isArray(n)?{}:HI(n,t):{}}async function ZI(e,t,n){try{const i=function(e,t,n){const i=Date.now(),{startTimestamp:s=i,endTimestamp:o=i,input:a,xhr:r}=t,{url:c,method:l,status_code:u=0,request_body_size:p,response_body_size:d}=e.data;if(!c)return null;if(!r||!KI(c,n.networkDetailAllowUrls)||KI(c,n.networkDetailDenyUrls)){return{startTimestamp:s,endTimestamp:o,url:c,method:l,statusCode:u,request:qI(p),response:qI(d)}}const m=r[OS],h=m?HI(m.request_headers,n.networkRequestHeaders):{},f=HI(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce((e,t)=>{const[n,i]=t.split(": ");return i&&(e[n.toLowerCase()]=i),e},{})}(r),n.networkResponseHeaders),[g,v]=n.networkCaptureBodies?BI(a):[void 0],[y,b]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return tI&&oI.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return tI&&oI.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return tI&&oI.warn("Failed to get xhr response body",...t),[void 0]}(r):[void 0],x=UI(h,p,g),_=UI(f,d,y);return{startTimestamp:s,endTimestamp:o,url:c,method:l,statusCode:u,request:v?$I(x,v):x,response:b?$I(_,b):_}}(e,t,n),s=zI("resource.xhr",i);NI(n.replay,s)}catch(e){tI&&oI.exception(e,"Failed to capture xhr breadcrumb")}}function XI(e,t){const{xhr:n,input:i}=t;if(!n)return;const s=DI(i),o=n.getResponseHeader("content-length")?FI(n.getResponseHeader("content-length")):function(e,t){try{return DI("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch(e){return}}(n.response,n.responseType);void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}function QI(e){const t=Yb();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:i,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:a}=e.getOptions(),r={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:i,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:a};t&&t.on("beforeAddBreadcrumb",(e,t)=>function(e,t,n){if(!t.data)return;try{(function(e){return"xhr"===e.category})(t)&&function(e){return e&&e.xhr}(n)&&(XI(t,n),ZI(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e&&e.response}(n)&&(!function(e,t){const{input:n,response:i}=t,s=DI(n?GI(n):void 0),o=i?FI(i.headers.get("content-length")):void 0;void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}(t,n),WI(t,n,e))}catch(e){tI&&oI.exception(e,"Error when enriching network breadcrumb")}}(r,e,t))}catch(e){}}function eO(e){const t=Yb();xS(qC(e)),kS(MI(e)),jI(e),QI(e);const n=PI(e);var i;i=n,Wb().addEventProcessor(i),t&&(t.on("beforeSendEvent",OI(e)),t.on("afterSendEvent",II(e)),t.on("createDsc",t=>{const n=e.getSessionId();if(n&&e.isEnabled()&&"session"===e.recordingMode){e.checkAndHandleExpiredSession()&&(t.replay_id=n)}}),t.on("spanStart",t=>{e.lastActiveSpan=t}),t.on("spanEnd",t=>{e.lastActiveSpan=t}),t.on("beforeSendFeedback",(t,n)=>{const i=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&i&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=i)}))}function tO(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:i}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:i}}}}const nO=dy.navigator;function iO(e){let t=!1;return(n,i)=>{if(!e.checkAndHandleExpiredSession())return void(tI&&oI.warn("Received replay event after session expired."));const s=i||!t;t=!0,e.clickDetector&&DC(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&s&&e.setInitialState(),!wI(e,n,s))return!0;if(!s)return!1;const t=e.session;if(function(e,t){if(!t||!e.session||0!==e.session.segmentId)return;wI(e,function(e){const t=e.getOptions();return{type:PE.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,s),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(tI&&oI.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&gI(t))}return t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0})}}async function sO({recordingData:e,replayId:t,segmentId:n,eventContext:i,timestamp:s,session:o}){const a=function({recordingData:e,headers:t}){let n;const i=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${i}${e}`;else{const t=(new TextEncoder).encode(i);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:r,errorIds:c,traceIds:l,initialTimestamp:u}=i,p=Yb(),d=Kb(),m=p&&p.getTransport(),h=p&&p.getDsn();if(!(p&&m&&h&&o.sampled))return Cb({});const f={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:s/1e3,error_ids:c,trace_ids:l,urls:r,replay_id:t,segment_id:n,replay_type:o.sampled},g=await async function({client:e,scope:t,replayId:n,event:i}){const s={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",i,s);const o=await C_(e.getOptions(),i,s,t,e,Wb());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata(),{name:r,version:c}=a&&a.sdk||{};return o.sdk={...o.sdk,name:r||"sentry.javascript.unknown",version:c||"0.0.0"},o}({scope:d,client:p,replayId:t,event:f});if(!g)return p.recordDroppedEvent("event_processor","replay",f),tI&&oI.info("An event processor returned `null`, will not send event."),Cb({});delete g.sdkProcessingMetadata;const v=function(e,t,n,i){return Xx(c_(e,r_(e),i,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(g,a,h,p.getOptions().tunnel);let y;try{y=await m.send(v)}catch(e){const t=new Error(lT);try{t.cause=e}catch(e){}throw t}if("number"==typeof y.statusCode&&(y.statusCode<200||y.statusCode>=300))throw new oO(y.statusCode);const b=J_({},y);if(Y_(b,"replay"))throw new aO(b);return y}class oO extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class aO extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function rO(e,t={count:0,interval:5e3}){const{recordingData:n,onError:i}=e;if(n.length)try{return await sO(e),!0}catch(n){if(n instanceof oO||n instanceof aO)throw n;if(L_("Replays",{_retryCount:t.count}),i&&i(n),t.count>=3){const e=new Error(`${lT} - max retries exceeded`);try{e.cause=n}catch(e){}throw e}return t.interval*=++t.count,new Promise((n,i)=>{IS(async()=>{try{await rO(e,t),n(!0)}catch(e){i(e)}},t.interval)})}}const cO="__THROTTLED";function lO(e,t,n){const i=new Map;let s=!1;return(...o)=>{const a=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;i.forEach((e,n)=>{n<t&&i.delete(n)})})(a),[...i.values()].reduce((e,t)=>e+t,0)>=t){const e=s;return s=!0,e?"__SKIPPED":cO}s=!1;const r=i.get(a)||0;return i.set(a,r+1),e(...o)}}class uO{constructor({options:e,recordingOptions:t}){uO.prototype.__init.call(this),uO.prototype.__init2.call(this),uO.prototype.__init3.call(this),uO.prototype.__init4.call(this),uO.prototype.__init5.call(this),uO.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let i,s,o;const a=n&&n.maxWait?Math.max(n.maxWait,t):0;function r(){return c(),i=e(),i}function c(){void 0!==s&&clearTimeout(s),void 0!==o&&clearTimeout(o),s=o=void 0}function l(){return s&&clearTimeout(s),s=IS(r,t),a&&void 0===o&&(o=IS(r,a)),i}return l.cancel=c,l.flush=function(){return void 0!==s||void 0!==o?r():i},l}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=lO((e,t)=>function(e,t,n){return SI(e,t)?kI(e,t,n):Promise.resolve(null)}(this,e,t),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:i}=this.getOptions(),s=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:i?i.join(","):""}:void 0;if(s&&(this.clickDetector=new RC(this,s)),tI){const t=e._experiments;oI.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(e){tI&&oI.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,i=t<=0&&n<=0;this._requiresManualStart=i,i||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",tI&&oI.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):tI&&oI.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(tI&&oI.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(tI&&oI.info("Buffering is in progress, call `flush()` to save the replay"));tI&&oI.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=_I({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(tI&&oI.info("Buffering is in progress, call `flush()` to save the replay"));tI&&oI.infoTick("Starting replay in buffer mode");const e=_I({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=SC({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:iO(this),.../iPhone|iPad|iPod/i.test(nO&&nO.userAgent||"")||/Macintosh/i.test(nO&&nO.userAgent||"")&&nO&&nO.maxTouchPoints&&nO.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{tI&&oI.info("Stopping Replay"+(t?` triggered by ${t}`:"")),LI(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,mI(this)}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),tI&&oI.info("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),tI&&oI.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();tI&&oI.info("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&yI(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${rT.location.pathname}${rT.location.hash}${rT.location.search}`,t=`${rT.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===cO){const e=FC({category:"replay.throttled"});this.addUpdate(()=>!wI(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastActiveSpan||Ox(),t=e&&Ix(e),n=(t&&_x(t).data||{})[Xb];if(t&&n&&["route","custom"].includes(n))return _x(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=pI({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=_I({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!xI(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{rT.document.addEventListener("visibilitychange",this._handleVisibilityChange),rT.addEventListener("blur",this._handleWindowBlur),rT.addEventListener("focus",this._handleWindowFocus),rT.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(eO(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const i=[];return["navigation","paint","resource"].forEach(e=>{i.push(Vk(e,n))}),i.push(qk(KC(YC,e)),zk(KC(ZC,e)),Uk(KC(XC,e)),Hk(KC(QC,e))),()=>{i.forEach(e=>e())}}(this)}_removeListeners(){try{rT.document.removeEventListener("visibilitychange",this._handleVisibilityChange),rT.removeEventListener("blur",this._handleWindowBlur),rT.removeEventListener("focus",this._handleWindowFocus),rT.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===rT.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=FC({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=FC({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{HC(this,e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;bI(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):tI&&oI.info("Document has become active, but session has expired")}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:PE.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=(t=this.performanceEntries,t.map(WC).filter(Boolean)).concat(this.replayPerformanceEntries);var t;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(RI(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(e){try{return Promise.all(RI(e,[tO(rT.performance.memory)]))}catch(e){return[]}}(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await rO({replayId:e,recordingData:s,segmentId:i,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=Yb();if(t){const n=e instanceof aO?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else tI&&oI.error("No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(tI&&oI.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const i=n<this._options.minReplayDuration,s=n>this._options.maxReplayDuration+5e3;if(i||s)return tI&&oI.info(`Session duration (${Math.floor(n/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),void(i&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&tI&&oI.info("Flushing initial segment without checkout.");const a=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,a&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&gI(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,i=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||i){const e=FC({category:"replay.mutations",data:{count:t,limit:i}});this._createCustomBreadcrumb(e)}return!i||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function pO(e,t){return[...e,...t].join(",")}const dO='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',mO=["content-length","content-type","accept"];let hO=!1;const fO=e=>new gO(e);class gO{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:i=36e5,stickySession:s=!0,useCompression:o=!0,workerUrl:a,_experiments:r={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:p=750,mutationLimit:d=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:g=[],networkCaptureBodies:v=!0,networkRequestHeaders:y=[],networkResponseHeaders:b=[],mask:x=[],maskAttributes:_=["title","placeholder"],unmask:w=[],block:k=[],unblock:S=[],ignore:T=[],maskFn:E,beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:O}={}){this.name=gO.id;const j=function({mask:e,unmask:t,block:n,unblock:i,ignore:s}){return{maskTextSelector:pO(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:pO(t,[]),blockSelector:pO(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:pO(i,[]),ignoreSelector:pO(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:x,unmask:w,block:k,unblock:S,ignore:T});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:E,maskInputFn:E,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:i,privacyOptions:s,value:o}){return i?s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o:o}({maskAttributes:_,maskAllText:c,privacyOptions:j,key:e,value:t,el:n}),...j,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(e){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(i,mT),stickySession:s,useCompression:o,workerUrl:a,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:p,mutationLimit:d,slowClickTimeout:m,slowClickIgnoreSelectors:h,networkDetailAllowUrls:f,networkDetailDenyUrls:g,networkCaptureBodies:v,networkRequestHeaders:vO(y),networkResponseHeaders:vO(b),beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:O,_experiments:r},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${dO}`:dO),this._isInitialized&&Lw())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return hO}set _isInitialized(e){hO=e}afterAllSetup(e){Lw()&&!this._replay&&(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay&&this._replay.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=function(e,t){const n=t.getOptions(),i={sessionSampleRate:0,errorSampleRate:0,...fb(e)},s=Hx(n.replaysSessionSampleRate),o=Hx(n.replaysOnErrorSampleRate);null==s&&null==o&&vy(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")});null!=s&&(i.sessionSampleRate=s);null!=o&&(i.errorSampleRate=o);return i}(this._initialOptions,e);this._replay=new uO({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch(e){}}}function vO(e){return[...mO,...e.map(e=>e.toLowerCase())]}gO.__initStatic();const yO=new WeakMap,bO=new Map,xO={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function _O(e,t){const{traceFetch:n,traceXHR:i,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:o,enableHTTPTimings:a,tracePropagationTargets:r}={traceFetch:xO.traceFetch,traceXHR:xO.traceXHR,trackFetchStreamPerformance:xO.trackFetchStreamPerformance,...t},c="function"==typeof o?o:e=>!0,l=e=>function(e,t){const n=Mw.location&&Mw.location.href;if(n){let i,s;try{i=new URL(e,n),s=new URL(n).origin}catch(e){return!1}const o=i.origin===s;return t?rb(i.toString(),t)||o&&rb(i.pathname,t):o}{const n=!!e.match(/^\/(?!\/)/);return t?rb(e,t):n}}(e,r),u={};n&&(e.addEventProcessor(e=>("transaction"===e.type&&e.spans&&e.spans.forEach(e=>{if("http.client"===e.op){const t=bO.get(e.span_id);t&&(e.timestamp=t/1e3,bO.delete(e.span_id))}}),e)),s&&function(e){const t="fetch-body-resolved";Oy(t,e),jy(t,()=>Cw(Iw))}(e=>{if(e.response){const t=yO.get(e.response);t&&e.endTimestamp&&bO.set(t,e.endTimestamp)}}),Ew(e=>{const t=xw(e,c,l,u);if(e.response&&e.fetchData.__span&&yO.set(e.response,e.fetchData.__span),t){const n=SO(e.fetchData.url),i=n?mw(n).host:void 0;t.setAttributes({"http.url":n,"server.address":i})}a&&t&&wO(t)})),i&&jS(e=>{const t=function(e,t,n,i){const s=e.xhr,o=s&&s[OS];if(!s||s.__sentry_own_request__||!o)return;const a=Nx()&&t(o.url);if(e.endTimestamp&&a){const e=s.__sentry_xhr_span_id__;if(!e)return;const t=i[e];return void(t&&void 0!==o.status_code&&(rx(t,o.status_code),t.end(),delete i[e]))}const r=SO(o.url),c=r?mw(r).host:void 0,l=!!Ox(),u=a&&l?h_({name:`${o.method} ${o.url}`,attributes:{type:"xhr","http.method":o.method,"http.url":r,url:o.url,"server.address":c,[tx]:"auto.http.browser",[ex]:"http.client"}}):new Dx;s.__sentry_xhr_span_id__=u.spanContext().spanId,i[s.__sentry_xhr_span_id__]=u,n(o.url)&&function(e,t){const{"sentry-trace":n,baggage:i}=ew({span:t});n&&function(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader("baggage",n)}catch(e){}}(e,n,i)}(s,Nx()&&l?u:void 0);return u}(e,c,l,u);a&&t&&wO(t)})}function wO(e){const{url:t}=_x(e).data||{};if(!t||"string"!=typeof t)return;const n=Vk("resource",({entries:i})=>{i.forEach(i=>{if(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}(i)&&i.name.endsWith(t)){const t=function(e){const{name:t,version:n}=aS(e.nextHopProtocol),i=[];if(i.push(["network.protocol.version",n],["network.protocol.name",t]),!bb)return i;return[...i,["http.request.redirect_start",kO(e.redirectStart)],["http.request.fetch_start",kO(e.fetchStart)],["http.request.domain_lookup_start",kO(e.domainLookupStart)],["http.request.domain_lookup_end",kO(e.domainLookupEnd)],["http.request.connect_start",kO(e.connectStart)],["http.request.secure_connection_start",kO(e.secureConnectionStart)],["http.request.connection_end",kO(e.connectEnd)],["http.request.request_start",kO(e.requestStart)],["http.request.response_start",kO(e.responseStart)],["http.request.response_end",kO(e.responseEnd)]]}(i);t.forEach(t=>e.setAttribute(...t)),setTimeout(n)}})})}function kO(e=0){return((bb||performance.timeOrigin)+e)/1e3}function SO(e){try{return new URL(e,Mw.location.origin).href}catch(e){return}}const TO={...y_,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...xO},EO=(e={})=>{Ax||(Ax=!0,Py(Lx),Ny(Lx));const{enableInp:t,enableLongTask:n,enableLongAnimationFrame:i,_experiments:{enableInteractions:s,enableStandaloneClsSpans:o},beforeStartSpan:a,idleTimeout:r,finalTimeout:c,childSpanTimeout:l,markBackgroundSpan:u,traceFetch:p,traceXHR:d,trackFetchStreamPerformance:m,shouldCreateSpanForRequest:h,enableHTTPTimings:f,instrumentPageLoad:g,instrumentNavigation:v}={...TO,...e},y=dS({recordClsStandaloneSpans:o||!1});t&&RS(),i&&dy.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?function(){const e=new PerformanceObserver(e=>{const t=Ox();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=oS(bb+n.startTime),{start_timestamp:i,op:s}=_x(t);if("navigation"===s&&i&&e<i)continue;const o=oS(n.duration),a={[tx]:"auto.ui.browser.metrics"},r=n.scripts[0],{invoker:c,invokerType:l,sourceURL:u,sourceFunctionName:p,sourceCharPosition:d}=r;a["browser.script.invoker"]=c,a["browser.script.invoker_type"]=l,u&&(a["code.filepath"]=u),p&&(a["code.function"]=p),-1!==d&&(a["browser.script.source_char_position"]=d),nS(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:a})}});e.observe({type:"long-animation-frame",buffered:!0})}():n&&Vk("longtask",({entries:e})=>{const t=Ox();if(!t)return;const{op:n,start_timestamp:i}=_x(t);for(const s of e){const e=oS(bb+s.startTime),o=oS(s.duration);"navigation"===n&&i&&e<i||nS(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[tx]:"auto.ui.browser.metrics"}})}}),s&&Vk("event",({entries:e})=>{const t=Ox();if(t)for(const n of e)if("click"===n.name){const e=oS(bb+n.startTime),i=oS(n.duration),s={name:eb(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[tx]:"auto.ui.browser.metrics"}},o=ib(n.target);o&&(s.attributes["ui.component_name"]=o),nS(t,e,e+i,s)}});const b={name:void 0,source:void 0};function x(e,t){const n="pageload"===t.op,i=a?a(t):t,s=i.attributes||{};t.name!==i.name&&(s[Xb]="custom",i.attributes=s),b.name=i.name,b.source=s[Xb];const u=b_(i,{idleTimeout:r,finalTimeout:c,childSpanTimeout:l,disableAutoFinish:n,beforeSpanEnd:e=>{y(),mS(e,{recordClsOnPageloadSpan:!o})}});function p(){["interactive","complete"].includes(Mw.document.readyState)&&e.emit("idleSpanEnableAutoFinish",u)}return n&&Mw.document&&(Mw.document.addEventListener("readystatechange",()=>{p()}),p()),u}return{name:"BrowserTracing",afterAllSetup(e){let n,i=Mw.location&&Mw.location.href;function o(){n&&!_x(n).timestamp&&(Bw&&yy.log(`[Tracing] Finishing current active span with op: ${_x(n).op}`),n.end())}e.on("startNavigationSpan",t=>{Yb()===e&&(o(),n=x(e,{op:"navigation",...t}))}),e.on("startPageLoadSpan",(t,i={})=>{if(Yb()!==e)return;o();const s=hx(i.sentryTrace||CO("sentry-trace"),i.baggage||CO("baggage"));Kb().setPropagationContext(s),n=x(e,{op:"pageload",...t})}),e.on("spanEnd",e=>{const t=_x(e).op;if(e!==Ix(e)||"navigation"!==t&&"pageload"!==t)return;const n=Kb(),i=n.getPropagationContext();n.setPropagationContext({...i,sampled:void 0!==i.sampled?i.sampled:wx(e),dsc:i.dsc||Ux(e)})}),Mw.location&&(g&&function(e,t,n){e.emit("startPageLoadSpan",t,n),Kb().setTransactionName(t.name);const i=Ox();i&&_x(i).op}(e,{name:Mw.location.pathname,startTime:bb?bb/1e3:void 0,attributes:{[Xb]:"url",[tx]:"auto.pageload.browser"}}),v&&kS(({to:t,from:n})=>{void 0===n&&i&&-1!==i.indexOf(t)?i=void 0:n!==t&&(i=void 0,function(e,t){Wb().setPropagationContext({traceId:Lb()}),Kb().setPropagationContext({traceId:Lb()}),e.emit("startNavigationSpan",t),Kb().setTransactionName(t.name);const n=Ox();n&&_x(n).op}(e,{name:Mw.location.pathname,attributes:{[Xb]:"url",[tx]:"auto.navigation.browser"}}))})),u&&(Mw&&Mw.document?Mw.document.addEventListener("visibilitychange",()=>{const e=Ox();if(!e)return;const t=Ix(e);if(Mw.document.hidden&&t){const e="cancelled",{op:n,status:i}=_x(t);Bw&&yy.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),i||t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Bw&&yy.warn("[Tracing] Could not set up background tab detection due to lack of global document")),s&&function(e,t,n,i){let s;const o=()=>{const o="ui.action.click",a=Ox(),r=a&&Ix(a);if(r){const e=_x(r).op;if(["navigation","pageload"].includes(e))return void(Bw&&yy.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`))}s&&(s.setAttribute(nx,"interactionInterrupted"),s.end(),s=void 0),i.name?s=b_({name:i.name,op:o,attributes:{[Xb]:i.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n}):Bw&&yy.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`)};Mw.document&&addEventListener("click",o,{once:!1,capture:!0})}(r,c,l,b),t&&function(){const e=({entries:e})=>{const t=Ox(),n=t&&Ix(t);e.forEach(e=>{if(!function(e){return"duration"in e}(e)||!n)return;const t=e.interactionId;if(null!=t&&!PS.has(t)){if(LS.length>10){const e=LS.shift();PS.delete(e)}LS.push(t),PS.set(t,n)}})};Vk("event",e),Vk("first-input",e)}(),_O(e,{traceFetch:p,traceXHR:d,trackFetchStreamPerformance:m,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:h,enableHTTPTimings:f})}}};function CO(e){const t=(n=`meta[name=${e}]`,Qy.document&&Qy.document.querySelector?Qy.document.querySelector(n):null);var n;return t?t.getAttribute("content"):void 0}const IO=e=>{L_("ROARContext",e)};let OO=!0;const jO=async(e,t,n,i,s=!0)=>{const o=t,a=await e.getStimulusDurationMs(),r=a+300;if(OO=!0,setTimeout(()=>{e.disableReplayBtn()},a+110),s)for(const e of o.children)e.classList.add("lev-staggered-responses","lev-staggered-disabled","lev-staggered-grayscale","lev-staggered-opacity");return new Promise(t=>{setTimeout(()=>{AO(0,Array.from(null==o?void 0:o.children),n,e,t,i)},r)})},AO=(e,t,n,i,s,o)=>{var a;const r=null===(a=Uc().nextStimulus)||void 0===a?void 0:a.itemId;if(!OO||o&&o!==r)return;t[e].classList.remove("lev-staggered-grayscale","lev-staggered-opacity");let c=AM.audio[_r(n[e])];c||(console.error("Audio Asset not available for:",n[e]),c=AM.audio.nullAudio);const l={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{var a;const r=null===(a=Uc().nextStimulus)||void 0===a?void 0:a.itemId;if(OO&&(!o||o===r))if(e+1===(null==t?void 0:t.length)){for(const e of t)e.classList.remove("lev-staggered-disabled");i.enableReplayBtn(),null==s||s()}else AO(e+1,t,n,i,s,o)}};Bg.playAudio(c,l)};function LO(e,t,n,i,s){const o=document.querySelectorAll(".practice-btn");o.forEach((a,r)=>{const c=t?"touchend":"click";a.addEventListener(c,t=>{!function(e,t,n,i,s,o,a){var r;const c=Array.prototype.indexOf.call(n,e),l=s[c],u=(null==l?void 0:l.toString())===t,p={restrictRepetition:{enabled:!1,maxRepetitions:2}},d="mental-rotation"===Uc().task&&Uc().heavyInstructions&&"2D"==(null===(r=Uc().nextStimulus)||void 0===r?void 0:r.trialType)?"mentalRotationFeedbackIncorrectDownex":"feedbackTryAgain";if(u)e.classList.add("success-shadow"),setTimeout(()=>Fg.finishTrial({response:l,incorrectPracticeResponses:Uc().incorrectPracticeResponses,button_response:i}),o?3e3:1e3),Bg.stopAndDisconnectNode(),o?o():Bg.playAudio(AM.audio.feedbackGoodJob,p);else{e.classList.add("error-shadow"),setTimeout(()=>{n.forEach(e=>e.disabled=!1)},500);let t=Uc().incorrectPracticeResponses;t.push(l),Uc("incorrectPracticeResponses",t),Bg.stopAndDisconnectNode(),a?a():Bg.playAudio(AM.audio[d],p)}}(a,e,o,r,n,i,s)})})}function PO(e){return e.filter(e=>"test_response"===e.assessmentStage).length}function RO(e,t){const n={};for(let i=0;i<e.length;i++)Object.keys(e[i][t]).forEach(s=>{n[s]=e[i][t][s]});return n}function MO(e){const t={images:{},audio:{},video:{}};return t.audio=RO(e,"audio"),t.images=RO(e,"images"),t.video=RO(e,"video"),t}function NO(e,t,n,i){const s={images:{},audio:{},video:{}};return["images","audio","video"].forEach((o,a)=>{const r=o;let c=[t,n,i][a];c=c.map(e=>_r(e)),s[r]=Object.keys(e[r]).filter(e=>c.includes(_r(e))).reduce((t,n)=>(t[n]=e[r][n],t),{})}),s}function DO(e,t,n,i=["audioFile"]){const s=[],o={audio:[],images:[]};return t.forEach(t=>{let a=[];t.forEach(e=>{i.forEach(t=>{const n=e[t];if(void 0!==n&&0!==n.length)if("string"==typeof n)a.push(_r(n));else{const e=n.map(e=>_r(e));a.push(...e)}})});let r=[];t.forEach(e=>{n.forEach(t=>{const n=e[t];if(void 0!==n&&0!==n.length)if("string"==typeof n)r.push(_r(n));else{const e=n.map(e=>_r(e));r.push(...e)}})}),r=[...new Set(r)],r=r.filter(e=>!o.images.includes(e)),a=a.filter(e=>!o.audio.includes(e)),o.audio.push(...a),o.images.push(...r);const c=NO(e,r,a,[]);s.push(c)}),s}function FO(e,t){const n=[];let i=0,s=0;return e.forEach(e=>{0===i?n.push([e]):n[s].push(e),i++,i>=t&&(i=0,s++)}),n}function BO(e,t){const n=MO(e),i=Object.keys(t.images).filter(e=>!Object.keys(n.images).includes(e)),s=Object.keys(t.audio).filter(e=>!Object.keys(n.audio).includes(e)),o=Object.keys(t.video).filter(e=>!Object.keys(n.video).includes(e));return NO(t,i,s,o)}function $O(){const e=document.querySelector(".primary");null!=e&&(e.disabled=!0)}function zO(){const e=document.querySelector(".primary");null!=e&&(e.disabled=!1)}function qO(){document.querySelectorAll("button").forEach(e=>{e.disabled&&(e.disabled=!1)})}function UO(e,t){const n=e.pop();if(n)return HO(n,t),e}function HO(e,t){e instanceof Array?e.forEach(e=>{e.style.animation="none",e.offsetHeight,e.style.animation=t}):(e.style.animation="none",e.offsetHeight,e.style.animation=t)}function VO(e,t,n,i=0,s=0,o,a=!1){const r=()=>{var n;const r=1e3,c=t.getBoundingClientRect(),l=c.left,u=c.top;let p;if(o){p=t.cloneNode(!0),p.id="animated-target",p.style.position="absolute",p.style.transition="opacity 1000ms ease",p.style.opacity="1",p.style.left=`${l}px`,p.style.top=`${u}px`,t.style.transition="opacity 1000ms ease",t.classList.add("image-grayed-out");(null!==(n=t.parentElement)&&void 0!==n?n:document.body).appendChild(p)}else p=t,p.style.position="absolute",p.style.transition="opacity 1000ms ease";const d=()=>{const t=e.getBoundingClientRect(),n=t.left+t.width*i,o=t.top+t.height*s;p.style.left=`${n}px`,p.style.top=`${o}px`};p.style.opacity="0",setTimeout(()=>{d(),requestAnimationFrame(()=>{p.style.opacity="1"})},r),window.setTimeout(()=>{a&&(e.children[0].src=AM.images.blackBackground,p.style.zIndex="10")},2e3),window.addEventListener("resize",d)};(()=>{const i="origin"===n?t.getBoundingClientRect():e.getBoundingClientRect(),s=document.createElement("img");s.src=AM.images.pointingHand,s.style.position="absolute",s.style.width=.7*i.width+"px",s.style.height="auto",s.style.left=`${i.left+i.width/4}px`,s.style.top=`${i.top+i.height/4}px`,s.style.pointerEvents="none",s.style.zIndex="20",s.style.animation="pulse 2s 1",document.body.appendChild(s),window.setTimeout(()=>{r()},2e3),window.setTimeout(()=>{s.remove()},4e3)})()}const KO=["something-same-1"],WO=["test_response","first_response","second_response","third_response","fourth_response"];function GO(){Fg.data.get().filterCustom(e=>!KO.includes(e.corpusTrialType)&&WO.includes(e.assessment_stage)).last(10).filter({correct:!1}).count()>6&&vv()}function YO(e){if(0===e.length)return void("theory-of-mind"===Uc().task&&Uc("currentStoryGroup",Uc().currentStoryGroup+1));const t=Uc().sequentialTrials,n=e[0];Uc("nextStimulus",n);const i=t.filter(e=>e.itemId!==n.itemId);Uc("sequentialTrials",i)}const JO=e=>{if(!e)return!1;const t=e.toLowerCase();return"en"===t||t.startsWith("en-")},ZO=(e=!1)=>{let t=Fg.data.get().filter({assessment_stage:"test_response"}).last(4).filter({correct:!1});e&&(t=t.filter({trialMode:"input"}));return t.count()>=2&&JO(Uc().language)};function XO(e,t,n=Bv){if(!Og){const i=document.createElement("div");i.classList.add("arrow-key-border"),i.style.position="absolute",i.style.inset="0",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",e.style.position="relative";const s=document.createElement("p");s.innerHTML=n[t][1],s.style.textAlign="center",s.style.margin="0",i.appendChild(s),e.appendChild(i)}}let QO=null;function ej(){if(null!=document.querySelector(".experimenter-button-container")||!Uc().experimenterButtons)return;const e=document.createElement("div");e.className="experimenter-button-container",e.innerHTML=`\n <button class="utility" id="menu" state="closed">\n ${Kv}\n </button>\n <button class="utility transparent" id="exit" style="display: none;">\n ${Uv}\n </button>\n <button class="utility transparent" id="pause" style="display: none;">\n ${Hv}\n </button>\n `,document.body.appendChild(e);const t=document.getElementById("pause");null==t||t.addEventListener("click",()=>{!function(){null!=Uc().taskTimer&&(clearTimeout(Uc().taskTimer),Uc("taskTimer",null));Uc("taskTimerPauseBeganAt",Date.now()),null==QO||QO.onPause();const e=document.getElementById("play-button");null==e||e.addEventListener("click",()=>{!function(){Uc("isPaused",!1),function(){var e;const t=Uc().taskTimerPauseBeganAt;"number"==typeof t&&(Uc("taskTimerPausedMs",(null!==(e=Uc().taskTimerPausedMs)&&void 0!==e?e:0)+(Date.now()-t)),Uc("taskTimerPauseBeganAt",null))}();const e=6e4*Math.max(Number(Uc().maxTime),1),t=Math.max(0,e-Sv()),n=setTimeout(()=>{Uc("maxTimeReached",!0),clearTimeout(n)},t);Uc("taskTimer",n);Array.from(document.querySelectorAll("button")).forEach(e=>{e.disabled=!1}),Bg.stopAndDisconnectNode();const i=document.getElementById("replay-btn-revisited");i&&!i.disabled&&(i.click(),i.disabled=!0)}()}),Bg.stopAndDisconnectNode(),Uc("isPaused",!0)}()});const n=document.getElementById("exit");null==n||n.addEventListener("click",()=>{!function(){!function(){const e=document.getElementById("exit-confirmation-popup");e&&(e.style.display="block")}();const e=document.getElementById("exit-confirmation-popup-buttons").querySelectorAll("button");e[0].addEventListener("click",()=>{document.body.innerHTML="",Uc("taskComplete",!0),Fg.endExperiment()}),e[1].addEventListener("click",()=>{!function(){const e=document.getElementById("exit-confirmation-popup");e&&(e.style.display="none")}();const e=document.getElementById("menu"),t=document.getElementById("exit"),n=document.getElementById("pause");t.style.display="none",n.style.display="none",e.classList.remove("open"),e.setAttribute("state","closed")})}()});const i=document.getElementById("menu");null==i||i.addEventListener("click",()=>{!function(e){const t=document.getElementById("exit"),n=document.getElementById("pause");"closed"===e.getAttribute("state")?(t.style.display="block",n.style.display="block",e.classList.add("open"),e.setAttribute("state","open")):(t.style.display="none",n.style.display="none",e.classList.remove("open"),e.setAttribute("state","closed"))}(i)}),QO=new Cg(4e3,Uc().translations),QO.init();const s=document.createElement("div");s.id="exit-confirmation-popup",s.classList.add("exit-confirmation-popup"),s.textContent=Uc().translations.generalConfirmExit||"Are you sure you want to exit the game?",s.style.display="none";const o=document.createElement("div");o.id="exit-confirmation-popup-buttons",o.classList.add("exit-confirmation-popup-buttons"),o.innerHTML=`\n <button class="primary small">${Uc().translations.yes||"Yes"}</button>\n <button class="primary small">${Uc().translations.no||"No"}</button>\n `,s.appendChild(o);const a=o.querySelectorAll("button"),r=a[0].getBoundingClientRect().width;a[0].style.width=r.toString()+"px",a[1].style.width=r.toString()+"px",document.body.appendChild(s)}function tj(){const e=document.getElementById("fullscreen");null==e||e.addEventListener("click",()=>{!function(){if(document.fullscreenElement)return;document.documentElement.requestFullscreen().catch(e=>{console.error(`Error enabling fullscreen: ${e.message}`)})}()}),document.addEventListener("fullscreenchange",()=>{e&&(document.fullscreenElement?e.style.visibility="hidden":e.style.visibility="visible")})}const nj={name:"html-slider-response",parameters:{stimulus:{type:gl.HTML_STRING,pretty_name:"Stimulus",default:void 0},min:{type:gl.INT,pretty_name:"Min slider",default:0},max:{type:gl.INT,pretty_name:"Max slider",default:100},slider_start:{type:gl.INT,pretty_name:"Slider starting value",default:50},step:{type:gl.INT,pretty_name:"Step",default:1},labels:{type:gl.HTML_STRING,pretty_name:"Labels",default:[],array:!0},slider_width:{type:gl.INT,pretty_name:"Slider width",default:null},button_label:{type:gl.STRING,pretty_name:"Button label",default:"Continue",array:!1},require_movement:{type:gl.BOOL,pretty_name:"Require movement",default:!1},prompt:{type:gl.HTML_STRING,pretty_name:"Prompt",default:null},stimulus_duration:{type:gl.INT,pretty_name:"Stimulus duration",default:null},trial_duration:{type:gl.INT,pretty_name:"Trial duration",default:null},response_ends_trial:{type:gl.BOOL,pretty_name:"Response ends trial",default:!0}}};class ij{constructor(e){this.jsPsych=e}trial(e,t){var n='<div id="jspsych-html-slider-response-wrapper" style="margin: 100px 0px;">';n+='<div id="jspsych-html-slider-response-stimulus">'+t.stimulus+"</div>",n+='<div class="jspsych-html-slider-response-container" style="position:relative; margin: 0 auto 3em auto; ',null!==t.slider_width?n+="width:"+t.slider_width+"px;":n+="width:auto;",n+='">',n+='<input type="range" class="jspsych-slider" value="'+t.slider_start+'" min="'+t.min+'" max="'+t.max+'" step="'+t.step+'" id="jspsych-html-slider-response-response"></input>',n+="<div>";for(var i=0;i<t.labels.length;i++){var s=100/(t.labels.length-1),o=i*(100/(t.labels.length-1));n+='<div style="border: 1px solid transparent; display: inline-block; position: absolute; left:calc('+o+"% - ("+s+"% / 2) - "+7.5*((o-50)/50*100)/100+"px); text-align: center; width: "+s+'%;">',n+='<span style="text-align: center; font-size: 80%;">'+t.labels[i]+"</span>",n+="</div>"}n+="</div>",n+="</div>",n+="</div>",null!==t.prompt&&(n+=t.prompt),n+='<button id="jspsych-html-slider-response-next" class="jspsych-btn" '+(t.require_movement?"disabled":"")+">"+t.button_label+"</button>",e.innerHTML=n;var a={rt:null,response:null};if(t.require_movement){const t=()=>{e.querySelector("#jspsych-html-slider-response-next").disabled=!1};e.querySelector("#jspsych-html-slider-response-response").addEventListener("mousedown",t),e.querySelector("#jspsych-html-slider-response-response").addEventListener("touchstart",t),e.querySelector("#jspsych-html-slider-response-response").addEventListener("change",t)}const r=()=>{this.jsPsych.pluginAPI.clearAllTimeouts();var n={rt:a.rt,stimulus:t.stimulus,slider_start:t.slider_start,response:a.response};e.innerHTML="",this.jsPsych.finishTrial(n)};e.querySelector("#jspsych-html-slider-response-next").addEventListener("click",()=>{var n=performance.now();a.rt=Math.round(n-c),a.response=e.querySelector("#jspsych-html-slider-response-response").valueAsNumber,t.response_ends_trial?r():e.querySelector("#jspsych-html-slider-response-next").disabled=!0}),null!==t.stimulus_duration&&this.jsPsych.pluginAPI.setTimeout(()=>{e.querySelector("#jspsych-html-slider-response-stimulus").style.visibility="hidden"},t.stimulus_duration),null!==t.trial_duration&&this.jsPsych.pluginAPI.setTimeout(r,t.trial_duration);var c=performance.now()}simulate(e,t,n,i){"data-only"==t&&(i(),this.simulate_data_only(e,n)),"visual"==t&&this.simulate_visual(e,n,i)}create_simulation_data(e,t){const n={stimulus:e.stimulus,slider_start:e.slider_start,response:this.jsPsych.randomization.randomInt(e.min,e.max),rt:this.jsPsych.randomization.sampleExGaussian(500,50,1/150,!0)},i=this.jsPsych.pluginAPI.mergeSimulationData(n,t);return this.jsPsych.pluginAPI.ensureSimulationDataConsistency(e,i),i}simulate_data_only(e,t){const n=this.create_simulation_data(e,t);this.jsPsych.finishTrial(n)}simulate_visual(e,t,n){const i=this.create_simulation_data(e,t),s=this.jsPsych.getDisplayElement();if(this.trial(s,e),n(),null!==i.rt){const e=s.querySelector("input[type='range']");setTimeout(()=>{this.jsPsych.pluginAPI.clickTarget(e),e.valueAsNumber=i.response},i.rt/2),this.jsPsych.pluginAPI.clickTarget(s.querySelector("button"),i.rt)}}}let sj,oj,aj,rj;function cj(e,t,n,i,s){sj=Br(s||(null==e?void 0:e.textContent)),oj=n,i||Fg.finishTrial()}ij.info=nj;const lj=(e,t,n)=>({type:ij,data:()=>({save_trial:!0,assessment_stage:(n||Uc().nextStimulus).assessmentStage,isPracticeTrial:"practice_response"===(n||Uc().nextStimulus).assessmentStage}),stimulus:()=>{const e=n||Uc().nextStimulus;let t=Uc().translations;const i="Number Line Slider"===e.trialType;return`\n <div class="lev-stimulus-container">\n ${Wv("replay-btn-revisited")}\n ${"Number Line Buttons"!==e.trialType?`<div class="lev-row-container instruction">\n <p>\n ${t[Ju(e.audioFile)]}\n ${i?"<br /> "+e.answer:""}\n </p> \n </div>`:""}\n </div>\n `},labels:()=>(n||Uc().nextStimulus).item,require_movement:()=>"Number Line Slider"===(n||Uc().nextStimulus).trialType,min:()=>(n||Uc().nextStimulus).item[0],max:()=>(n||Uc().nextStimulus).item[1],slider_start:()=>{const e=n||Uc().nextStimulus;if(e.trialType.includes("Slider")){const t=e.item[1];aj=function(e,t,n=.1){const i=t/e;let s=Math.random();for(;Math.abs(s-i)<n;)s=Math.random();return s*e}(t,e.answer)}else aj="Number Line 4afc"===e.trialType?e.answer:e.item[1];return aj},step:"any",post_trial_gap:()=>"practice_response"===(n||Uc().nextStimulus).assessmentStage?350:0,on_load:()=>{rj=performance.now();const t=n||Uc().nextStimulus,i=e[t.itemId];Uc("incorrectPracticeResponses",[]);const s=document.getElementById("jspsych-html-slider-response-response"),o=document.getElementsByTagName("span");Array.from(o).forEach((e,t)=>{e.style.fontSize="1.5rem"});const{buttonLayout:a}=Uc(),r="practice_response"===t.assessmentStage,c=e[t.itemId].response,l=Br(c.target);Uc("target",l),Uc("choices",c.values);const u=c.values;IO({itemId:t.itemId,taskName:t.task,pageContext:"sliderStimulus"});const p=document.getElementById("jspsych-html-slider-response-wrapper"),d=document.createElement("div");d.style.display="flex",d.style.justifyContent="center",d.style.alignItems="center";const m=document.createElement("div"),h=document.getElementsByClassName("jspsych-html-slider-response-container")[0];if("diamond"===a&&4===c.values.length?m.classList.add("lev-response-row-diamond-layout"):m.classList.add(...i.classOverrides.buttonContainerClassList),"Number Line 4afc"===t.trialType){const e=100*Number(s.value)/(Number(s.max)-Number(s.min));s.classList.add("number-line-4afc-slider"),s.disabled=!0,s.style.background=`linear-gradient(to right, #275BDD ${e}%, #edf0ed ${e}%)`,p.style.margin="0 0 2rem 0";const n=document.getElementById("jspsych-html-slider-response-next");n.disabled=!0,n.style.visibility="hidden";for(let e=0;e<u.length;e++){const n=document.createElement("div");n.style.margin="0px 8px";const i=document.createElement("button");i.textContent=u[e],window.Cypress&&Br(i.textContent)==l&&i.setAttribute("aria-label","correct"),i.classList.add("secondary"),"practice_response"===t.assessmentStage&&i.classList.add("practice-btn"),i.addEventListener("click",t=>cj(i,0,e,r)),n.appendChild(i),m.appendChild(n)}}else if("Number Line Slider"===t.trialType){const e=document.getElementById("jspsych-html-slider-response-next");e&&e.classList.add("primary");const t=document.getElementById("jspsych-html-slider-response-response");t.addEventListener("input",()=>sj=Number(t.value))}else{const e=document.getElementById("jspsych-html-slider-response-next");e.disabled=!0,e.style.visibility="hidden";const n=h.children[1].children;for(let e=0;e<n.length;e++)n[e].style.top="50px";const i=100*Number(s.value)/(Number(s.max)-Number(s.min));s.disabled=!0,s.style.background=`linear-gradient(to right, #275BDD ${i}%, #edf0ed ${i}%)`,s.classList.add("number-line-buttons"),u.forEach((e,n)=>{const i=document.createElement("button");"practice_response"===t.assessmentStage&&i.classList.add("practice-btn"),i.classList.add("slider"),i.style.position="absolute",i.style.top="-12px";const o=100/Number(s.max);i.style.left=`calc(${o*Number(e)}% - ${o/2}%)`,i.addEventListener("click",t=>cj(i,0,n,r,e)),h.appendChild(i)})}if(d.appendChild(m),p.appendChild(d),"string"!=typeof t.audioFile)throw new Error("Multiple audio files are not supported in this trial type");if(function(e){const t=AM.audio[Ju(e)]||"",n={restrictRepetition:{enabled:!0,maxRepetitions:2},onEnded:()=>{e&&(Gv(new _v(e,!0)),ej(),tj())}};Bg.playAudio(t,n)}(t.audioFile),r){const n=t.answer.toString(),i=null==e?void 0:e[t.itemId].response.values;LO(n,Og,i)}},on_finish:e=>{Bg.stopAndDisconnectNode();const i=n||Uc().nextStimulus,s="practice_response"===i.assessmentStage,o=performance.now(),a=Uc().runCat;"Number Line 4afc"===i.trialType||"Number Line Buttons"===i.trialType?e.correct=s?0===Uc().incorrectPracticeResponses.length:sj===Uc().target:e.correct=Math.abs(sj-i.answer)/i.item[1]<.05,Uc("isCorrect",e.correct),s||(e.correct?(Uc("numIncorrect",0),Uc.transact("totalCorrect",e=>e+1)):Uc.transact("numIncorrect",e=>e+1),a&&ay(i,e.correct));const r=sj,c=i.trialType.includes("Slider")?"slider":i.trialType.includes("4afc")?"button":"slider-button",l=i.answer;if(Fg.data.addDataToLastTrial({item:i.item,answer:l,response:Br(r),responseType:c,distractors:i.distractors,corpusTrialType:i.trialType,slider_start:aj,audioButtonPresses:Bg.replayPresses,itemUid:i.itemUid,audioFile:i.audioFile,corpus:Uc().corpus}),Uc().storeItemId&&Fg.data.addDataToLastTrial({itemId:i.itemId}),"test_response"===i.assessmentStage&&Uc.transact("testTrialCount",e=>e+1),"button"===c||"slider-button"===c){const e=Math.round(o-rj);Fg.data.addDataToLastTrial({rt:e,responseLocation:oj})}a||Zv(i.trialType),t&&GO()}}),uj=(e,t,n,i)=>{const{answer:s,distractors:o,trialType:a}=e,r=JSON.parse(JSON.stringify(Zr)),c=ry(e.item);if(r.isPracticeTrial="practice_response"===e.assessmentStage,r.isInstructionTrial="instructions"===e.trialType,r.showStimImage="instructions"===e.trialType||e.trialType.includes("Counting"),r.stimText={value:c,displayValue:void 0},r.inCorrectTrialConfig.onIncorrectTrial="skip",r.isInstructionTrial)r.classOverrides.buttonClassList=["primary"],"instructions"===e.trialType?r.classOverrides.stimulusContainerClassList=["lev-instructions-container"]:r.classOverrides.stimulusContainerClassList=["lev-row-container"];else{const t=ly(o),n=Dv(s.toString(),t,"Counting"===a?"no":"yes",a);r.prompt.enabled=!1,r.isImageButtonResponse="Non-symbolic Number Identification"===a||"Non-symbolic Number Comparison"===a,r.classOverrides.buttonClassList="Non-symbolic Number Identification"===a||"Non-symbolic Number Comparison"===a?["image-medium"]:"Counting"===a?["primary"]:["secondary"],r.response={target:n.target,displayValues:n.choices,values:n.originalChoices,targetIndex:n.correctResponseIdx},["Number Identification","Number Comparison","Counting","Counting AFC"].includes(e.trialType)||(r.stimText={value:c,displayValue:"Fraction"===e.trialType?Nv(c):c})}return{itemConfig:r,errorMessages:cy(r,n,t,e)}};const pj="replay-btn-revisited";let dj=0;const mj=[{prompt:"matrixReasoningInstruct1",image:"matrixExample",buttonText:"continueButtonText"}].map(e=>({type:Hg,stimulus:()=>{const t=Uc().translations,n=AM.images[e.image];return`<div class="lev-stimulus-container">\n ${Wv(pj)}\n <div class="lev-row-container instruction-small">\n <p>${t[e.prompt]}</p>\n </div>\n\n <div class="lev-stim-content-x-3">\n <img\n src=${n}\n alt="Image not loading: ${n}. Please continue the task."\n />\n </div>\n </div>`},prompt_above_buttons:!0,button_choices:["Next"],button_html:()=>[`<button class="primary">\n ${Uc().translations[e.buttonText]}\n </button>`],keyboard_choices:()=>"NO_KEYS",on_load:()=>{Bg.playAudio(AM.audio[e.prompt]);Gv(new _v(e.prompt,!0)),ej(),tj()},on_finish:()=>{Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses,assessment_stage:"instructions"})}})),hj={audio:["matrix-reasoning-instruct1-part1-downex","matrix-reasoning-instruct1-part2-downex","matrix-reasoning-instruct1-part3-downex","matrix-reasoning-instruct1-part4-downex"],choices:["orange-square","blue-circle","green-star","black-triangle"],image:"downexItem1"},fj={audio:["matrix-reasoning-prompt1-part1-downex","matrix-reasoning-instruct5-part1-downex","matrix-reasoning-instruct5-part2-downex","matrix-reasoning-prompt1-part2-downex"],choices:["orange-square","blue-circle","green-star","black-triangle"],image:["downexItem7","downexItem7Gif1","downexItem7Gif2"]},gj={audio:["matrix-reasoning-instruct2-part1-downex","matrix-reasoning-instruct2-part2-downex","matrix-reasoning-instruct2-part3-downex","matrix-reasoning-instruct2-part4-downex","matrix-reasoning-instruct2-part5-downex"],choices:["matrix-example-rsp1","matrix-example-rsp2","matrix-example-rsp3","black-square"],image:["matrixExampleDownex","matrixExampleGif1Downex","matrixExampleGif2Downex","matrixExampleGif3Downex"]};function vj(){const e=document.querySelector(".primary");null!=e&&(e.disabled=!1)}const yj={type:Hg,stimulus:()=>{const e=Uc().translations,t=AM.images[hj.image],n=hj.audio.map(t=>e[_r(t)]).join(" ");return`<div class="lev-stimulus-container">\n ${Wv(pj)}\n <div class="lev-row-container instruction-small">\n <p>${n}</p>\n </div>\n\n <div id="stim-container" class="lev-stim-content-x-2">\n <img\n src=${t}\n alt="Image not loading: ${t}. Please continue the task."\n />\n </div>\n\n <div id="choices-container" class="lev-response-row multi-4" style="gap: 16px; margin-top: 16px">\n <button id="target" class="image no-pointer-events" disabled>\n <img src=${AM.images[_r(hj.choices[0])]} alt=${hj.choices[0]} />\n </button>\n <button class="image no-pointer-events" disabled>\n <img src=${AM.images[_r(hj.choices[1])]} alt=${hj.choices[1]} />\n </button>\n <button class="image no-pointer-events" disabled>\n <img src=${AM.images[_r(hj.choices[2])]} alt=${hj.choices[2]} />\n </button>\n <button class="image no-pointer-events" disabled>\n <img src=${AM.images[_r(hj.choices[3])]} alt=${hj.choices[3]} />\n </button>\n </div>\n </div>`},prompt_above_buttons:!0,button_choices:["Next"],button_html:()=>[`<button class="primary" disabled>${Uc().translations.continueButtonText}</button>`],keyboard_choices:()=>"NO_KEYS",on_load:async()=>{performance.now(),ej(),tj();const e=hj.audio,t=document.getElementById(pj);t&&t.addEventListener("click",()=>{const e=document.getElementById("animated-target");e&&e.remove(),null==a||a.classList.remove("image-grayed-out"),r()});const n=document.getElementById("stim-container"),i=null==n?void 0:n.querySelector("img"),s=document.getElementById("choices-container"),o=Array.from((null==s?void 0:s.querySelectorAll("button"))||[]),a=document.getElementById("target");async function r(){dj++;const n=dj;t&&(t.disabled=!0),a&&(a.style.position="",a.style.left="",a.style.top="",a.style.zIndex=""),$O();let s=[a,o,i];const r={restrictRepetition:{enabled:!1,maxRepetitions:2}};for(const[t,i]of e.slice(0,-1).entries()){const e=AM.audio[_r(i)]||AM.audio.nullAudio,o=2===t?2:0;if(n!==dj||Uc().isPaused)break;await new Promise(t=>{const n={...r,onEnded:()=>{setTimeout(()=>t(),2e3)}};s=UO(s,`pulse 2s ${o}s 2`),Bg.playAudio(e,n)})}const c=AM.audio[_r(e[e.length-1])]||AM.audio.nullAudio;if(i&&a&&!Uc().isPaused&&n===dj){VO(i,a,"origin",.5,.5,!0);const e={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{vj(),t&&(t.disabled=!1),bv(6e3,Uc().totalTrialCount)}};setTimeout(()=>Uc().isPaused?null:Bg.playAudio(c,e),5e3)}else t&&(t.disabled=!1)}r()},on_finish:()=>{Bg.stopAndDisconnectNode(),dj++,Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses,assessment_stage:"instructions"})}},bj=[{audio:"matrix-reasoning-instruct4-downex"},{audio:"matrix-reasoning-instruct3-downex"}].map(e=>({type:Hg,stimulus:()=>{const t=Uc().translations[_r(e.audio)];return`\n <div class="lev-stimulus-container">\n ${Wv(pj)}\n <div class="lev-row-container instruction">\n <p>${t}</p>\n </div>\n </div>\n `},prompt_above_buttons:!0,button_choices:["Next"],button_html:()=>[`<button class="primary" disabled>${Uc().translations.continueButtonText}</button>`],keyboard_choices:()=>"NO_KEYS",on_load:()=>{const t={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{vj(),bv(3e3,Uc().totalTrialCount)}};Bg.playAudio(AM.audio[_r(e.audio)],t);Gv(new _v(e.audio,!0)),ej(),tj()},on_finish:()=>{Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses,assessment_stage:"instructions"})}})),xj=bj[0],_j=bj[1],wj={type:Hg,stimulus:()=>{const e=Uc().translations,t=fj.audio.map(t=>e[_r(t)]).join(" ");return`<div class="lev-stimulus-container">\n ${Wv(pj)}\n <div class="lev-row-container instruction-small">\n <p>${t}</p>\n </div>\n\n <div id="stim-container" class="lev-stim-content-x-2">\n <img\n id="stim-image"\n src=${AM.images[fj.image[0]]}\n alt="Image not loading: ${AM.images[fj.image[0]]}. Please continue the task."\n />\n </div>\n </div>`},prompt_above_buttons:!0,button_choices:()=>fj.choices.map(e=>`<img src=${AM.images[_r(e)]} alt=${e} />`),button_html:()=>'<button class="image-matrix practice-btn"; disabled>%choice%</button>',keyboard_choices:()=>"NO_KEYS",on_load:async()=>{performance.now(),ej(),tj();const e=fj.audio,t=document.getElementById(pj);t&&t.addEventListener("click",()=>{r()});const n=document.getElementById("stim-container");Uc("incorrectPracticeResponses",[]);const i=document.getElementById("jspsych-html-multi-response-btngroup"),s=Array.from((null==i?void 0:i.querySelectorAll("button"))||[]),o=s.map(e=>e.querySelector("img")).findIndex(e=>(null==e?void 0:e.alt)===fj.choices[1]);let a;async function r(){dj++;const i=dj;t&&(t.disabled=!0);const o={restrictRepetition:{enabled:!1,maxRepetitions:2}};for(const[t,a]of e.entries()){const e=AM.audio[_r(a)],r=t>2?fj.image[0]:fj.image[t];if(i!==dj||Uc().isPaused)break;await new Promise(i=>{const a={...o,onEnded:()=>{setTimeout(()=>i(),2e3)}};if(n&&(n.innerHTML=`<img \n id="stim-image"\n src=${AM.images[r]} \n alt="Image not loading: ${AM.images[r]}. Please continue the task." \n />`),0===t){const e=document.getElementById("stim-image");e&&(e.style.animation="pulse 2s 0s 2")}3===t&&s.forEach(e=>{e.style.animation="none",e.offsetHeight,e.style.animation="pulse 2s 0s 2"}),Bg.playAudio(e,a)})}t&&(t.disabled=!1),qO()}-1!==o&&(a=s[o]),LO(fj.choices[1],Og,fj.choices,function(){Bg.stopAndDisconnectNode(),dj++,Bg.playAudio(AM.audio.feedbackRightOne)},function(){Bg.stopAndDisconnectNode(),dj++,a&&(a.style.animation="none",a.offsetHeight,a.style.animation="pulse 2s 0s 2"),Bg.playAudio(AM.audio.matrixReasoningFeedbackIncorrectDownex)}),r()},response_ends_trial:!1,on_finish:()=>{Bg.stopAndDisconnectNode(),dj++,Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses,assessment_stage:"practice_response"})}},kj={type:Hg,stimulus:()=>{const e=Uc().translations,t=gj.audio.map(t=>e[_r(t)]).join(" ");return`<div class="lev-stimulus-container">\n ${Wv(pj)}\n <div class="lev-row-container instruction-small">\n <p>${t}</p>\n </div>\n\n <div id="stim-container" class="lev-stim-content-x-3">\n <img\n src=${AM.images[gj.image[0]]}\n alt="Image not loading: ${AM.images[gj.image[0]]}. Please continue the task."\n />\n </div>\n </div>`},prompt_above_buttons:!0,button_choices:()=>gj.choices.map(e=>`<img src=${AM.images[_r(e)]} alt=${e} />`),button_html:()=>'<button class="image-matrix practice-btn" disabled>%choice%</button>',keyboard_choices:()=>"NO_KEYS",on_load:async()=>{performance.now(),ej(),tj();const e=gj.audio,t=document.getElementById(pj);t&&t.addEventListener("click",()=>{r()});const n=document.getElementById("stim-container");Uc("incorrectPracticeResponses",[]);const i=document.getElementById("jspsych-html-multi-response-btngroup"),s=Array.from((null==i?void 0:i.querySelectorAll("button"))||[]),o=s.map(e=>e.querySelector("img")).findIndex(e=>(null==e?void 0:e.alt)===gj.choices[2]);let a;async function r(){dj++;const i=dj;t&&(t.disabled=!0);const o={restrictRepetition:{enabled:!1,maxRepetitions:2}};for(const[t,a]of e.entries()){const e=AM.audio[_r(a)],r=t>3?gj.image[0]:gj.image[t];if(i!==dj||Uc().isPaused)break;await new Promise(i=>{const a={...o,onEnded:()=>{setTimeout(()=>i())}};4===t&&s.forEach(e=>e.style.animation="pulse 2s 0s 3"),n&&(n.innerHTML=`<img \n src=${AM.images[r]} \n alt="Image not loading: ${AM.images[r]}. Please continue the task." \n />`),Bg.playAudio(e,a)})}t&&(t.disabled=!1),qO()}-1!==o&&(a=s[o]),LO(gj.choices[2],Og,gj.choices,function(){Bg.stopAndDisconnectNode(),dj++,Bg.playAudio(AM.audio.feedbackRightOne)},function(){Bg.stopAndDisconnectNode(),dj++,a&&(a.style.animation="none",a.offsetHeight,a.style.animation="pulse 2s 0s 2"),Bg.playAudio(AM.audio.matrixReasoningFeedbackSmBlueDownex)}),r()},response_ends_trial:!1,on_finish:()=>{Bg.stopAndDisconnectNode(),dj++,Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses,assessment_stage:"practice_response"})}};let Sj,Tj=0;const Ej=(e,t,n)=>({type:Hg,data:()=>{const e=n||Uc().nextStimulus;let t="practice_response"===e.assessmentStage;return{save_trial:!0,assessment_stage:e.assessmentStage,isPracticeTrial:t}},stimulus:()=>{const e=n||Uc().nextStimulus,t=Uc().translations,i=AM.images[_r(e.item)];let s;const o=e.audioFile;return s="string"!=typeof o?o.map(e=>t[_r(e)]).join(" "):t[_r(o)],`<div class="lev-stimulus-container">\n ${Wv("replay-btn-revisited")}\n <div class="lev-row-container instruction-small">\n <p>${s}</p>\n </div>\n <div class="lev-stim-content-x-2">\n <img\n src=${i}\n alt="Image not loading: ${i}. Please continue the task."\n />\n </div>\n </div>`},prompt_above_buttons:!0,button_choices:()=>{const t=n||Uc().nextStimulus;return(null==e?void 0:e[t.itemId]).response.displayValues.map(e=>`<img src=${AM.images[_r(e)]} alt=${e} />`)},keyboard_choices:()=>"NO_KEYS",button_html:()=>{const t=n||Uc().nextStimulus,i=[...(null==e?void 0:e[t.itemId]).classOverrides.buttonClassList];return"practice_response"===t.assessmentStage&&i.push("practice-btn"),`<button class="${i.join(" ")}" ${"practice_response"===t.assessmentStage?"disabled":""}>\n %choice%\n </button>`},on_load:async()=>{Sj=performance.now();const i=n||Uc().nextStimulus,s=i.audioFile;ej(),tj();const o=document.getElementById("replay-btn-revisited");if(t)o&&o.addEventListener("click",()=>{p()});else{Gv(new _v(s,!0))}const a=document.querySelector(".lev-stim-content-x-2"),r=null==a?void 0:a.querySelector("img"),c=document.getElementById("jspsych-html-multi-response-btngroup"),l=Array.from((null==c?void 0:c.querySelectorAll("button"))||[]),u=null==e?void 0:e[i.itemId];async function p(){Tj++;const e=Tj;o&&(o.disabled=!0);let n=[l,r];const i={restrictRepetition:{enabled:!1,maxRepetitions:2}};if("string"==typeof s){const e=AM.audio[_r(s)]||AM.audio.nullAudio;Bg.playAudio(e)}else for(const[o,a]of s.entries()){const s=AM.audio[_r(a)]||AM.audio.nullAudio;if(e!==Tj||Uc().isPaused)break;await new Promise(e=>{const o={...i,onEnded:()=>{setTimeout(()=>e(),1e3)}};t&&"sdsYourTurn"!==_r(a)&&(n=UO(n,"pulse 2s 0s")),Bg.playAudio(s,o)})}o&&(o.disabled=!1),qO()}Uc("incorrectPracticeResponses",[]),LO(i.answer.toString(),Og,u.response.values,function(){Bg.stopAndDisconnectNode(),Tj++,Bg.playAudio(AM.audio.feedbackRightOne)},function(){Bg.stopAndDisconnectNode(),Tj++;const e=l.map(e=>e.querySelector("img")).findIndex(e=>(null==e?void 0:e.alt)===i.answer);if(-1!==e){const t=l[e];t.style.animation="none",t.offsetHeight,t.style.animation="pulse 2s 0s 2"}Bg.playAudio(AM.audio.matrixReasoningFeedbackIncorrectDownex,{restrictRepetition:{enabled:!0,maxRepetitions:2}})}),p()},on_finish:t=>{Bg.stopAndDisconnectNode(),Tj++;const i=n||Uc().nextStimulus,s=null==e?void 0:e[i.itemId],{corpus:o}=Uc();let a=null,r=null,c=null;if(s){const{response:e}=s;if(!e)throw new Error("Choices not defined in the config");c=t.button_response,a=e.values[c],r=e.target,t.correct=a===r}if(t.correct?"practice_response"!==i.assessmentStage&&(Uc.transact("totalCorrect",e=>e+1),Uc("numIncorrect",0)):"practice_response"!==i.assessmentStage&&Uc.transact("numIncorrect",e=>e+1),Fg.data.addDataToLastTrial({item:i.item,answer:r,distractors:i.distractors,corpusTrialType:i.trialType,responseType:"mouse",responseLocation:c,itemUid:i.itemUid,audioFile:i.audioFile,corpus:o,audioButtonPresses:Bg.replayPresses}),Uc().storeItemId&&Fg.data.addDataToLastTrial({itemId:i.itemId}),"practice_response"!==i.assessmentStage&&Fg.data.addDataToLastTrial({response:a}),"practice_response"===i.assessmentStage){const e=performance.now(),t=Math.round(e-Sj);Fg.data.addDataToLastTrial({rt:t})}"test_response"===i.assessmentStage&&Uc.transact("testTrialCount",e=>e+1)},response_ends_trial:()=>"practice_response"!==(n||Uc().nextStimulus).assessmentStage}),Cj=(e,t,n,i)=>{const{answer:s,distractors:o,trialType:a}=e,r=JSON.parse(JSON.stringify(Zr));if(r.isPracticeTrial="practice_response"===e.assessmentStage,r.isInstructionTrial="instructions"===e.trialType,r.stimText={value:ry(e.item),displayValue:void 0},r.classOverrides.promptClassList=["lev-row-container","instruction-small"],r.isInstructionTrial)r.classOverrides.buttonClassList=["primary"];else{r.classOverrides.buttonClassList=["image-matrix"];const e=ly(o),t=Dv(s.toString(),e,"yes",a);r.isImageButtonResponse=!0,r.response={target:t.target,displayValues:t.choices,values:t.originalChoices,targetIndex:t.correctResponseIdx}}return{itemConfig:r,errorMessages:cy(r,n,t,e)}};const Ij="replay-btn-revisited",Oj={restrictRepetition:{enabled:!0,maxRepetitions:2},onEnded:zO},jj={type:Hg,data:()=>({assessment_stage:"instructions"}),stimulus:()=>{const e=AM.video.mentalRotationExampleFit;return`\n <div class="lev-stimulus-container">\n ${Wv(Ij)}\n <video class="instruction-video" autoplay>\n <source src=${e} type="video/mp4"/>\n Video not loading: ${e}. Please continue the task.\n </video>\n </div>\n `},prompt_above_buttons:!0,button_choices:["Continue"],button_html:()=>`<button class="primary" disabled>${Uc().translations.continueButtonText}</button>`,keyboard_choices:"NO_KEYS",on_load:()=>{Bg.playAudio(AM.audio.mentalRotationTrainingInstruct3,Oj);Gv(new _v("mental-rotation-training-instruct3",!0)),ej(),tj()},on_finish:()=>{Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses})}},Aj={type:Hg,data:()=>({assessment_stage:"instructions"}),stimulus:()=>{const e=AM.video.mentalRotationExampleMisfit;return`\n <div class="lev-stimulus-container">\n ${Wv(Ij)}\n <video class="instruction-video" autoplay>\n <source src=${e} type="video/mp4"/>\n Video not loading: ${e}. Please continue the task.\n </video>\n </div>\n `},prompt_above_buttons:!0,button_choices:["Continue"],button_html:()=>`<button class="primary" id="ok-button" disabled>${Uc().translations.continueButtonText}</button>`,keyboard_choices:"NO_KEYS",on_load:()=>{Bg.playAudio(AM.audio.mentalRotationTrainingInstruct2,Oj);Gv(new _v("mental-rotation-training-instruct2",!0)),ej(),tj()},on_finish:()=>{Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses})}},Lj={type:Hg,data:()=>({assessment_stage:"instructions"}),stimulus:()=>{const e=AM.images.mentalRotationExample;return`\n <div class="lev-stimulus-container">\n ${Wv(Ij)}\n <img \n src=${e} \n class="instruction-video" \n alt="Image not loading: ${e}. Please continue the task."\n />\n </div>\n `},prompt_above_buttons:!0,button_choices:["Continue"],button_html:()=>`<button class="primary" disabled>${Uc().translations.continueButtonText}</button>`,keyboard_choices:"NO_KEYS",on_load:()=>{Bg.playAudio(AM.audio.mentalRotationInstruct1,Oj);Gv(new _v("mental-rotation-instruct1",!0)),ej(),tj()},on_finish:()=>{Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses})}},Pj={type:Hg,data:()=>({assessment_stage:"instructions"}),stimulus:()=>{const e=Uc().translations,t=Uc().heavyInstructions?e.mentalRotationInstruct3DDownex:e.mentalRotationInstruct3D;return`\n <div class="lev-stimulus-container">\n ${Wv(Ij)}\n <div class="lev-row-container instruction">\n <p>${t}</p>\n </div>\n </div>\n `},prompt_above_buttons:!0,button_choices:["Continue"],post_trial_gap:350,button_html:()=>`<button class="primary">${Uc().translations.continueButtonText}</button>`,keyboard_choices:"NO_KEYS",trial_ends_after_audio:!1,response_allowed_while_playing:!1,on_load:()=>{const e=Uc().heavyInstructions?"mentalRotationInstruct3DDownex":"mentalRotationInstruct3D";Bg.playAudio(AM.audio[e]);Gv(new _v(e,!0)),ej(),tj()},on_finish:()=>{Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses})}},Rj={type:Hg,data:()=>({assessment_stage:"instructions"}),stimulus:()=>{const e=Uc().translations.mentalRotationInstructPolygonDownex;return`\n <div class="lev-stimulus-container">\n ${Wv(Ij)}\n <div class="lev-row-container instruction">\n <p>${e}</p>\n </div>\n </div>\n `},prompt_above_buttons:!0,button_choices:["Continue"],post_trial_gap:350,button_html:()=>`<button class="primary">${Uc().translations.continueButtonText}</button>`,keyboard_choices:"NO_KEYS",trial_ends_after_audio:!1,response_allowed_while_playing:!1,on_load:()=>{const e="mentalRotationInstructPolygonDownex";Bg.playAudio(AM.audio[e]);Gv(new _v(e,!0)),ej(),tj()},on_finish:()=>{Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses})}},Mj=(e,t,n)=>{const{answer:i,distractors:s,trialType:o}=e,a=JSON.parse(JSON.stringify(Zr));if(a.isPracticeTrial="practice_response"===e.assessmentStage,a.isInstructionTrial="instructions"===e.trialType,a.stimText={value:ry(e.item),displayValue:void 0},a.isInstructionTrial)a.classOverrides.buttonClassList=["primary"];else{const e=ly(s),t=Dv(i.toString(),e,"no",o);a.isImageButtonResponse=!0,a.classOverrides.stimulusContainerClassList=["lev-stim-content"],a.classOverrides.buttonClassList=["image-large"],a.response={target:t.target,displayValues:t.choices,values:t.originalChoices,targetIndex:t.correctResponseIdx}}return{itemConfig:a,errorMessages:cy(a,n,t,e)}};const Nj="replay-btn-revisited";let Dj=0;const Fj=[{audio:["mental-rotation-instruct1-part1-downex","mental-rotation-instruct1-part2-downex"],choices:["Rp-000-silh","Rn-000-silh"],image:"Rp-000-gray",animations:[{item:"stim-image",animation:"pulse"}],eventOrder:["audio","animation","audio"]},{audio:["mental-rotation-instruct2-downex","mental-rotation-instruct3-downex"],choices:["Rp-000-silh","Rn-000-silh"],image:"Rp-000-gray",animations:[{item:"distractor",animation:"pulse"},{item:"distractor",animation:"drag"}],eventOrder:["audio","animation","animation","audio"]},{audio:["mental-rotation-instruct2-downex","mental-rotation-instruct4-downex"],choices:["Rp-000-silh","Rn-000-silh"],image:"Rp-000-gray",animations:[{item:"target",animation:"pulse"},{item:"target",animation:"drag"}],eventOrder:["audio","animation","animation","audio"]}].map(e=>({type:Hg,stimulus:()=>{const t=Uc().translations,n=AM.images[_r(e.image)],i=e.audio.map(e=>t[_r(e)]).join(" ");return`<div class="lev-stimulus-container">\n ${Wv(Nj)}\n <div class="lev-row-container instruction-small">\n <p>${i}</p>\n </div>\n\n <div id="stim-container" class="lev-stim-content"">\n <img\n id="stim-image"\n src=${n}\n alt="Image not loading: ${e.image}. Please continue the task."\n />\n </div>\n\n <div id="choices-container" class="lev-response-row multi-4" style="gap: 16px; margin-top: 16px">\n <button id="target" class="image-large no-pointer-events" disabled>\n <img src=${AM.images[_r(e.choices[0])]} alt=${e.choices[0]} />\n </button>\n <button id="distractor" class="image-large no-pointer-events" disabled>\n <img src=${AM.images[_r(e.choices[1])]} alt=${e.choices[1]} />\n </button>\n </div>\n </div>`},prompt_above_buttons:!0,button_choices:["Next"],button_html:()=>[`<button class="primary" disabled>${Uc().translations.continueButtonText}</button>`],keyboard_choices:()=>"NO_KEYS",on_load:async()=>{performance.now(),ej(),tj();const t=document.getElementById(Nj);function n(){var n;Dj++;const i=Dj;t&&(t.disabled=!0),$O();const s=document.getElementById("stim-container"),o=document.getElementById("stim-image");if(s&&o){const e=o.offsetHeight;s.style.minHeight=`${e}px`}const a=[...e.audio],r=[...e.animations],c=[...e.eventOrder];o&&(o.style.position="",o.style.left="",o.style.top="",o.style.zIndex="");const l=null===(n=document.getElementById("target"))||void 0===n?void 0:n.children[0];l&&(l.src=AM.images[_r(e.choices[0])]);const u={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{p()}};function p(){if(i!==Dj||Uc().isPaused)return;if(0===c.length)return zO(),bv(3e3,Uc().totalTrialCount),void(t&&(t.disabled=!1));const e=c.shift();if("audio"===e)Bg.playAudio(AM.audio[_r(a.shift())],u);else if("animation"===e){const e=r.shift();!function(e,t){if("pulse"==e)return HO(document.getElementById(t),"pulse 2s 0s");if("drag"==e){const e=document.getElementById("stim-image");VO(document.getElementById(t),e,"destination",0,0,!1,"target"===t)}}(e.animation,e.item),setTimeout(p,2e3)}}p()}t&&t.addEventListener("click",()=>{n()}),n()},on_finish:()=>{Bg.stopAndDisconnectNode(),Dj++,Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses,assessment_stage:"instructions"})}}));const Bj=Object.freeze({Heart:"heart",Flower:"flower"}),$j=Object.freeze({Left:"left",Right:"right"}),zj=$j,qj=Object.freeze({ArrowLeft:"arrowleft",ArrowRight:"arrowright",NoKeys:"NO_KEYS",AllKeys:"ALL_KEYS",SpaceBar:" ",Enter:"enter"}),Uj=Object.freeze({HeartsPractice:"practice_response",FlowersPractice:"practice_response",HeartsStimulus:"test_response",FlowersStimulus:"test_response",HeartsAndFlowersPractice:"practice_response",HeartsAndFlowersStimulus:"test_response"}),Hj=Object.freeze({HeartsPractice:"hearts",FlowersPractice:"flowers",HeartsStimulus:"hearts",FlowersStimulus:"flowers",HeartsAndFlowersPractice:"hearts and flowers",HeartsAndFlowersStimulus:"hearts and flowers"});function Vj(e,t){if(e!==Bj.Heart){if(e===Bj.Flower){if(t===$j.Left)return 1;if(t===$j.Right)return 0;throw new Error("Invalid stimulus side")}throw new Error("Invalid stimulus")}return t===$j.Left?0:t===$j.Right?1:void console.error("Invalid stimulus side")}const Kj=(e,t,n=void 0,i=void 0)=>{const s=t?"stimulus-left":"stimulus-right";let o='<div class="haf-stimulus-holder">';return o+=Wv(i,void 0!==i),n&&(o+=`\n <div class='lev-row-container instruction'>\n <p>\n ${n}\n </p>\n </div>\n `),o+=`\n <div class='haf-stimulus-container'>\n <div class='${s}'>\n <img src='${e}' alt="heart or flower"/>\n </div>\n </div>\n </div>\n `,o},Wj=(e=!1)=>{const t=Uc().inputCapability;return e?t?.touch?"heartsAndFlowersInstructButtonTouch":"heartsAndFlowersInstructKeyPress":t?.touch?"heartsAndFlowersInstructTouchscreen":"heartsAndFlowersInstructKeyboard"};let Gj,Yj=!1;function Jj(e=".jspsych-html-multi-response-button",t=!1){Yj=!1;const n=document.createElement("div");n.id="lev-toast-default",n.classList.add("lev-toast-default"),n.textContent=Uc().translations.heartsAndFlowersClickReminder,Uc().inputCapability.touch||document.body.appendChild(n),document.querySelectorAll(e).forEach(e=>{if("1"===e.dataset.hafTouchRouting)return;e.dataset.hafTouchRouting="1";let n=!1;e.addEventListener("touchend",t=>{t.touches.length>0||(t.cancelable&&t.preventDefault(),n=!0,e.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),n=!1)},{passive:!1}),e.addEventListener("click",i=>{n||i.isTrusted&&(t&&!e.dataset.hafActive||(!function(){if(Uc().inputCapability.touch)return;const e=document.getElementById("lev-toast-default");if(e&&!e.classList.contains("show")){if(e.classList.add("show"),!Yj){Yj=!0;const e=()=>{Bg.stopAndDisconnectNode(),window.removeEventListener("keydown",e)};window.addEventListener("keydown",e),Bg.playAudio(AM.audio.countdown3,{restrictRepetition:{enabled:!1,maxRepetitions:1},onEnded:()=>{window.removeEventListener("keydown",e),Bg.playAudio(AM.audio.toastAlert,{restrictRepetition:{enabled:!1,maxRepetitions:1},onEnded:()=>{window.removeEventListener("keydown",e)}})}})}Gj=setTimeout(()=>{e&&e.classList.remove("show")},3e3)}else e&&e.classList.contains("show")&&(clearTimeout(Gj),Gj=setTimeout(()=>{e&&e.classList.remove("show")},3e3))}(),i.preventDefault(),i.stopImmediatePropagation()))},!0)})}function Zj(e){const t=2===Uc().version;return{type:Hg,stimulus:()=>`<div class='haf-fixation-container'>\n <span class='fixation'>+</span>\n </div>\n ${Wv("replay-btn-revisited",!1)}\n `,on_load:()=>{document.getElementById("jspsych-html-multi-response-stimulus").classList.add("haf-parent-container"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("haf-parent-container"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("lev-response-row"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("linear-4");document.querySelectorAll(".jspsych-html-multi-response-button").forEach((e,t)=>{XO(e,t)}),t&&Jj(),ej(),tj()},button_choices:[$j.Left,$j.Right],keyboard_choices:qj.NoKeys,button_html:["\n <div class='response-container--small'>\n <button class='secondary--green'></button>\n </div>","<div class='response-container--small'>\n <button class='secondary--green'></button>\n </div>"],trial_duration:e,response_ends_trial:!1}}function Xj(e,t,n,i,s=void 0){const o=2===Uc().version;return{type:Hg,data:()=>({save_trial:!0,assessment_stage:t,corpus_trial_type:n,isPracticeTrial:e}),stimulus:()=>Kj(AM.images[Fg.timelineVariable("stimulus")],Fg.timelineVariable("position")<=.5),on_load:()=>{document.getElementById("jspsych-html-multi-response-stimulus").classList.add("haf-parent-container"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("haf-parent-container"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("lev-response-row"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("linear-4");document.querySelectorAll(".jspsych-html-multi-response-button").forEach((e,t)=>{XO(e,t)}),o&&Jj(),ej(),tj()},button_choices:[$j.Left,$j.Right],keyboard_choices:Og?qj.NoKeys:[qj.ArrowLeft,qj.ArrowRight],button_html:["\n <div class='response-container--small'>\n <button class='secondary--green'></button>\n </div>","<div class='response-container--small'>\n <button class='secondary--green'></button>\n </div>"],...o&&!e?{trial_duration:i}:{},on_finish:t=>{const a=Fg.timelineVariable("position"),r=Fg.timelineVariable("stimulus");let c,l;if(0===t.button_response||1===t.button_response)c=t.button_response;else if(t.keyboard_response===qj.ArrowLeft||t.keyboard_response===qj.ArrowRight)c=t.keyboard_response===qj.ArrowLeft?0:1;else if(o&&t.timedOut)c=null;else{const e=`Invalid response: ${t.button_response} or ${t.keyboard_response} in ${t}`;console.error(e)}if(0===a)l=$j.Left;else if(1===a)l=$j.Right;else{const e=`Invalid stimuluSide: ${t.button_response} or ${t.keyboard_response} in ${t}`;console.error(e)}const u=Vj(r,l);if(t.correct=u===c,o){const e={restrictRepetition:{enabled:!1,maxRepetitions:2}};Bg.playAudio(t.correct?AM.audio.coin:AM.audio.fail,e),GO()}else if(!e){t.correct?Uc("numIncorrect",0):Uc.transact("numIncorrect",e=>e+1);const e=Uc().maxIncorrect;Uc().numIncorrect==e&&vv()}Uc("isCorrect",t.correct),Uc("stimulus",r),Uc("stimulusSide",l);const p=`hf_${"hearts and flowers"===n?"heartsflowers":n}_`+r;Fg.data.addDataToLastTrial({item:r,answer:0===u?zj.Left:zj.Right,response:0===c?zj.Left:zj.Right,responseLocation:c,itemUid:p,presentationTime:o?i:null}),Uc.transact("testTrialCount",e=>e+1),s&&s(t)}}}const Qj=()=>Math.round(Math.random());function eA(e,t){if(t!==Bj.Heart&&t!==Bj.Flower){const e=`Invalid stimulusType: ${t} for buildSubtimelineVariables()`;throw console.error(e),new Error(e)}const n=[],i=Math.floor(e/4);for(let e=0;e<i;e++)n.push({stimulus:t,position:0}),n.push({stimulus:t,position:1}),n.push({stimulus:t,position:Qj()}),n.push({stimulus:t,position:Qj()});const s=e%4;return s>=1&&n.push({stimulus:t,position:0}),s>=2&&n.push({stimulus:t,position:1}),s>=3&&n.push({stimulus:t,position:Qj()}),n}function tA(e){const t=[{stimulus:Bj.Heart,position:0},{stimulus:Bj.Heart,position:1},{stimulus:Bj.Flower,position:0},{stimulus:Bj.Flower,position:1}],n=[];let i=[];for(let s=0;s<e;s++)0===i.length&&(i=Bc(t)),n.push(i.pop());return n}function nA(e,t,n,i,s){n||console.error("buildInstructionPracticeTrial: Missing prompt audio"),t||console.error("buildInstructionPracticeTrial: Missing prompt text");const o=2===Uc().version,a=Vj(e,i);let r=[];const c={type:Hg,stimulus:()=>Kj(AM.images[e],i===$j.Left,t,"replay-btn-revisited"),prompt_above_buttons:!0,on_start:()=>{Uc("stimulus",e),Uc("stimulusSide",i)},on_load:()=>{document.getElementById("jspsych-html-multi-response-stimulus").classList.add("haf-parent-container"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("haf-parent-container"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("lev-response-row"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("linear-4");const e=document.querySelectorAll(".secondary--green");2!==e.length&&console.error(`There are ${e.length} instead of 2 wrappers in the practice trials`);const t={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{if(e[a].style.animation="pulse 2s infinite",e.forEach((e,t)=>{e.disabled=!1,XO(e,t)}),o&&Jj(),!Og){const t=t=>{"ArrowLeft"===t.key?e[0].click():"ArrowRight"===t.key&&e[1].click()};window.addEventListener("keydown",t),r.push(()=>{window.removeEventListener("keydown",t)})}}};Bg.playAudio(n,t);Gv(new _v(s)),ej(),tj()},button_choices:[$j.Left,$j.Right],keyboard_choices:"NO_KEYS",button_html:["\n <div class='response-container--small'>\n <button class='secondary--green' disabled></button>\n </div>","<div class='response-container--small'>\n <button class='secondary--green' disabled></button>\n </div>"],on_finish:e=>{let t;if(Bg.stopAndDisconnectNode(),r.forEach(e=>e()),0===e.button_response||1===e.button_response)t=e.button_response;else if(e.keyboard_response===qj.ArrowLeft||e.keyboard_response===qj.ArrowRight)t=e.keyboard_response===qj.ArrowLeft?0:1;else{const t=`Invalid response: ${e.button_response} or ${e.keyboard_response} in ${e}`;console.error(t)}Uc("isCorrect",t===a),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses,assessment_stage:"practice_response"})}};return c}function iA(e,t,n=void 0){return sA(e,t,e,t,n)}function sA(e,t,n,i,s){Uc().version;const o="valid-answer-btn",a={IncorrectHeart:Uc().translations[e],CorrectHeart:Uc().translations[t],IncorrectFlower:Uc().translations[n],CorrectFlower:Uc().translations[i]},r={IncorrectHeart:e,CorrectHeart:t,IncorrectFlower:n,CorrectFlower:i};Object.entries(a).forEach(([e,t])=>{t||console.error(`buildPracticeFeedback: Missing feedback text for ${e}`)}),Object.entries(r).forEach(([e,t])=>{t||console.error(`buildPracticeFeedback: Missing feedback audio for ${e}`)});const c={type:Hg,stimulus:()=>{const e=Uc().stimulus;if(!(!1===Uc().isCorrect)){const e=Bj.Heart?a.CorrectHeart:a.CorrectFlower;return`\n <div class='haf-cr-container'>\n <img src='${AM.images.smilingFace}' />\n <p class='lev-text h4 primary'>${e}</p>\n </div>\n ${Wv("replay-btn-revisited",!1)}\n `}const t=AM.images[e],n=e===Bj.Heart?a.IncorrectHeart:a.IncorrectFlower;return Kj(t,Uc().stimulusSide===$j.Left,n,!1)},prompt_above_buttons:!0,on_load:()=>{ej(),tj(),document.getElementById("jspsych-html-multi-response-stimulus").classList.add("haf-parent-container"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("haf-parent-container"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("lev-response-row"),document.getElementById("jspsych-html-multi-response-btngroup").classList.add("linear-4");document.querySelectorAll(".secondary--green").forEach((e,t)=>{e.id===o&&(e.style.animation="pulse 2s infinite"),XO(e,t)});const e=function(){const e=Uc().stimulus===Bj.Heart?"Heart":"Flower",t=!1===Uc().isCorrect?"Incorrect":"Correct";return r[`${t}${e}`]}(),t={restrictRepetition:{enabled:!0,maxRepetitions:2},onEnded:()=>{Fg.finishTrial()}};Bg.playAudio(AM.audio[e],t);Gv(new _v(e))},button_choices:[$j.Left,$j.Right],keyboard_choices:"NO_KEYS",button_html:()=>{if(!1===Uc().isCorrect){return 0===Vj(Uc().stimulus,Uc().stimulusSide)?[`\n <div class='response-container--small'>\n <button class='secondary--green' id='${o}' disabled></button>\n </div>\n `,"\n <div class='response-container--small'>\n <button class='secondary--green' disabled></button>\n </div>\n "]:["\n <div class='response-container--small'>\n <button class='secondary--green' disabled></button>\n </div>\n ",`\n <div class='response-container--small'>\n <button class='secondary--green' id='${o}' disabled></button>\n </div>\n `]}return"<button class='secondary--green' style='display: none;'></button>"},on_finish:e=>{Bg.stopAndDisconnectNode(),s&&s(e)}};return c}let oA,aA=[],rA=!1;function cA(){return 2===Uc().version}function lA(){return yA(AM.images.animalBodySq,()=>"heartsAndFlowersPracticeTime")}function uA(){return yA(AM.images.keepupSq,()=>"heartsAndFlowersInstruct1")}function pA(){return yA(AM.images.rocketSq,()=>"heartsAndFlowersInstruct2")}function dA(){return yA(AM.images.animalBodySq,()=>"heartsAndFlowersPlayTime")}function mA(){return yA(AM.images.animalBodySq,()=>"heartsAndFlowersInstruct4")}function hA(){return yA(AM.images.animalBodySq,()=>"heartsAndFlowersEnd")}function fA(){return yA(AM.images.animalBodySq,Wj)}function gA(){return yA(AM.images.animalBodySq,Wj,!0,"left")}function vA(){return yA(AM.images.animalBodySq,Wj,!0,"right")}function yA(e,t,n=!1,i=null){e||console.error("buildInstructionTrial: Missing mascot image"),t()||console.error("buildInstructionTrial: Missing prompt audio or text");const s={type:Hg,stimulus:()=>(oA={type:Uc().inputCapability?.touch||!cA()?"button":"bottomText",text:Uc().inputCapability?.touch||!cA()?"continueButtonText":"heartsAndFlowersPressAnyKey"},`\n <div class="lev-stimulus-container">\n ${Wv("replay-btn-revisited")}\n <div id="instruction-text" class="lev-row-container instruction-small">\n <p>${Uc().translations[n?t(!0):t()]}</p>\n </div>\n ${Uc().story?`\n <div class="lev-stim-content-x-3">\n <img src=${e} alt='Instruction graphic'/>\n </div>\n `:""}\n ${"bottomText"===oA.type?`<div class="lev-row-container header" ${n?'style="display: none;"':""}><p>${Uc().translations[oA.text]}</p></div>`:""}\n </div>\n `),prompt_above_buttons:!0,keyboard_choices:"NO_KEYS",button_choices:()=>"button"===oA.type?[Uc().translations[oA.text]]:void 0,button_html:()=>"button"===oA.type?['<button class="primary" disabled>%choice%</button>']:void 0,on_load:()=>{let e,s;if(rA=!1,n){if("button"===oA.type){$O();document.querySelector(".primary").style.display="none"}const t=document.createElement("div");t.classList.add("lev-response-row"),t.classList.add("linear-4"),t.innerHTML=`\n <div class='response-container--small'>\n <button class='secondary--green' ${"right"===i?'style="visibility: hidden" disabled':""}></button>\n </div>\n <div class='response-container--small'>\n <button class='secondary--green' ${"left"===i?'style="visibility: hidden" disabled':""}></button>\n </div>`;document.querySelector(".lev-stimulus-container").appendChild(t),e=t.querySelectorAll(".secondary--green"),s=(e,n,i)=>{(0===n&&"ArrowLeft"===i.key||1===n&&"ArrowRight"===i.key||"touchend"===i.type)&&(aA?.forEach(e=>{e?.()}),aA=[],Bg.playAudio(AM.audio.coin),e.classList.add("info-shadow"),setTimeout(()=>{e.classList.remove("info-shadow")},2e3),e.style.animation="none",t.style.visibility="hidden",setTimeout(()=>{Fg.finishTrial()},2e3))},cA()&&Jj(".secondary--green",!0)}else if(Uc().isRoarApp&&"bottomText"===oA.type&&"heartsAndFlowersPressAnyKey"===oA.text&&"heartsAndFlowersInstruct2"!==t()&&"heartsAndFlowersInstruct4"!==t()){const e=()=>{rA=!0,Bg.audioSource.onended=null,Bg.stopAndDisconnectNode(),Fg.finishTrial()};window.addEventListener("keydown",e),aA.push(()=>{window.removeEventListener("keydown",e)})}const o={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{if(!n){if("bottomText"===oA.type){const e=AM.audio[oA.text],t=e=>{(Uc().isRoarApp||" "===e.key)&&(rA||Fg.finishTrial(),Bg.stopAndDisconnectNode())};window.addEventListener("keydown",t),aA.push(()=>{window.removeEventListener("keydown",t)}),Bg.playAudio(e)}else zO();return}const t="left"===i?0:1,o=e[t];if(o.dataset.hafActive="1",o.style.animation="pulse 1s infinite",XO(o,t),Uc().inputCapability?.touch){const e=e=>{s(o,t,e)};o.addEventListener("touchend",e),aA.push(()=>{o.removeEventListener("touchend",e)})}else{const e=e=>{s(o,t,e)};window.addEventListener("keydown",e),aA.push(()=>{window.removeEventListener("keydown",e)})}}},a=t(!!n);Bg.playAudio(AM.audio[a]||AM.audio.inputAudioCue,o);Gv(new _v(a)),ej(),tj()},on_finish:()=>{aA?.forEach(e=>{e?.()}),aA=[],Bg.stopAndDisconnectNode(),"heartsAndFlowersEnd"===t()&&Uc("taskComplete",!0),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses,assessment_stage:"instructions"})}};return s}function bA(e,t){if(t!==Bj.Heart&&t!==Bj.Flower){const e=`Invalid type: ${t} for getHeartOrFlowerSubtimeline`;throw console.error(e),new Error(e)}const n=[];return n.push(...function(e,t){let n,i,s,o,a,r;if(AM.audio.heartInstruct1,t===Bj.Heart)n=$j.Left,i=Uc().translations.heartInstruct2,s=AM.audio.heartInstruct2,o=$j.Right,a=Uc().translations.heartPracticeFeedback1,r=AM.audio.heartPracticeFeedback1;else{if(t!==Bj.Flower){const e=`Invalid type: ${t} for getHeartOrFlowerInstructionsSection`;throw console.error(e),new Error(e)}n=$j.Right,i=Uc().translations.flowerInstruct2,s=AM.audio.flowerInstruct2,o=$j.Left,a=Uc().translations.flowerPracticeFeedback1,r=AM.audio.flowerPracticeFeedback1}const c=t===Bj.Heart?yA(AM.images.animalBodySq,()=>"heartInstruct1"):yA(AM.images.animalBodySq,()=>"flowerInstruct1"),l=iA("heartsAndFlowersTryAgain","feedbackGoodJob"),u=nA(t,i,s,n,"heartInstruct2"),p=nA(t,a,r,o,"heartPracticeFeedback1"),d=[];return d.push(c,zg),d.push({timeline:[u,l],loop_function:()=>!1===Uc().isCorrect}),d.push({timeline:[p,l],loop_function:()=>!1===Uc().isCorrect}),d}(0,t)),n.push(...function(e,t){let n,i,s;if(t===Bj.Heart)n=Uj.HeartsPractice,i=Hj.HeartsPractice,s="heartPracticeFeedback2";else{if(t!==Bj.Flower){const e=`Invalid type: ${t} for getHeartOrFlowerPracticeSection`;throw console.error(e),new Error(e)}n=Uj.FlowersPractice,i=Hj.FlowersPractice,s="flowerPracticeFeedback2"}const o={timeline:[uA(),pA(),dA(),zg]};let a=0;const r=e=>{a=e.correct?a+1:0},c=t=>{a>=e.correctPracticeTrial&&Fg.endCurrentTimeline()},l=iA(s,"feedbackGoodJob",c),u=[];return u.push(lA(),zg),u.push({timeline:[Zj(e.interStimulusInterval),Xj(!0,n,i,e.stimulusPresentationTime,r),l],timeline_variables:eA(e.practiceTrialCount,t),randomize_order:!1}),u.push(o),u}(e,t)),n.push(...function(e,t){let n,i;if(t===Bj.Heart)n=Uj.HeartsStimulus,i=Hj.HeartsStimulus;else{if(t!==Bj.Flower){const e=`Invalid type: ${t} for getHeartOrFlowerTestSection`;throw console.error(e),new Error(e)}n=Uj.FlowersStimulus,i=Hj.FlowersStimulus}const s=[];return s.push({timeline:[Zj(e.interStimulusInterval),Xj(!1,n,i,e.stimulusPresentationTime)],timeline_variables:eA(e.testTrialCount,t),randomize_order:!1}),s}(e,t)),n}function xA(e){const t=iA("heartsAndFlowersTryAgain","feedbackGoodJob"),n=nA(Bj.Heart,Uc().translations.heartInstruct2,AM.audio.heartInstruct2,$j.Left,"heartInstruct2"),i=nA(Bj.Flower,Uc().translations.flowerInstruct2,AM.audio.flowerInstruct2,$j.Right,"flowerInstruct2"),s=[];return s.push(yA(AM.images.animalBodySq,()=>"heartsAndFlowersInstruct3")),s.push({timeline:[n,t],loop_function:e=>!1===Uc().isCorrect}),s.push({timeline:[i,t],loop_function:e=>!1===Uc().isCorrect}),s}function _A(e){return[{timeline:[Zj(e.interStimulusInterval),Xj(!1,Uj.HeartsAndFlowersStimulus,Hj.HeartsAndFlowersStimulus,e.stimulusPresentationTime)],timeline_variables:tA(e.testTrialCount),randomize_order:!1}]}const wA={name:"corsi-blocks",parameters:{sequence:{type:gl.INT,default:void 0,array:!0},blocks:{type:gl.COMPLEX,array:!0,default:[{y:80,x:45},{y:94,x:80},{y:70,x:20},{y:60,x:70},{y:50,x:35},{y:40,x:6},{y:45,x:94},{y:25,x:60},{y:6,x:47}],nested:{x:{type:gl.INT,default:void 0},y:{type:gl.INT,default:void 0}}},block_size:{type:gl.INT,default:12},display_width:{type:gl.STRING,default:"400px"},display_height:{type:gl.STRING,default:"400px"},prompt:{type:gl.STRING,default:null},mode:{type:gl.STRING,default:"display",options:["display","input"]},sequence_gap_duration:{type:gl.INT,default:250},sequence_block_duration:{type:gl.INT,default:1e3},pre_stim_duration:{type:gl.INT,default:500},response_animation_duration:{type:gl.INT,default:500},block_color:{type:gl.STRING,default:"#555"},highlight_color:{type:gl.STRING,default:"#ff0000"},correct_color:{type:gl.STRING,default:"#00ff00"},incorrect_color:{type:gl.STRING,default:"#ff0000"},disable_animation:{type:gl.BOOL,default:!1}}};class kA{constructor(e){this.jsPsych=e}trial(e,t){let n=`<style id="jspsych-corsi-css">\n #jspsych-corsi-stimulus { \n position: relative; \n width:${t.display_width}; \n height:${t.display_height};\n }\n .jspsych-corsi-block { \n background-color: ${t.block_color}; \n position: absolute; \n width: ${t.block_size}%; \n height: ${t.block_size}%;\n transform: translate(-50%, -50%);\n }\n #jspsych-corsi-prompt { \n position: absolute; \n text-align: center; \n width: ${t.display_width}; \n top: 100%; \n }\n #jspsych-corsi-prompt p { \n font-size: 18px; \n }\n ${"input"==t.mode?".jspsych-corsi-block { cursor: pointer; }":""}\n </style>`;n+='<div id="jspsych-corsi-stimulus">';for(let e=0;e<t.blocks.length;e++)n+=`<div class="jspsych-corsi-block" data-id="${e}" style="top:${t.blocks[e].y}%; left:${t.blocks[e].x}%;"></div>`;null!=t.prompt&&(n+=`<div id="jspsych-corsi-prompt"><p>${t.prompt}</p></div>`),n+="</div>",e.innerHTML=n;const i=performance.now(),s={sequence:t.sequence,response:[],rt:[],blocks:t.blocks,correct:null},o=()=>{e.innerHTML="",this.jsPsych.finishTrial(s)},a=function(e,t){const n=performance.now(),i=(e,t,s)=>{performance.now()-s>=t?e():window.requestAnimationFrame(()=>i(e,t,n))};window.requestAnimationFrame(()=>i(e,t,n))};if("display"==t.mode){let n=0,i="pre-stim";const s=()=>{if("pre-stim"==i)a(s,t.pre_stim_duration),i="sequence";else if("sequence"==i){const r=e.querySelector(`.jspsych-corsi-block[data-id="${t.sequence[n]}"]`);n<t.sequence.length&&(r.style.backgroundColor=t.highlight_color,a(s,t.sequence_block_duration),i="iti"),n==t.sequence.length&&o()}else if("iti"==i){e.querySelector(`.jspsych-corsi-block[data-id="${t.sequence[n]}"]`).style.backgroundColor=t.block_color,n++,a(s,t.sequence_gap_duration),i="sequence"}};window.requestAnimationFrame(s)}if("input"==t.mode){const n=[{backgroundColor:t.block_color},{backgroundColor:t.correct_color,offset:.2},{backgroundColor:t.block_color}],a=[{backgroundColor:t.block_color},{backgroundColor:t.incorrect_color,offset:.2},{backgroundColor:t.block_color}],l={duration:t.response_animation_duration,iterations:1},u=r=>{if(null!==s.correct)return;const c=Math.round(performance.now()-i);s.response.push(parseInt(r)),s.rt.push(c);const u=parseInt(r)==t.sequence[s.response.length-1];u&&!t.disable_animation?e.querySelector(`.jspsych-corsi-block[data-id="${r}"]`).animate(n,l):u||t.disable_animation||e.querySelector(`.jspsych-corsi-block[data-id="${r}"]`).animate(a,l),s.response.length==t.sequence.length&&(s.correct=u,setTimeout(o,t.response_animation_duration))};for(var r=e.querySelectorAll(".jspsych-corsi-block"),c=0;c<r.length;c++)r[c].addEventListener("click",e=>{u(e.target.getAttribute("data-id"))})}}}function SA({numOfBlocks:e,sequenceLength:t,previousSequence:n=null}){const i=[];for(let s=0;s<t;s++){const t=Math.floor(Math.random()*e);0==s&&n&&n[n.length-1]===t?s--:i[i.length-1]!==t?i.push(t):s--}return i}function TA(e){const t=e.querySelector(".corsi-cursor-image");t&&t.remove()}function EA(e,t){e.style.pointerEvents="auto",e.style.opacity="1",e.style.cursor="pointer",e.style.backgroundColor=" #ffffffcc",t&&function(e,t){if("cursor"===t){const t=AM.images.cursor;"relative"!==e.style.position&&"absolute"!==e.style.position&&"fixed"!==e.style.position&&(e.style.position="relative"),TA(e);const n=document.createElement("img");n.src=t,n.className="corsi-cursor-image",n.style.position="absolute",n.style.top="50%",n.style.left="50%",n.style.transform="translate(-50%, -50%)",n.style.pointerEvents="none",n.style.zIndex="10",n.style.animation="pulse 2s infinite",e.appendChild(n)}else"pulse"===t&&(e.style.animation="pulse 2s infinite",e.style.backgroundColor="#275BDD")}(e,t)}function CA(e){e.style.pointerEvents="none",e.style.opacity="0.5",e.style.cursor="not-allowed",e.style.backgroundColor="rgba(215, 215, 215, 0.93)",TA(e),e.style.animation="none"}kA.info=wA;const IA=(e,t,n)=>{let i;return i="input"===e?t?"backward":"forward":t?"backward-training":"forward-training",i+="-"+n,i};function OA(e,t){const n=t?Uc().heavyInstructions?"memoryGameInstruct11Downex":"memoryGameBackwardPrompt":Uc().heavyInstructions?"memoryGameInstruct8Downex":"memoryGameInput",i=Uc().heavyInstructions?"memoryGameInstruct7Downex":"memoryGameDisplay";return"display"===e?i:n}let jA,AA,LA=2,PA=[],RA=0;const MA="#8CAEDF",NA="#f00",DA=["memoryGameInstruct9Downex","memoryGameInstruct7Downex","memoryGameInstruct9Downex","memoryGameInstruct7Downex","memoryGameInstruct8Downex","memoryGameInstruct7Downex","memoryGameInstruct5Downex","memoryGameInstruct4Downex","memoryGameInstruct3Downex","memoryGameInstruct2Downex"];function FA({mode:e,reverse:t=!1,isPractice:n=!1,resetSeq:i=!1,customSeqLength:s,animation:o,prompt:a}){return{type:kA,sequence:()=>{if("display"===e){const e=Number(Uc().numOfBlocks);let t=SA({numOfBlocks:e,sequenceLength:s||LA,previousSequence:AA});for(;Wf(t,AA);)t=SA({numOfBlocks:e,sequenceLength:s||LA,previousSequence:AA});AA=t}return AA&&"input"===e&&t?[...AA].reverse():AA},blocks:()=>{if("display"===e){const{numOfBlocks:e,blockSize:t,gridSize:n}=Uc();jA=function({x:e,y:t,numOfBlocks:n,blockSize:i,gridSize:s,blockSpacing:o}){const a=[],r=s,c=n/s;for(let n=0;n<r;n++)for(let s=0;s<c;s++){const r=e+s*(i+o),c=t+n*(i+o);a.push({x:r,y:c})}return a}({x:20,y:20,numOfBlocks:e,blockSize:t,gridSize:n,blockSpacing:.5})}return jA},mode:e,block_size:()=>Uc().blockSize,block_color:"display"===e?"rgba(215, 215, 215, 0.93)":" #ffffffcc",highlight_color:"#275BDD",correct_color:()=>MA,incorrect_color:()=>n?NA:MA,post_trial_gap:1===s?2e3:1e3,data:{save_trial:!0,assessment_stage:n?"practice_response":"test_response",isPracticeTrial:n,trialMode:e},sequence_block_duration:1===s?2e3:1e3,disable_animation:"input"===e,pre_stim_duration:()=>{if("input"===e)return 500;let i;const s=OA(e,t);i=Uc().heavyInstructions&&!t&&n&&DA[DA.length-1]||s;const o=Uc().displayPromptDurations[i];return null!=o&&Number.isFinite(o)?1e3*o:3e3},on_load:()=>{!function(e,t,n,i,s){const o=document.getElementById("jspsych-corsi-stimulus");o.id="",o.classList.add("lev-corsi-override");const a=Uc().gridSize;o.style.gridTemplateColumns=`repeat(${a}, 1fr)`,o.style.gridTemplateRows=`repeat(${a}, 1fr)`;const r=Uc().translations;if(!t){const t=document.getElementById("lev-toast-default");if("input"===e&&!t){const e=document.createElement("div");e.id="lev-toast-default",e.classList.add("lev-toast-default"),e.textContent=r.generalEncourage,document.body.appendChild(e)}}const c=document.getElementsByClassName("jspsych-corsi-block");let l;"input"===e&&AA&&(l=n?[...AA].reverse():AA);let u=0;const p=()=>{if(i&&"input"===e&&l)if(u<l.length){const e=l[u];setTimeout(()=>{Array.from(c).forEach((t,n)=>{n===e?EA(t,i):CA(t)})},1e3)}else setTimeout(()=>{Array.from(c).forEach(e=>{CA(e)})},1e3)};Array.from(c).forEach((n,s)=>{if(n.style.top="unset",n.style.left="unset",n.style.transform="none",n.style.position="unset",n.style.width="unset",n.style.height="unset",n.classList.add("lev-corsi-block-override"),n.classList.add(e),"input"===e){if(i&&l&&l.length>0){const e=l[0];s===e?EA(n,i):CA(n)}if(n.addEventListener("click",e=>{if(PA.push([e.clientX,e.clientY]),null!==l){const n=l[u],i=t&&s!==n?NA:MA;e.target.style.backgroundColor=i,Array.from(c).forEach((e,t)=>{s!==t&&(e.style.backgroundColor="#ffffffcc")}),setTimeout(()=>{e.target.style.backgroundColor="#ffffffcc"},1e3)}if(u++,i&&setTimeout(()=>{p()},50),!t){BA.length&&(BA.forEach(e=>clearTimeout(e)),BA=[]);const e=setTimeout(()=>{document.getElementById("lev-toast-default").classList.add("show")},1e4),t=setTimeout(()=>{document.getElementById("lev-toast-default").classList.remove("show")},13e3);BA.push(e),BA.push(t)}}),window.Cypress&&null!==AA){const e={correctAnswer:AA};window.cypressData=e}}});const d=document.getElementById("jspsych-content"),m=d.children[1],h=document.createElement("div");h.classList.add("lev-row-container","instruction");const f=document.createElement("p"),g=OA(e,n);let v;v=Uc().heavyInstructions&&!n&&t&&(s||DA.pop())||g;f.textContent=r[v],"display"===e&&(h.style.visibility="hidden");h.appendChild(f),d.insertBefore(h,m),function(e,t,n,i){if("input"===i){const n=document.createElement("div");n.innerHTML=Wv("replay-btn-revisited");const i=n.firstElementChild;e.insertBefore(i,t),i.querySelector("#replay-btn-revisited").disabled=!0,ej(),tj()}const s=AM.audio[n],o={restrictRepetition:{enabled:!0,maxRepetitions:2},onEnded:()=>{n&&Gv(new _v(n,!0))}};Bg.playAudio(s,o)}(d,h,v,e)}(e,n,t,o,a)},on_finish:o=>{Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses}),i&&(LA=2);const a=Uc().gridSize;Uc().heavyInstructions;const r="mg_"+(t?"backward_":"forward_")+a+"grid_len"+(s||LA);"input"===e?(Fg.data.addDataToLastTrial({correct:Wf(o.response,o.sequence),selectedCoordinates:PA,corpusTrialType:IA(e,t,a),responseLocation:o.response,itemUid:r,audioFile:t?"memory-game-backward-prompt":"memory-game-input"}),Uc("isCorrect",o.correct),o.correct&&!n&&(RA++,3!==RA||s||(LA++,RA=0)),o.correct||n||(Uc.transact("numIncorrect",e=>e+1),RA=0),Uc().numIncorrect===Uc().maxIncorrect&&(t?vv():(LA=2,Uc("testTrialCount",21))),PA=[],Uc().numOfBlocks,n||(BA.forEach(e=>clearTimeout(e)),BA=[],Uc.transact("testTrialCount",e=>e+1))):Fg.data.addDataToLastTrial({correct:!1,audioFile:"memory-game-display"})}}}let BA=[];let $A=!1;const zA=[{prompt:"memoryGameInstruct1",image:"catAvatar",buttonText:"continueButtonText"},{prompt:"memoryGameInstruct6Downex",image:"catAvatar",buttonText:"continueButtonText"},{prompt:"memoryGameInstruct10Downex",image:"catAvatar",buttonText:"continueButtonText"},{prompt:"heartsAndFlowersEncourage2",image:"rocket@2x",buttonText:"continueButtonText"},{prompt:"heartsAndFlowersPlayTime",image:"catAvatar",buttonText:"continueButtonText"},{prompt:"memoryGameInstruct1",image:"catAvatar",buttonText:"continueButtonText"},{prompt:"memoryGameInstruct2",image:"highlightedBlock",buttonText:"continueButtonText"},{prompt:"memoryGameInstruct3",video:"selectSequence",buttonText:"continueButtonText"},{prompt:"memoryGameInstruct4",image:"catAvatar",buttonText:"continueButtonText"},{prompt:"memoryGameInstruct5",image:"catAvatar",buttonText:"continueButtonText"},{prompt:"memoryGameInstruct6",image:"catAvatar",buttonText:"continueButtonText"},{prompt:"memoryGameBackwardPrompt",video:"selectSequenceReverse",buttonText:"continueButtonText"}].map(e=>({type:Hg,stimulus:()=>{const t=Uc().translations,n=e.video?AM.video[e.video]:AM.images[e.image];return`<div class="lev-stimulus-container">\n ${Wv("replay-btn-revisited")}\n <div class="lev-row-container instruction">\n <p>${t[e.prompt]}</p>\n </div>\n <div class="lev-stim-content-x-3">\n ${e.video?`\n <video class='instruction-video-small' autoplay loop>\n <source src=${AM.video[e.video]} type='video/mp4'>\n </video>\n `:Uc().story||"catAvatar"!==e.image?`\n <img\n src=${AM.images[e.image]}\n alt="Image not loading ${n}. Please continue the task."\n />\n `:""}\n </div> \n </div>`},prompt_above_buttons:!0,button_choices:e.buttonText?["Next"]:[],button_html:()=>{const t=Uc().translations;if(e.buttonText)return[`<button class="primary">\n ${t[e.buttonText]}\n </button>`]},keyboard_choices:"NO_KEYS",post_trial_gap:500,on_load:async()=>{const t={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{e.buttonText||Fg.finishTrial()}};Bg.playAudio(AM.audio[e.prompt],t);Gv(new _v(e.prompt,!0)),ej(),tj();const n=document.getElementById("lev-toast-default");if(n&&n.classList.remove("show"),!$A){$A=!0;const e=JO(Uc().language)?{memoryGameInstruct7Downex:await Bg.getAudioDuration(AM.audio.memoryGameInstruct7Downex),memoryGameDisplay:await Bg.getAudioDuration(AM.audio.memoryGameDisplay),memoryGameInstruct2Downex:await Bg.getAudioDuration(AM.audio.memoryGameInstruct2Downex),memoryGameInstruct4Downex:await Bg.getAudioDuration(AM.audio.memoryGameInstruct4Downex)}:{memoryGameDisplay:await Bg.getAudioDuration(AM.audio.memoryGameDisplay)};Uc("displayPromptDurations",e)}},on_finish:()=>{Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses,assessment_stage:"instructions"})}})),qA=zA.pop(),UA=zA.pop(),HA=zA.pop(),VA=zA.slice(5,9),KA=zA.slice(0,5),WA=(e,t,n)=>{const i=[FA({mode:"display",isPractice:!0,reverse:e}),FA({mode:"input",isPractice:!0,reverse:e}),gv(!0,"feedbackCorrect",t,!0)],s=[];for(let e=0;e<n;e+=1)s.push(...i);return s},GA=(e,t)=>({timeline:[...WA(e,t,2),FA({mode:"display",isPractice:!0,reverse:e}),FA({mode:"input",isPractice:!0,reverse:e}),{timeline:[gv(!0,"feedbackCorrect",t,!0)],conditional_function:()=>Uc().isCorrect}],conditional_function:()=>!Uc().isCorrect});Uc().translations;const YA=["dataQuestionnaireButtonText1","dataQuestionnaireButtonText2","dataQuestionnaireButtonText3"],JA={type:Hg,data:()=>({assessment_stage:"assessor_questionaire"}),stimulus:'<div class="lev-row-container header">\n <p>Assessor Data Questionnaire</p>\n </div>\n <div class="lev-row-container instruction">\n <p>How would you rate the quality of the data for this task?</p>\n </div>\n <footer style="text-align: center; margin: 20px 0;">\n Note: This is NOT a question about how well the child performed. Instead, we want your impression of how well the child understood and actively participated in the task.\n </footer>',keyboard_choices:"NO_KEYS",button_choices:()=>YA,button_html:()=>{const e=Uc().translations;return YA.map(t=>`<button class="primary" style="font-size: 16px">${e[t]}</button>`)},on_load:()=>{document.getElementsByClassName("jspsych-content")[0].setAttribute("style","width: 80vw; max-width: 800px; padding: 20px; background-color: white");document.getElementById("jspsych-html-multi-response-btngroup").classList.add("lev-response-row","multi-stack")},on_finish:e=>{let t="";0===e.button_response?t="SERIOUS CONCERNS":1===e.button_response?t="OK":2===e.button_response&&(t="GOOD"),Fg.data.addDataToLastTrial({dataQuality:t});document.getElementsByClassName("jspsych-content")[0].setAttribute("style",""),vv()}},ZA={name:"audio-multi-response",parameters:{stimulus:{type:gl.HTML_STRING,pretty_name:"Stimulus",default:void 0},button_choices:{type:gl.STRING,pretty_name:"Button Choices",default:[],array:!0},keyboard_choices:{type:gl.KEYS,pretty_name:"Keyboard Choices",default:"NO_KEYS"},button_html:{type:gl.HTML_STRING,pretty_name:"Button HTML",default:'<button class="jspsych-btn">%choice%</button>',array:!0},prompt:{type:gl.HTML_STRING,pretty_name:"Prompt",default:null},prompt_above_buttons:{type:gl.BOOL,pretty_name:"Prompt above buttons",default:!1},trial_duration:{type:gl.INT,pretty_name:"Trial duration",default:null},margin_vertical:{type:gl.STRING,pretty_name:"Margin vertical",default:"0px"},margin_horizontal:{type:gl.STRING,pretty_name:"Margin horizontal",default:"8px"},response_ends_trial:{type:gl.BOOL,pretty_name:"Response ends trial",default:!0},trial_ends_after_audio:{type:gl.BOOL,pretty_name:"Trial ends after audio",default:!1},response_allowed_while_playing:{type:gl.BOOL,pretty_name:"Response allowed while playing",default:!0}}};class XA{constructor(e){this.jsPsych=e}trial(e,t,n){let i;var s=this.jsPsych.pluginAPI.audioContext();let o={rt:null,key:null,button:null,source:null};var a;this.jsPsych.pluginAPI.getAudioBuffer(t.stimulus).then(e=>{null!==s?(this.audio=s.createBufferSource(),this.audio.buffer=e,this.audio.connect(s.destination)):(this.audio=e,this.audio.currentTime=0),r()}).catch(e=>{console.error(`Failed to load audio file "${t.stimulus}". Try checking the file path. We recommend using the preload plugin to load audio files.`),console.error(e)});const r=()=>{t.trial_ends_after_audio&&this.audio.addEventListener("ended",c),t.response_allowed_while_playing||t.trial_ends_after_audio||(this.audio.addEventListener("ended",m),this.audio.addEventListener("ended",p));var i=[];if(Array.isArray(t.button_html))t.button_html.length==t.button_choices.length?i=t.button_html:console.error("Error in audio-multi-response plugin. The length of the button_html array does not equal the length of the choices array");else for(var o=0;o<t.button_choices.length;o++)i.push(t.button_html);let r='<div id="jspsych-audio-multi-response-btngroup">';for(o=0;o<t.button_choices.length;o++){var l=i[o].replace(/%choice%/g,t.button_choices[o]);r+='<div class="jspsych-audio-multi-response-button" style="cursor: pointer; display: inline-block; margin:'+t.margin_vertical+" "+t.margin_horizontal+'" id="jspsych-audio-multi-response-button-'+o+'" data-choice="'+o+'">'+l+"</div>"}r+="</div>",null!==t.prompt&&(t.prompt_above_buttons?r='<div id="jspsych-audio-multi-response-prompt">'+t.prompt+"</div>"+r:r+='<div id="jspsych-audio-multi-response-prompt">'+t.prompt+"</div>"),e.innerHTML=r,t.response_allowed_while_playing?(p(),m()):u(),a=performance.now(),null!==s?(a=s.currentTime,this.audio.start(a)):this.audio.play(),null!==t.trial_duration&&this.jsPsych.pluginAPI.setTimeout(()=>{c()},t.trial_duration),n()},c=()=>{this.jsPsych.pluginAPI.clearAllTimeouts(),null!==s?this.audio.stop():this.audio.pause(),this.audio.removeEventListener("ended",c),this.audio.removeEventListener("ended",m),this.audio.removeEventListener("ended",p),this.jsPsych.pluginAPI.cancelAllKeyboardResponses();const n={rt:o.rt,stimulus:t.stimulus,keyboard_response:o.key,button_response:o.button,response_source:o.source};e.innerHTML="",this.jsPsych.finishTrial(n),i()};function l(e){!function(e){var n=performance.now(),i=Math.round(n-a);null!==s&&(n=s.currentTime,i=Math.round(1e3*(n-a)));o.button=parseInt(e),o.rt=i,o.source="button",u(),t.response_ends_trial&&c()}(e.currentTarget.getAttribute("data-choice"))}function u(){for(var e=document.querySelectorAll(".jspsych-audio-multi-response-button"),t=0;t<e.length;t++){var n=e[t].querySelector("button");n&&(n.disabled=!0),e[t].removeEventListener("click",l)}}function p(){for(var e=document.querySelectorAll(".jspsych-audio-multi-response-button"),t=0;t<e.length;t++){var n=e[t].querySelector("button");n&&(n.disabled=!1),e[t].addEventListener("click",l)}}const d=e=>{null==o.key&&(o=Object.assign({source:"keyboard",button:null},e)),t.response_ends_trial&&c()},m=()=>{if("NO_KEYS"!=t.keyboard_choices){let e;e=null!==s?{rt_method:"audio",audio_context:s,audio_context_start_time:a}:{rt_method:"performance"},this.jsPsych.pluginAPI.getKeyboardResponse(Object.assign({callback_function:d,valid_responses:t.keyboard_choices,persist:!1,allow_held_key:!1},e))}};return new Promise(e=>{i=e})}simulate(e,t,n,i){"data-only"==t&&(i(),this.simulate_data_only(e,n)),"visual"==t&&this.simulate_visual(e,n,i)}create_simulation_data(e,t){const n={stimulus:e.stimulus,rt:this.jsPsych.randomization.sampleExGaussian(500,50,1/150,!0),keyboard_response:this.jsPsych.pluginAPI.getValidKey(e.keyboard_choices),button_response:null,response_source:"keyboard"},i={stimulus:e.stimulus,rt:this.jsPsych.randomization.sampleExGaussian(500,50,1/150,!0),button_response:this.jsPsych.randomization.randomInt(0,e.button_choices.length-1),keyboard_response:null,response_source:"button"},s=Math.random()<.5?n:i,o=this.jsPsych.pluginAPI.mergeSimulationData(s,t);return this.jsPsych.pluginAPI.ensureSimulationDataConsistency(e,o),o}simulate_data_only(e,t){const n=this.create_simulation_data(e,t);this.jsPsych.finishTrial(n)}simulate_visual(e,t,n){const i=this.create_simulation_data(e,t),s=this.jsPsych.getDisplayElement(),o=()=>{null!==i.rt&&(null!==i.button_response?this.jsPsych.pluginAPI.clickTarget(s.querySelector(`div[data-choice="${i.response}"] button`),i.rt):this.jsPsych.pluginAPI.pressKey(i.keyboard_response,i.rt))};this.trial(s,e,()=>{n(),e.response_allowed_while_playing?o():this.audio.addEventListener("ended",o)})}}XA.info=ZA;let QA,eL=[],tL=[],nL=[];const iL="info-shadow";function sL(e){const t=["gray","striped","black"];return e.some(e=>t.includes(e))||e.push("white"),e.some(e=>!isNaN(Number(e)))||e.splice(3,0,"1"),e}function oL(e,t,n){const i={size:0,color:1,shape:2,number:3,bgcolor:4};const s=function(e,t){const n={};for(const[e,s]of Object.entries(i))t.includes(e)||(n[e]=new Set);for(const t of e){const e=sL(t.split("-"));for(const[t,s]of Object.entries(n)){const n=i[t];void 0!==e[n]&&s.add(e[n])}}return Object.values(n).some(e=>1===e.size)}(e,n),o=function(e,t){if(!t||0===t.length)return!0;let n=!0;return t.forEach(t=>{(e[0]===t[0]&&e[1]===t[1]||e[1]===t[0]&&e[0]===t[1])&&(n=!1)}),n}(e,t);return s&&o}function aL(e){return"something-same-2"===e.trialType||"2-match"===e.trialType?["number","bgcolor"]:["size"]}const rL=e=>({type:XA,data:()=>{const t=e||Uc().nextStimulus;let n="practice_response"===t.assessmentStage;return{save_trial:"instructions"!==t.trialType,assessment_stage:t.assessmentStage,isPracticeTrial:n}},stimulus:()=>AM.audio.nullAudio,prompt:()=>{const t=_r((e||Uc().nextStimulus).audioFile),n=Uc().translations;return`<div class="lev-stimulus-container">\n ${Wv("replay-btn-revisited")}\n <div class="lev-row-container instruction">\n <p id="afc-match-prompt">${n[t]}</p>\n </div>\n </div>`},prompt_above_buttons:!0,button_choices:()=>{const t=e||Uc().nextStimulus;if("instructions"===t.assessmentStage)return["OK"];{const e=t.answser?"yes":"no",{choices:n}=Dv(t.answer,t.distractors,e);return(e=>e.map(e=>`<img src=${AM.images[_r(e)]} alt=${e} />`))(n)}},button_html:()=>`<button class="${"instructions"===(e||Uc().nextStimulus).assessmentStage?"primary":"image-medium"}">%choice%</button>`,on_load:()=>{var t,n;QA=performance.now();const i=e||Uc().nextStimulus,s="practice_response"===i.assessmentStage,o=i.audioFile;Bg.playAudio(AM.audio[_r(o)],{restrictRepetition:{enabled:!1,maxRepetitions:2}});Gv(new _v(o,!0)),ej(),tj();const a=document.getElementById("jspsych-audio-multi-response-btngroup"),r=Array.from(a.children).map(e=>e.firstChild).filter(e=>!!e);let c=0;if("instructions"!==i.trialType){if(2===Uc().version){const e={first_response:1,second_response:2,third_response:3,fourth_response:4}[i.assessmentStage],l=Number(i.trialType[0]);if(void 0!==e){const n=document.createElement("div");n.className="sds-progress-container",n.innerHTML=`\n ${zv.repeat(e)} ${qv.repeat(l-e)}\n `,n.style.marginTop="32px",null===(t=a.parentNode)||void 0===t||t.insertBefore(n,a.nextSibling)}const u=document.createElement("button");u.className="primary",u.textContent="OK",u.style.marginTop="16px",u.disabled=!0,u.addEventListener("click",()=>{if(!s||oL(eL,nL,aL(i)))c=0,Fg.finishTrial();else{document.getElementById("afc-match-prompt").textContent=`${Uc().translations.feedbackNotQuiteRight} ${Uc().translations[_r(o)]}`,c++;const e=c,t={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{e===c&&Bg.playAudio(AM.audio[_r(o)])}};if(Bg.stopAndDisconnectNode(),Bg.playAudio(AM.audio.feedbackNotQuiteRight,t),r.forEach(e=>e.classList.remove(iL)),eL=[],$O(),c>=2){let e=!1;const t=r.map(e=>{var t;return null===(t=null==e?void 0:e.firstChild)||void 0===t?void 0:t.alt});for(let n=0;n<t.length&&!e;n++){const i=t[n];for(let s=n+1;s<t.length;s++){if(oL([i,t[s]],nL,["number","bgcolor"])){r[n].style.animation="pulse 2s infinite",r[s].style.animation="pulse 2s infinite",e=!0;break}}}}}}),null===(n=a.parentNode)||void 0===n||n.insertBefore(u,a.nextSibling)}5===r.length?a.classList.add("lev-response-row-inline","grid-3x2"):a.classList.add("lev-response-row","multi-4"),r.forEach((e,t)=>e.addEventListener("click",async n=>{var s;const o=null===(s=null==e?void 0:e.firstChild)||void 0===s?void 0:s.alt;if(e){if(e.classList.contains(iL)?(e.classList.remove(iL),eL.splice(eL.indexOf(o),1),tL.splice(tL.indexOf(t),1)):(e.classList.add(iL),eL.push(o),tL.push(t)),2===Uc().version)eL.length===i.requiredSelections?zO():$O();else{const e=i.requiredSelections;eL.length===e&&setTimeout(()=>Fg.finishTrial(),500)}setTimeout(()=>{r.forEach(e=>e.removeAttribute("disabled"))},500)}}))}iv(i)},response_ends_trial:()=>"instructions"===(e||Uc().nextStimulus).trialType&&2===Uc().version,on_finish:()=>{const t=e||Uc().nextStimulus,n=Uc().runCat,i=performance.now()-QA;Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({corpusTrialType:t.trialType,answer:t.answer||null,response:eL,distractors:t.distractors,item:t.item,rt:Math.round(i),audioButtonPresses:Bg.replayPresses,responseLocation:tL,itemUid:t.itemUid,audioFile:t.audioFile,corpus:Uc().corpus}),Uc().storeItemId&&Fg.data.addDataToLastTrial({itemId:t.itemId}),"prompt1"===t.audioFile.split("-")[2]&&(nL=[]);const s=oL(eL,nL,aL(t));if(Uc("isCorrect",s),!1===s?Uc.transact("numIncorrect",e=>e+1):Uc("numIncorrect",0),Fg.data.addDataToLastTrial({correct:s}),nL.push(eL),eL=[],tL=[],"test_response"===t.assessmentStage&&Uc.transact("testTrialCount",e=>e+1),Uc().numIncorrect>=Uc().maxIncorrect&&!Uc().heavyInstructions&&!n&&vv(),n){GO(),ay(t,s);const e=Uc().sequentialTrials.filter(e=>e.trialNumber===t.trialNumber&&e.trialType===t.trialType);YO(e)}}}),cL="replay-btn-revisited";let lL,uL=[],pL=null,dL=null,mL="";const hL="info-shadow",fL=e=>e.map(e=>`<img src=${AM.images[_r(e)]} alt=${e} />`);function gL(e){e.forEach(e=>e.removeAttribute("disabled"))}const vL=e=>({type:Hg,data:()=>{const t=e||Uc().nextStimulus;let n="practice_response"===t.assessmentStage;return{save_trial:"instructions"!==t.assessmentStage,assessment_stage:t.assessmentStage,isPracticeTrial:n}},stimulus:()=>{const t=e||Uc().nextStimulus;return t.trialType.includes("something-same")?function(e){const t=Uc().translations,n="something-same-1"==e.trialType?e.image[0]:e.image,i="something-same-2"===e.trialType?`<p>${t[_r(e.audioFile[0])]}</p>`:"",s="something-same-2"===e.trialType?`<p>${t[_r(e.audioFile[1])]}</p>`:`<p>${t[_r(e.audioFile)]}</p>`,o=`\n <button class='image-medium no-pointer-events' style="${"something-same-1"==e.trialType?"visibility: hidden;":""}">\n <img src=${AM.images[_r(n)]} alt=${n} />\n </button>\n `,a=e.answer?"yes":"no",{choices:r}=Dv(e.answer,e.distractors,a),c=`\n ${("something-same-1"==e.trialType?e.image.map(e=>`<img src=${AM.images[_r(e)]} alt=${e} />`):fL(r)).map(t=>`<button class='image-medium ${"something-same-1"===e.trialType?"no-pointer-events":""}' style='margin: 0 4px'>\n ${t}\n </button>`).join("")}\n `;return`\n <div class="lev-stimulus-container-wide">\n ${Wv(cL)}\n <div class="horizontal-wrapper">\n ${"something-same-2"===e.trialType?'<div class="lev-row-container instruction-half-screen" id="left-prompt">':'<div class="lev-row-container instruction-half-screen" style="visibility: hidden;">'}\n ${i}\n </div>\n <div class="lev-row-container instruction-half-screen" id="right-prompt">\n <p>${s}</p>\n </div>\n </div>\n <div class="horizontal-wrapper">\n <div class="lev-stim-content">\n ${o}\n </div>\n <div class="lev-stim-content" id="img-button-container">\n ${c}\n </div>\n </div>\n <div class="horizontal-wrapper" id="ok-button-container">\n <div class="lev-response-row multi-4">\n </div>\n </div>\n </div>\n `}(t):function(e){const t="string"==typeof e.audioFile?_r(e.audioFile):e.audioFile.map(e=>_r(e)).join(" "),n=Uc().translations;return`\n <div class="lev-stimulus-container">\n ${Wv(cL)}\n <div class="lev-row-container instruction">\n <p>${n[t]}</p>\n </div>\n </div>`}(t)},prompt_above_buttons:!0,button_choices:()=>{const t=e||Uc().nextStimulus;if("test-dimensions"===t.trialType){const e=t.answer?"yes":"no",{choices:n}=Dv(t.answer,t.distractors,e);return fL(n)}return["OK"]},button_html:()=>{const t=e||Uc().nextStimulus;return`<button class="${"test-dimensions"===t.trialType?"image-medium":"primary"}" style="${"test-dimensions"!==t.trialType?"margin: 16px":""}">%choice%</button>`},response_ends_trial:()=>{const t=e||Uc().nextStimulus;return!("test-dimensions"===t.trialType||"something-same-2"===t.trialType&&"practice_response"===t.assessmentStage)},on_load:()=>{var t;lL=performance.now();const n=e||Uc().nextStimulus,i=n.audioFile,s=n.trialType;if(mL=n.itemId,"something-same-2"===s){const e=i,t={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{mL===n.itemId&&e.length&&Bg.playAudio(AM.audio[_r(e.shift())],t)}};Bg.playAudio(AM.audio[_r(e.shift())],t)}else Bg.playAudio(AM.audio[_r(i)]);Gv(new _v(i,!0)),ej(),tj();const o=document.getElementById("jspsych-html-multi-response-btngroup");if(o.classList.add("lev-response-row"),o.classList.add("multi-4"),s.includes("something-same")){const e=document.getElementById("jspsych-html-multi-response-stimulus");e.style.width="100%",e.style.display="flex",e.style.justifyContent="center";document.getElementById("ok-button-container").appendChild(o)}if("something-same-2"===s){const e=document.getElementById("left-prompt"),i=document.getElementById("right-prompt");if(e&&i){const t=getComputedStyle(i),n=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),s=i.clientHeight-n;e.style.height=`${s}px`}$O();const s=Array.from(null===(t=document.getElementById("img-button-container"))||void 0===t?void 0:t.children);s.forEach((e,t)=>{e.addEventListener("click",()=>{var n;const i=null===(n=e.children[0])||void 0===n?void 0:n.alt;e&&(e.classList.contains(hL)?(e.classList.remove(hL),pL=null,dL=null):(e.classList.add(hL),pL=i,dL=t,s.forEach((e,n)=>{n!==t&&e.classList.remove(hL)})),null!==pL?zO():$O(),setTimeout(()=>gL(s),500))})});let o=0;if("practice_response"===n.assessmentStage){document.querySelector(".primary").addEventListener("click",e=>{if(dL!==Uc().correctResponseIdx){const e=document.getElementById("right-prompt"),t=document.getElementById("left-prompt");e.innerHTML=`<p>${Uc().translations.feedbackNotQuiteRight}</p>`,t.style.visibility="hidden",o++;const n={restrictRepetition:{enabled:!1,maxRepetitions:2}};Bg.stopAndDisconnectNode(),Bg.playAudio(AM.audio.feedbackNotQuiteRight,n),s.forEach(e=>e.classList.remove(hL)),pL=null,dL=null,o>=2&&(s[Uc().correctResponseIdx].style.animation="pulse 2s infinite")}else e.stopPropagation(),Fg.finishTrial()})}}if(window.Cypress&&"something-same-1"!==s){document.querySelectorAll(".image-medium").forEach(e=>{var t;(null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("alt"))===Uc().nextStimulus.answer&&e.classList.add("correct")})}if("test-dimensions"===s){const e=Array.from(o.children).map(e=>e.firstChild).filter(e=>!!e);e.forEach((t,n)=>{const i=Og?"touchend":"click";t.addEventListener(i,i=>{!function(e,t,n,i,s){var o;const a=(null===(o=null==e?void 0:e.parentElement)||void 0===o?void 0:o.id)||"",r=Uc().correctResponseIdx.toString(),c=a.includes(r);let l;c?(e.classList.add("success-shadow"),l=AM.audio[s]):(e.classList.add("error-shadow"),l=AM.audio.feedbackTryAgain,setTimeout(()=>gL(t),500),uL.push(a));const u={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:function(){Fg.finishTrial({response:a,incorrectPracticeResponses:uL,button_response:n?null:i,keyboard_response:n?i:null})}};Bg.stopAndDisconnectNode(),c?Bg.playAudio(l,u):Bg.playAudio(l,{restrictRepetition:{enabled:!1,maxRepetitions:2}})}(t,e,!1,n,"feedbackGoodJob")})})}iv(n)},on_finish:t=>{Bg.stopAndDisconnectNode(),mL="";const n=e||Uc().nextStimulus;Uc().choices;const i=performance.now(),s=Uc().runCat;if(Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses}),"instructions"!==n.assessmentStage){let e;if(e="test-dimensions"===n.trialType?0===uL.length:dL===Uc().correctResponseIdx,uL=[],"something-same-1"!==n.trialType&&(Uc("isCorrect",e),!1===e&&"practice_response"!==n.assessmentStage?Uc.transact("numIncorrect",e=>e+1):Uc("numIncorrect",0)),Fg.data.addDataToLastTrial({item:n.item,answer:n.answer,correct:e,distractors:n.distractors,corpusTrialType:n.trialType,response:pL,responseLocation:dL,itemUid:n.itemUid,audioFile:n.audioFile,corpus:Uc().corpus}),Uc().storeItemId&&Fg.data.addDataToLastTrial({itemId:n.itemId}),"test-dimensions"===n.trialType||"practice_response"===n.assessmentStage){const e=Math.round(i-lL);Fg.data.addDataToLastTrial({rt:e})}if("test_response"===n.assessmentStage&&Uc.transact("testTrialCount",e=>e+1),Uc().numIncorrect>=Uc().maxIncorrect&&!Uc().heavyInstructions&&!s&&vv(),"something-same-1"!==n.trialType&&"instructions"!==n.trialType&&(GO(),ay(n,e)),s&&"practice_response"!==n.assessmentStage){GO();const e=Uc().sequentialTrials.filter(e=>e.trialNumber===n.trialNumber&&e.block_index===n.block_index);YO(e)}}if("test-dimensions"===n.trialType||"practice_response"===n.assessmentStage){const e=Math.round(i-lL);Fg.data.addDataToLastTrial({rt:e})}"test_response"===n.assessmentStage&&Uc.transact("testTrialCount",e=>e+1)}});let yL,bL=[];const xL=e=>({type:Hg,data:()=>{const t=e||Uc().nextStimulus;let n="practice_response"===t.assessmentStage;return{save_trial:"instructions"!==t.assessmentStage,assessment_stage:t.assessmentStage,isPracticeTrial:n}},stimulus:()=>{const t=e||Uc().nextStimulus;let n=_r(t.audioFile);Uc().heavyInstructions&&"practice_response"!==t.assessmentStage&&"instructions"!==t.trialType&&(n+="Heavy");const i=Uc().translations;return`<div class="lev-stimulus-container">\n ${Wv("replay-btn-revisited")}\n <div class="lev-row-container instruction">\n <p>${i[n]}</p>\n </div>\n\n ${t.image&&!Array.isArray(t.image)?`<button class='image-medium' disabled>\n <img \n src=${AM.images[_r(t.image)]} \n alt=${t.image}\n />\n </div>`:""}\n \n ${t.image&&Array.isArray(t.image)?`<div class='lev-stim-content' style="flex-direction: column;">\n ${"something-same-1"===t.trialType?`\n <div style="visibility: hidden;">\n <button class='image no-pointer-events'>\n <img \n src=${AM.images[_r(t.image[0])]} \n alt=${t.image[0]}\n class='top-image'\n />\n </button>\n </div>\n `:""}\n <div class='lev-response-row multi-4'>\n ${t.image.map(e=>`<button class='image-medium no-pointer-events' style='margin: 0 4px'>\n <img \n src=${AM.images[_r(e)]} \n alt=${e} \n />\n </button>`).join("")}\n </div>\n </div>`:""}\n </div>`},prompt_above_buttons:!0,button_choices:()=>{const t=e||Uc().nextStimulus;if("instructions"===t.trialType||"something-same-1"==t.trialType)return["OK"];{const e=t.answer?"yes":"no",{choices:n}=Dv(t.answer,t.distractors,e);return(e=>e.map(e=>`<img src=${AM.images[_r(e)]} alt=${e} />`))(n)}},button_html:()=>{const t=e||Uc().nextStimulus;return`<button class="${"instructions"===t.trialType||"something-same-1"===t.trialType?"primary":"image-medium"}">%choice%</button>`},response_ends_trial:()=>{const t=e||Uc().nextStimulus;return!("test-dimensions"===t.trialType||"practice_response"===t.assessmentStage&&"something-same-1"!==t.trialType)},on_load:()=>{yL=performance.now();const t=e||Uc().nextStimulus;let n=t.audioFile;Uc().heavyInstructions&&"practice_response"!==t.assessmentStage&&"instructions"!==t.trialType&&(n+="-heavy"),Bg.playAudio(AM.audio[_r(n)]);const i=new _v(n,!0);Gv(i),ej(),tj();const s=document.getElementById("jspsych-html-multi-response-btngroup");s.classList.add("lev-response-row"),s.classList.add("multi-4");const o=t.trialType,a=t.assessmentStage;if(window.Cypress&&"something-same-1"!==o){document.querySelectorAll(".image-medium").forEach(e=>{var t;(null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("alt"))===Uc().nextStimulus.answer&&e.classList.add("correct")})}if("something-same-2"===t.trialType&&Uc().heavyInstructions&&jO(i,s,["same-different-selection-highlight-1","same-different-selection-highlight-2"]),"test-dimensions"===o||"practice_response"===a&&"something-same-1"!==o){const e=Array.from(s.children).map(e=>e.firstChild).filter(e=>!!e);e.forEach((t,n)=>{const i=Og?"touchend":"click";t.addEventListener(i,i=>{!function(e,t,n,i,s){var o;const a=(null===(o=null==e?void 0:e.parentElement)||void 0===o?void 0:o.id)||"",r=Uc().correctResponseIdx.toString(),c=a.includes(r);let l;c?(e.classList.add("success-shadow"),l=AM.audio[s]):(e.classList.add("error-shadow"),l=AM.audio.feedbackTryAgain,setTimeout(()=>{t.forEach(e=>e.removeAttribute("disabled"))},500),bL.push(a));const u={restrictRepetition:{enabled:!0,maxRepetitions:2},onEnded:function(){Fg.finishTrial({response:a,incorrectPracticeResponses:bL,button_response:n?null:i,keyboard_response:n?i:null})}};Bg.stopAndDisconnectNode(),c?Bg.playAudio(l,u):Bg.playAudio(l,{restrictRepetition:{enabled:!1,maxRepetitions:2}})}(t,e,!1,n,"feedbackGoodJob")})})}iv(t)},on_finish:t=>{const n=e||Uc().nextStimulus,i=Uc().choices,s=performance.now(),o=Uc().runCat;if(Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses}),"instructions"!==n.assessmentStage){let e;if(e="test-dimensions"===n.trialType||"practice_response"===n.assessmentStage?0===bL.length:t.button_response===Uc().correctResponseIdx,bL=[],Uc("isCorrect",e),!1===e?Uc.transact("numIncorrect",e=>e+1):Uc("numIncorrect",0),Fg.data.addDataToLastTrial({item:n.item,answer:n.answer,correct:e,distractors:n.distractors,corpusTrialType:n.trialType,response:i[t.button_response],responseLocation:t.button_response,itemUid:n.itemUid,audioFile:n.audioFile,corpus:Uc().corpus}),Uc().storeItemId&&Fg.data.addDataToLastTrial({itemId:n.itemId}),"test-dimensions"===n.trialType||"practice_response"===n.assessmentStage){const e=Math.round(s-yL);Fg.data.addDataToLastTrial({rt:e})}if("test_response"===n.assessmentStage&&Uc.transact("testTrialCount",e=>e+1),Uc().numIncorrect>=Uc().maxIncorrect&&!Uc().heavyInstructions&&!o&&vv(),"something-same-1"!==n.trialType&&"instructions"!==n.trialType&&ay(n,e),o&&"practice_response"!==n.assessmentStage){GO();const e=Uc().sequentialTrials.filter(e=>e.trialNumber===n.trialNumber&&e.trialType===n.trialType);YO(e)}}if("test-dimensions"===n.trialType||"practice_response"===n.assessmentStage){const e=Math.round(s-yL);Fg.data.addDataToLastTrial({rt:e})}"test_response"===n.assessmentStage&&Uc.transact("testTrialCount",e=>e+1)}});function _L(e){return e.includes("match")?"updateMatching":e.includes("something-same")?"updateSomethingSame":"updateTestDimensions"}function wL(e){const t=[],n=[];let i="test-dimensions",s=0;return e?Uc().corpora.stimulus.forEach(e=>{t.push(e.length)}):(Uc().corpora.stimulus.forEach(e=>{var o,a;(o=e.trialType)===(a=i)||o.includes("match")&&a.includes("match")||o.includes("something-same")&&a.includes("something-same")||"instructions"===e.trialType||(t.push(s),n.push(_L(i)),i=e.trialType,s=0),s++}),t.push(s),n.push(_L(i))),{blockCountList:t,blockOperations:n}}function kL(e,t){const n=Rv(t).default,i=Uc().heavyInstructions,s=iy(Uc().corpora.stimulus,!1,void 0,!0),o=function(e){const t=[],n=["second_response","third_response","fourth_response"],i=[];return e.forEach(e=>{"something-same-2"===e.trialType||n.includes(e.assessmentStage)?t.push(e):"test-dimensions"===e.trialType?(e.difficulty=NaN,i.push(e)):i.push(e)}),Uc("sequentialTrials",t),i}(Uc().corpora.stimulus),a=oy(o),r={downex:Uc().corpora.downex,stimulus:a};Uc("corpora",r),jv(e);const c=Cv(e,$g),l={timeline:[tv(t)],conditional_function:()=>{const e=Uc().nextStimulus.trialType,t=Uc().nextStimulus.assessmentStage;return!("something-same-2"!==e&&!e.includes("match")||"practice_response"===t)}},u=e=>{let t;t=e.trialType.includes("match")?rL:2===Uc().version?vL:xL;return{timeline:"practice_response"===e.assessmentStage&&!e.trialType.includes("something-same-1")?[{...Zg,stimulus:""},t(e),p]:[{...Zg,stimulus:""},t(e)]}},p={timeline:[gv(!0,"feedbackCorrect","feedbackNotQuiteRight")],conditional_function:()=>2===Uc().version};function d(e,t){const n=[];for(let i=0;i<e;i++)"stimulus"===t?(n.push(2===Uc().version?vL():xL()),n.push(l)):(n.push(rL()),n.push(l));return{timeline:n,conditional_function:()=>{const n=Uc().nextStimulus;return"stimulus"===t?"test-dimensions"===n.trialType&&1===e||n.trialType.includes("something-same")&&2===e:n.trialType===e+"-match"}}}const m=[n,c];let h,f,g=s.ipLight;2===Uc().version&&(h=g.find(e=>"sds-instruct5"===e.itemId),g=g.filter(e=>"sds-instruct5"!==e.itemId),f={timeline:[u(h)],conditional_function:()=>"4-match"===Uc().nextStimulus.trialType});const v=wL(!0).blockCountList,y=v.reduce((e,t)=>e+t,0);return Uc("totalTestTrials",y),v.forEach((e,t)=>{var n;if((n=t,g.filter(e=>{if(!Number.isNaN(e.block_index))return e.block_index===n})).forEach(e=>{m.push(u(e))}),!i&&1===t&&2===Uc().version)return;const s=0===t?e:e/2;for(let e=0;e<s;e++)m.push({...Yg(t),stimulus:""}),0===t&&m.push(d(1,"stimulus")),1===t&&m.push(d(2,"stimulus")),2===t&&(2===Uc().version&&m.push(f),m.push(d(2,"afc")),m.push(d(3,"afc")),m.push(d(4,"afc")))}),Rg(),m.push(fv()),m.push(qg),{jsPsych:Fg,timeline:m}}const SL=(e,t,n)=>{const i=JSON.parse(JSON.stringify(Zr)),{answer:s,distractors:o,trialType:a}=e;if(i.isPracticeTrial="practice_response"===e.assessmentStage,i.isInstructionTrial="instructions"===e.trialType,i.showStimImage=!1,i.isInstructionTrial)i.classOverrides.buttonClassList=["primary"];else{const e=ly(o),t=Dv(s.toString(),e,"yes",a);i.prompt={enabled:!1,aboveStimulus:!1},i.isImageButtonResponse=!0,i.classOverrides.buttonClassList=["image-medium"],i.classOverrides.buttonContainerClassList=["lev-response-row-inline","grid-2x2"],i.response={target:t.target,displayValues:t.choices,values:t.originalChoices,targetIndex:t.correctResponseIdx}}return{itemConfig:i,errorMessages:cy(i,n,t,e)}};function TL(){return Rv(NO(AM,[],Uc().assetsPerTask.shared.audio,[])).default}const EL=["ToM-intro","ToM-transition"],CL=(e,t,n)=>{const{answer:i,distractors:s,trialType:o}=e,a=JSON.parse(JSON.stringify(Zr));if(a.isPracticeTrial="practice_response"===e.assessmentStage,a.isInstructionTrial="instructions"===e.trialType,a.stimText={value:ry(e.item),displayValue:void 0},a.classOverrides.promptClassList=["lev-row-container","instruction-small"],a.isInstructionTrial)a.classOverrides.buttonClassList=["primary"],a.disableOkButton=!0;else{const t=ly(s),n=Dv(i.toString(),t,e.randomize,o);a.isStaggered=!0,a.isImageButtonResponse=!0,a.response={target:n.target,displayValues:n.choices,values:n.originalChoices,targetIndex:n.correctResponseIdx}}a.blockedTrials=2===Uc().version&&!EL.includes(e.itemId);return{itemConfig:a,errorMessages:cy(a,n,t,e)}};function IL(e,t){jv(e);const n=Cv(e,$g),i=Uc().corpora.stimulus,s=Uc().translations,o={},a={};for(const e of i){const{itemConfig:n,errorMessages:i}=CL(e,s,t);a[e.itemId]=n,i.length&&(o[e.itemId]=i.join("; "))}if(Object.keys(o).length)throw console.error("The following errors were found"),console.table(o),new Error("Something went wrong. Please look in the console for error details");const r={trialType:"audio",responseAllowed:!0,promptAboveButtons:!0,task:e.task,layoutConfigMap:a,terminateCat:!1},c=[TL(),n],l=oy(i,!1),u=function(e){if(2!==Uc().version)return null;const t=e.flat().find(e=>"ToM-intro"===e.itemId),n=e.flat().find(e=>"ToM-transition"===e.itemId);e.forEach((t,n)=>{e[n]=t.filter(e=>"ToM-intro"!==e.itemId&&"ToM-transition"!==e.itemId)});const i=[],s=[];return e.forEach(e=>{const t=e[0],n=e.slice(1);s.push(t),i.push(...n)}),Uc("sequentialTrials",i),Uc("corpora",{stimulus:s}),{taskIntro:t,blockTransition:n}}(l),p=function(e){if(2!==Uc().version)return;const t=[];for(let e=0;e<Uc().numberOfStories;e++)t.push([]);return e.forEach(e=>{void 0!==e.storyGroup?t[e.storyGroup].push(e):t[0].push(e)}),t}(i),d=DO(t,2===Uc().version&&void 0!==p?p:l,["item","answer","distractors"],["audioFile","distractors"]);let m=0;function h(){c.push(Rv(d[m]).default),m++}const f=e=>({timeline:[mv(r,e)],conditional_function:()=>!Uc().skipCurrentTrial||(Uc("skipCurrentTrial",!1),!1)}),g=e=>({timeline:[mv(r)],conditional_function:()=>e===Uc().currentStoryGroup});if(Uc("totalTestTrials",PO(i)),2===Uc().version){const e=Uc().numberOfStories,t=50;for(let n=0;n<e;n++){h(),0===n?c.push(f(null==u?void 0:u.taskIntro)):c.push(f(null==u?void 0:u.blockTransition)),c.push({...Wg,stimulus:""});for(let e=0;e<t;e++)c.push(g(n))}}else l.forEach(e=>{h();for(let t=0;t<e.length;t++)c.push({...Kg,stimulus:""}),c.push(f())});return Rg(),c.push(fv()),c.push(qg),{jsPsych:Fg,timeline:c}}const OL=[{prompt:"generalIntro1",image:"avatarOwl",buttonText:"continueButtonText"},{prompt:"generalIntro4",image:"avatarOwl",buttonText:"continueButtonText"},{prompt:"generalIntro5",image:"avatarOwl",buttonText:"continueButtonText"}];Og||OL.push({prompt:"generalKeyboardInstructions",image:"avatarOwl",buttonText:"continueButtonText"});const jL=OL.map(e=>({type:Hg,stimulus:()=>{const t=Uc().translations;return`\n <div class="lev-stimulus-container">\n ${Wv("replay-btn-revisited")}\n <div class="lev-row-container instruction-small">\n <p>${t[e.prompt]}</p>\n </div>\n <div class="lev-stim-content-x-3">\n <img\n src=${AM.images[e.image]}\n alt='Instruction graphic'\n />\n </div>\n </div>\n `},prompt_above_buttons:!0,button_choices:["Next"],button_html:()=>[`<button class="primary">\n ${Uc().translations[e.buttonText]}\n </button>`],keyboard_choices:"NO_KEYS",on_load:()=>{Bg.playAudio(AM.audio[e.prompt]);Gv(new _v(e.prompt,!0)),ej(),tj()},on_finish:()=>{Bg.stopAndDisconnectNode(),Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses,assessment_stage:"instructions"}),Bg.stopAndDisconnectNode()}}));const AL=(e,t,n)=>{const i=JSON.parse(JSON.stringify(Zr)),{answer:s,distractors:o,trialType:a}=e;if(i.isPracticeTrial="practice_response"===e.assessmentStage,i.isInstructionTrial="instructions"===e.trialType,i.showStimImage=!1,i.isInstructionTrial)i.classOverrides.buttonClassList=["primary"],e.item&&(i.showStimImage=!0,i.stimText={value:ry(e.item),displayValue:void 0});else{const e=ly(o),t=Dv(s.toString(),e,"yes",a);i.prompt={enabled:!1,aboveStimulus:!1},i.isImageButtonResponse=!0,i.classOverrides.buttonClassList=["image-medium"],i.classOverrides.buttonContainerClassList=["lev-response-row-inline","grid-2x2"],i.response={target:t.target,displayValues:t.choices,values:t.originalChoices,targetIndex:t.correctResponseIdx}}return{itemConfig:i,errorMessages:cy(i,n,t,e)}};let LL=null;const PL=[{prompt:"inferenceInstructions2",buttonText:"Go"},{prompt:"inferenceInstructions",buttonText:"Continue"}].map(e=>({type:XA,stimulus:()=>AM.audio[e.prompt],prompt:()=>{const t=Uc().translations;return`<div class="lev-stimulus-container">\n <button\n id="replay-btn-revisited"\n class="replay"\n >\n ${Fv}\n </button>\n <div class="lev-row-container instruction">\n <p>${t[e.prompt]}</p>\n </div>\n </div>`},prompt_above_buttons:!0,button_choices:["Next"],button_html:()=>(Uc().translations,[`<button class="primary">\n ${[e.buttonText]}\n </button>`]),keyboard_choices:()=>"NO_KEYS",on_load:()=>{Gv(new _v(e.prompt,!0))},on_finish:()=>{Fg.data.addDataToLastTrial({audioButtonPresses:Bg.replayPresses,assessment_stage:"instructions"})}}));let RL=[];const ML=[];function NL(e){const t=Uc().nextStimulus,n=null==e?void 0:e[t.itemId],i=null==n?void 0:n.playAudioOnLoad,s=new _v(t.audioFile,i),o="practice_response"===t.assessmentStage;if(t.trialType,(async(e,t)=>{if(null==e?void 0:e.isStaggered){const e=document.getElementById("jspsych-html-multi-response-btngroup"),n=await t.getStimulusDurationMs();setTimeout(()=>{t.disableReplayBtn()},n+110);for(const t of e.children)t.classList.add("lev-staggered-responses","lev-staggered-disabled","lev-staggered-grayscale","lev-staggered-opacity")}})(n,s),IO({itemId:t.itemId,taskName:t.task,pageContext:"afcInference"}),o){const e=document.querySelectorAll(".practice-btn");e.forEach((i,s)=>i.addEventListener("click",async o=>{!function(e,t,n,i,s,o){var a,r;const c=Array.prototype.indexOf.call(n,e),l=((null===(a=o.response)||void 0===a?void 0:a.values)||[])[c];(null==l?void 0:l.toString())===(null===(r=t.answer)||void 0===r?void 0:r.toString())?(e.classList.add("success-shadow"),setTimeout(()=>Fg.finishTrial({response:l,incorrectPracticeResponses:ML,button_response:i?null:s,keyboard_response:i?s:null}),1e3)):(e.classList.add("error-shadow"),setTimeout(()=>{n.forEach(e=>e.disabled=!1)},500),ML.push(l))}(i,t,e,!1,s,n)}))}if(null==n?void 0:n.classOverrides.stimulusContainerClassList.includes("inference-scroll")){const e=document.querySelector(".jspsych-content");null==e||e.classList.add("inference-scroll")}if("instructions"!==t.trialType){const e=document.getElementById("jspsych-html-multi-response-btngroup"),{buttonLayout:t}=Uc();n&&("diamond"===t?e.classList.add("lev-response-row-diamond-layout"):e.classList.add(...n.classOverrides.buttonContainerClassList)),Uc.transact("trialNumSubtask",e=>e+1),o&&Uc.transact("testTrialCount",e=>e+1)}}const DL=({responseAllowed:e,promptAboveButtons:t,task:n,layoutConfigMap:i,validityEvaluator:s})=>({type:Hg,response_allowed_while_playing:e,data:()=>{const e=Uc().nextStimulus;let t="practice_response"===e.assessmentStage;return{save_trial:!0,assessment_stage:e.assessmentStage,isPracticeTrial:t}},stimulus:()=>function(e){var t;const n=Uc().nextStimulus;Uc().translations;let i=null==e?void 0:e[n.itemId];if(i){const{prompt:{enabled:e,useStimText:n},story:s,stimText:o}=i;let a="";return e&&n&&(a=null!==(t=null==o?void 0:o.value)&&void 0!==t?t:""),((e,t,n)=>{let i="";return e&&!n&&(i+=`\n <div class="lev-row-container instruction">\n <p>${e}</p>\n </div>\n `),e&&n&&(i+=`\n <div class="lev-row-container instruction-no-border">\n <p>${t}</p>\n </div>\n <div class="lev-row-container roar-instruction-question">\n <p>${e}</p>\n </div>\n `),i+="</div>",i})(a,s,n)}}(i),prompt_above_buttons:t,button_choices:()=>function(e){const t=Uc().nextStimulus,n=null==e?void 0:e[t.itemId];if(n){const{response:{values:e}}=n;return e}}(i),button_html:()=>function(e){const t=Uc().nextStimulus,n="practice_response"===t.assessmentStage,i=null==e?void 0:e[t.itemId];if(i){const e=[...i.classOverrides.buttonClassList];return n&&e.push("practice-btn"),`\n <button class='${e.join(" ")}'>%choice%</button>\n `}}(i),on_load:()=>NL(i),on_finish:e=>function(e,t,n,i){var s,o,a,r,c;const l=Uc().nextStimulus,u=null==n?void 0:n[l.itemId];let p=null,d=null,m=null;if(Yc()&&Ev(l.audioFile),"instructions"!==l.trialType){if(u){const{response:t}=u;if(!t)throw new Error("Choices not defined in the config");m=e.button_response,p=t.values[m],d=t.target,e.correct=p===d}const n="mouse";if(e.correct?("practice_response"!==l.assessmentStage&&(Uc.transact("totalCorrect",e=>e+1),Uc("numIncorrect",0)),RL=[]):("practice_response"!==l.assessmentStage&&Uc.transact("numIncorrect",e=>e+1),RL.push(p)),Yc()&&!(null===(s=l.assessmentStage)||void 0===s?void 0:s.includes("instruction"))){Uc("previousItem",l),Uc("previousAnswer",e.correct?1:0);const n=l.zetas.map(e=>e.cats[0]);i&&!(null===(o=l.assessmentStage)||void 0===o?void 0:o.includes("practice"))&&n.includes("composite")&&i.addResponseData(e.rt,e.button_response,e.correct?1:0);const{catsScaled:s}=Wr[t][Uc().scoringVersion],c=ey(Ag.theta,Ag.seMeasurement,Lg,s);Uc("irtEstimates",c),Fg.data.addDataToLastTrial({...ny(l),thetaEstimate:null===(a=c.composite)||void 0===a?void 0:a.thetaEstimate,thetaSE:null===(r=c.composite)||void 0===r?void 0:r.thetaSE}),Fg.data.write({...ty(c)})}const c=l.itemId.split("_")[0];Fg.data.addDataToLastTrial({story:l.item,item:l.prompt,answer:d,distractors:l.distractors,corpusTrialType:l.trialType,responseType:n,responseLocation:m,itemId:l.origItemNum,corpusId:Uc().corpus,storyId:c}),"practice_response"!==l.assessmentStage&&Fg.data.addDataToLastTrial({response:p})}else Uc("numIncorrect",0),Fg.data.addDataToLastTrial({correct:!1});Yc()||("skip"===u.inCorrectTrialConfig.onIncorrectTrial?Zv(l.trialType):Uc().numIncorrect>=Uc().maxIncorrect&&vv()),null===(c=document.querySelector(".jspsych-content"))||void 0===c||c.classList.remove("inference-scroll")}(e,n,i,s),response_ends_trial:()=>"practice_response"!==Uc().nextStimulus.assessmentStage}),FL=(e,t,n,i)=>{const{answer:s,distractors:o,trialType:a}=e,r=JSON.parse(JSON.stringify(Zr));if(r.playAudioOnLoad=!1,r.isPracticeTrial="practice_response"===e.assessmentStage,r.classOverrides.buttonContainerClassList=["lev-response-row","multi-stack"],r.isInstructionTrial="instructions"===e.trialType,r.prompt.enabled=!0,r.prompt.useStimText=!0,r.stimText={value:e.prompt,displayValue:void 0},r.classOverrides.stimulusContainerClassList=["inference-scroll"],r.disableButtonsWhenAudioPlaying=!0,r.isInstructionTrial)r.classOverrides.buttonClassList=["primary"];else{const e=ly(o),t=Dv(s.toString(),e,"yes",a);r.isImageButtonResponse=!1,r.classOverrides.buttonClassList=["roar-inference-btn"],r.response={target:t.target,displayValues:t.choices,values:t.originalChoices,targetIndex:t.correctResponseIdx}}return{itemConfig:r,errorMessages:cy(r,n,t,e)}};let BL=null;const $L=(e,t,n)=>{const{answer:i,distractors:s,trialType:o}=e,a=JSON.parse(JSON.stringify(Zr)),r=ry(e.item);if(a.isPracticeTrial="practice_response"===e.assessmentStage,a.isInstructionTrial="instructions"===e.trialType,a.showStimImage=!1,a.stimText={value:r,displayValue:void 0},a.isInstructionTrial)a.classOverrides.buttonClassList=["primary"];else{const e=ly(s),t=Dv(i.toString(),e,"yes",o);a.prompt.enabled=!1,a.isImageButtonResponse=!1,a.classOverrides.buttonClassList=["secondary--wide"],a.response={target:t.target,displayValues:t.choices,values:t.originalChoices,targetIndex:t.correctResponseIdx},a.stimText={value:r,displayValue:r}}return{itemConfig:a,errorMessages:cy(a,n,t,e)}};const zL=(e,t,n,i)=>{const{answer:s,distractors:o,trialType:a}=e,r=JSON.parse(JSON.stringify(Zr)),c=ry(e.item);r.isPracticeTrial="practice_response"===e.assessmentStage,r.isInstructionTrial="instructions"===e.trialType,r.showStimImage=!1,r.stimText={value:c,displayValue:void 0},r.classOverrides.buttonClassList=["secondary--wide"],r.isStaggered=!0;const l=ly(o);r.prompt.enabled=!0,r.isImageButtonResponse=!1,r.response={target:"",displayValues:l,values:l,targetIndex:0};return{itemConfig:r,errorMessages:cy(r,n,t,e)}};let qL;const UL=({responseAllowed:e,promptAboveButtons:t,task:n,layoutConfigMap:i})=>({type:Hg,data:()=>({save_trial:!0,assessment_stage:Uc().nextStimulus.assessmentStage,isPracticeTrial:!1}),stimulus:()=>{const e=Uc().nextStimulus,t=Uc().translations,n=e.audioFile;return`<div class="lev-stimulus-container">\n <div class="lev-progress-bar">\n <div id="progress-fill" class="progress-fill"></div>\n </div>\n ${Wv("replay-btn-revisited")}\n <div class="lev-row-container instruction-small">\n <p>${t[_r(n)]}</p>\n </div>\n </div>`},response_ends_trial:!1,prompt_above_buttons:t,button_choices:()=>{const e=Uc().nextStimulus;return(null==i?void 0:i[e.itemId]).response.values},button_html:()=>{const e=Uc().nextStimulus;return`<button \n class='${(null==i?void 0:i[e.itemId]).classOverrides.buttonClassList.join(" ")}' \n ${"test_response"===e.assessmentStage?"disabled":""}>\n %choice%\n </button>`},on_load:async()=>{var e;performance.now();const t=Uc().nextStimulus,n=null==i?void 0:i[t.itemId],s=null==n?void 0:n.playAudioOnLoad,o=new _v(t.audioFile,s),a=n.classOverrides.buttonClassList[0],r=document.querySelectorAll(`button.${a}`),c=document.getElementById("jspsych-html-multi-response-btngroup");!function(e){const t=document.getElementById("progress-fill");if(t){const n=Math.max(0,Math.min(100,e));t.style.width=`${n}%`}}(Uc().testTrialCount/Uc().totalTrials*100),function(e){const t=[],n=[];for(let n=0;n<e.length;n++){const i=e[n].getBoundingClientRect();t.push(i.width)}for(let n=0;n<e.length;n++)e[n].style.width=Math.min(...t).toString()+"px";for(let t=0;t<e.length;t++){const i=e[t].getBoundingClientRect();n.push(i.height)}for(let t=0;t<e.length;t++){e[t].style.height=Math.max(...n).toString()+"px";const i=e[t].parentElement;i&&(i.style.verticalAlign="top")}}(r),IO({itemId:t.itemId,taskName:t.task,pageContext:"stimulus"}),Gv(o),ej(),tj();const l={restrictRepetition:{enabled:!1,maxRepetitions:2},onEnded:()=>{r.forEach(e=>{e.disabled=!1})}};if(Bg.playAudio(AM.audio[_r(t.audioFile)],l),r.forEach(e=>{e.addEventListener("click",e=>{var t;if(!document.querySelector(".primary")){const e=document.createElement("button");e.className="primary",e.textContent="OK",e.style.marginTop="16px",e.addEventListener("click",()=>{Fg.finishTrial()}),null===(t=c.parentNode)||void 0===t||t.insertBefore(e,c.nextSibling)}r.forEach(e=>{setTimeout(()=>{e.disabled=!1},10),e.classList.remove("success-shadow")}),e.target.classList.add("success-shadow"),qL=Array.prototype.indexOf.call(r,e.target)})}),n.isStaggered){let n=["child-survey-response1","child-survey-response2","child-survey-response3","child-survey-response4"];if(await jO(o,c,n,t.itemId,"instructions"===t.assessmentStage),"instructions"===t.assessmentStage){r.forEach(e=>{e.disabled=!0});const t=document.createElement("button");t.className="primary",t.textContent="OK",t.style.marginTop="16px",t.addEventListener("click",()=>{Fg.finishTrial()}),null===(e=c.parentNode)||void 0===e||e.insertBefore(t,c.nextSibling)}}Uc.transact("trialNumSubtask",e=>e+1)},on_finish:e=>{OO=!1,Bg.stopAndDisconnectNode();let t=null;Uc().translations;const n=Uc().corpus,s=Uc().nextStimulus,o=null==i?void 0:i[s.itemId];if("instructions"!==s.trialType){if(o){const{response:n}=o;if(!n)throw new Error("Choices not defined in the config");t=e.button_response,n.values[t]}Fg.data.addDataToLastTrial({item:s.item,distractors:s.distractors,corpusTrialType:s.trialType,responseLocation:qL,itemUid:s.itemUid,audioFile:s.audioFile,corpus:n,audioButtonPresses:Bg.replayPresses,correct:!1,answer:s.distractors[qL]}),Uc().storeItemId&&Fg.data.addDataToLastTrial({corpusId:Uc().corpusId,itemId:s.itemId})}else Fg.data.addDataToLastTrial({correct:!1});"test_response"===s.assessmentStage&&Uc.transact("testTrialCount",e=>e+1)}});function HL(e,t){const{heavyInstructions:n}=Uc();Uc(),jv(e);const i=Cv(e,$g),s={timeline:[tv(t)]};let o=Uc().corpora.stimulus;const a=Uc().translations,r={},c={};for(const e of o){const{itemConfig:n,errorMessages:i}=Mj(e,a,t);c[e.itemId]=n,i.length&&(r[e.itemId]=i.join("; "))}if(Object.keys(r).length)throw console.error("The following errors were found"),console.table(r),new Error("Something went wrong. Please look in the console for error details");const l=iy(o),u=oy(l.cat),p=DO(t,u,["item","answer","distractors"]);Uc("corpora",{practice:Uc().corpora.practice,stimulus:u});let d=0;const m=[Rv(BO(p,t)).default,i,...n?Fj:[Lj,Aj,jj]],h={trialType:"audio",responseAllowed:!0,promptAboveButtons:!0,task:e.task,layoutConfig:{showPrompt:!0},layoutConfigMap:c,terminateCat:!0},f=e=>({timeline:[{...Jg,stimulus:""},mv(h),s],conditional_function:()=>Uc().skipBlock!==e}),g={timeline:[Rj],conditional_function:()=>1===Uc().currentCatBlock&&JO(Uc().language)},v={timeline:[Pj],conditional_function:()=>2===Uc().currentCatBlock};const y=l.ipLight,b=[];const x=e=>{const t=function(e){return y.filter(t=>t.block_index===e&&!b.includes(t.block_index))}(e);return{timeline:[g,v,...t.map(e=>({timeline:[{...Zg,stimulus:""},mv(h,e)]}))],conditional_function:()=>{const t=Uc().currentCatBlock===e-1&&!b.includes(e);return t&&b.push(e),t}}},_=o.filter(e=>1===Number(e.block_index)&&"practice_response"===e.assessmentStage);let w=!1;const k={timeline:[yv,...Fj,..._.map(e=>mv(h,e))],conditional_function:()=>{const e=ZO()&&!w;return e&&(w=!0),e}};Uc("currentCatBlock",0);const S=l.cat.length;return Uc("totalTestTrials",S),u.forEach((e,t)=>{m.push(Rv(p[d]).default),d++,u.forEach((e,t)=>{m.push(x(t+1))}),0===t?(m.push(xv(n?()=>"mentalRotationInstruct5Downex":void 0)),l.start.forEach(e=>{m.push({...Zg,stimulus:""}),m.push(mv(h,e)),m.push(s)})):m.push(xv(()=>"generalYourTurn"));const i=e.length/3;for(let e=0;e<i;e++)e<=4&&0===t&&m.push(k),m.push(f(t));t<u.length-1&&m.push(Xg)}),Rg(),m.push(fv()),m.push(qg),{jsPsych:Fg,timeline:m}}var VL={egmaMath:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:function(e,t){const n=Rv(t).default;jv(e);const i=Cv(e,$g),s=e=>({timeline:[tv(t)],conditional_function:()=>{const t=e||Uc().nextStimulus;if("practice_response"===t.assessmentStage||"instructions"===t.trialType)return!1;return!(Uc().trialsSkipped>0)}}),o=[n,i];let a=Uc().corpora.stimulus;const r=Uc().corpora.downex,c=Uc().translations,l={},{runCat:u,heavyInstructions:p}=Uc();Uc("totalTrials",a.length);const d={};for(const e of[...r,...a]){const{itemConfig:n,errorMessages:i}=uj(e,c,t);d[e.itemId]=n,i.length&&(l[e.itemId]=i.join("; "))}if(Object.keys(l).length)throw console.error("The following errors were found"),console.table(l),new Error("Something went wrong. Please look in the console for error details");const m=u,h={trialType:"audio",responseAllowed:!0,promptAboveButtons:!0,task:e.task,layoutConfigMap:d,terminateCat:m},f=e=>({timeline:[gv(!0,"feedbackCorrect","feedbackNotQuiteRight",!1)],conditional_function:()=>"practice_response"===(e||Uc().nextStimulus).assessmentStage&&"Number Line Slider"===(e||Uc().nextStimulus).trialType}),g={timeline:[{...Kg,stimulus:""}],conditional_function:()=>{const e=Uc().trialsSkipped;return!(e>0)||(Uc("trialsSkipped",e-1),Uc.transact("testTrialCount",e=>e+1),!1)}},v={timeline:[{...Zg,stimulus:"",post_trial_gap:350}],conditional_function:()=>1===Uc().trialsSkipped},y=e=>({timeline:[mv(h,e)],conditional_function:()=>{var t;return!(Uc().trialsSkipped>0)&&!(null===(t=(e||Uc().nextStimulus).trialType)||void 0===t?void 0:t.includes("Number Line"))}}),b=e=>({timeline:[lj(d,m,e),f(e)],conditional_function:()=>{var t;return!(Uc().trialsSkipped>0)&&(null===(t=(e||Uc().nextStimulus).trialType)||void 0===t?void 0:t.includes("Number Line"))}}),x=a.filter(e=>"Number Line Slider"===e.trialType&&"practice_response"===e.assessmentStage),_=()=>{let e=[];return x.forEach((t,n)=>{e.push(lj(d,m,t)),n<x.length-1&&e.push({...gv(!0,"feedbackCorrect","feedbackNotQuiteRight"),conditional_function:()=>!0,post_trial_gap:350})}),{timeline:[...e],conditional_function:()=>!Uc().isCorrect&&!Uc().testPhase&&("Number Line Slider"===Uc().nextStimulus.trialType||u)&&"test_response"===Uc().nextStimulus.assessmentStage}},w=e=>({timeline:[y(e),b(e),s(e)],conditional_function:()=>{if(Uc().skipCurrentTrial)return Uc("skipCurrentTrial",!1),!1;const t=e||Uc().nextStimulus,n=qc.page.get("skipCurrentBlock");return!(t.trialType===n&&!u)}});if(u){const e=iy(a,!0,r),t=e.ipLight,n=t.filter(e=>"instructions"==e.trialType);let i=t.filter(e=>"practice_response"==e.assessmentStage),s=oy(Uc().corpora.stimulus);Uc("corpora",{stimulus:s,downex:Uc().corpora.downex}),Uc("totalTestTrials",0);const c=[];if(p){const t=e.ipHeavy,n=t.filter(e=>"instructions"==e.trialType);let i=t.filter(e=>"practice_response"==e.assessmentStage),a=e.downexCat;const r=[];s.flat().map(e=>r.push(e.itemId)),a=a.filter(e=>!r.includes(e.itemId));const c=["Addition","Number Comparison","Number Identification","Counting","Counting AFC"];i=i.filter(e=>!c.includes(e.trialType));const l=["math-instructions1-heavy","math-intro1-heavy"];n.forEach(e=>{l.includes(e.itemId)&&(o.push({...Zg,stimulus:""}),o.push(mv(h,e)))}),i.forEach(e=>{o.push({...Zg,stimulus:""}),o.push(w(e))}),o.push(xv());const u=Math.floor(a.length/2);Uc.transact("totalTestTrials",e=>e+u);for(let e=0;e<u;e++)o.push({...Gg,stimulus:""}),o.push(w())}const l=s.length,u=[4,6,6];for(let t=0;t<l;t++){n.filter(e=>{let n;switch(t){case 0:n=p?["math-intro2"]:["math-instructions1","math-intro1"];break;case 1:n=["math-intro2"];break;case 2:n=["math-intro2","number-line-instruct1"];break;default:n=[]}const i=n.includes(e.itemId)&&!c.includes(e.itemId);return i&&c.push(e.itemId),i}).forEach(e=>{o.push({...Zg,stimulus:""}),o.push(mv(h,e))});i.filter(e=>t===Number(e.block_index)).forEach(e=>{o.push({...Zg,stimulus:""}),o.push(w(e)),"Number Line Slider"===e.trialType&&o.push(f())}),2===t&&o.push(_()),o.push(xv()),0===t&&e.start.forEach(e=>o.push(w(e)));const a=Math.floor(s[t].length/u[t]);Uc.transact("totalTestTrials",e=>e+a);for(let e=0;e<a;e++)o.push({...Yg(t),stimulus:""}),o.push(w());e.unnormed.forEach(e=>{t===Number(e.block_index)&&(o.push({...Zg,stimulus:""}),o.push(w(e)))})}}else{Uc("totalTestTrials",PO(a)),a.forEach(e=>e.difficulty=NaN);const e={downex:Uc().corpora.downex,stimulus:p?r:a};Uc("corpora",e);const t=p?Uc().totalDownexTrials:Uc().totalTrials;for(let e=0;e<t;e++)o.push(g),o.push(_()),o.push(xv()),o.push(v),o.push(w())}return Rg(),o.push(fv()),o.push(qg),{jsPsych:Fg,timeline:o}},variants:{egmaMathKids:{}}},matrixReasoning:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:function(e,t){jv(e);const n=Cv(e,$g),i={timeline:[tv(t)],conditional_function:()=>{const e=Uc().nextStimulus;return!!p||"practice_response"!==e.assessmentStage&&"instructions"!==e.trialType}},s=Uc().corpora.stimulus,o=Uc().corpora.downex,a=[...o,...s],r=Uc().translations,c={},{semThreshold:l,heavyInstructions:u,runCat:p}=Uc(),d={};for(const e of u?a:s){const{itemConfig:n,errorMessages:i}=Cj(e,r,t);d[e.itemId]=n,i.length&&(c[e.itemId]=i.join("; "))}if(Object.keys(c).length)throw console.error("The following errors were found"),console.table(c),new Error("Something went wrong. Please look in the console for error details");const m=DO(t,FO(s,25),["item","answer","distractors"]);let h=0;const f=BO(m,t),g=[Rv(p?t:f).default,n,...u?[yj]:mj],v={trialType:"audio",responseAllowed:!0,promptAboveButtons:!0,task:e.task,layoutConfigMap:d,terminateCat:p},y={timeline:[{...Kg,stimulus:""},xv(),mv(v),i],conditional_function:()=>Uc().skipCurrentTrial?(Uc("skipCurrentTrial",!1),!1):!(p&&jg._seMeasurement<l)},b=e=>({timeline:[{...Gg,stimulus:""},xv(),Ej(d,e),i]});let x=!1;const _={timeline:[yv,yj,...o.slice(0,5).map(e=>[{...Zg,stimulus:""},Ej(d,!0,e),i]).flat(),xj,wj,xv(void 0,!0),...o.slice(5).map(e=>[{...Zg,stimulus:""},Ej(d,!1,e),i]).flat(),kj,_j],conditional_function:()=>{const e=ZO()&&!x;return e&&(x=!0),e}};function w(){g.push(Rv(m[h]).default),h++}if(p){const e=iy(s);e.ipLight.forEach(e=>{g.push({...Zg,stimulus:""}),g.push(mv(v,e))}),e.ipLight.filter(e=>"practice_response"===e.assessmentStage).length>0&&g.push(xv()),e.start.forEach(e=>{g.push({...Zg,stimulus:""}),g.push(mv(v,e)),g.push(i)});const t=e.cat.length;Uc("totalTestTrials",t);for(let e=0;e<t;e++)g.push({...Kg,stimulus:""}),g.push(mv(v)),g.push(i);const n={timeline:sy(e.unnormed,5).map(e=>mv(v,e))};g.push(n)}else{const e=Uc().totalDownexTrials;if(u){for(let t=0;t<e;t++){const e=t<5;5===t&&(g.push(xj),g.push(wj),g.push(xv(void 0,!0))),g.push(b(e))}g.push(kj),g.push(_j)}const t=Uc().totalTrials;Uc("totalTestTrials",u?PO(s)+PO(o):PO(s));const n=s.filter(e=>"practice_response"===e.assessmentStage).length+4;for(let e=0;e<t;e+=1)e%25==0&&w(),e<=n&&g.push(_),g.push(y)}return Rg(),g.push(fv()),g.push(qg),{jsPsych:Fg,timeline:g}},variants:{}},mentalRotation:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:(e,t)=>Uc().runCat?HL(e,t):function(e,t){const{runCat:n,heavyInstructions:i}=Uc(),{semThreshold:s}=Uc();let o=!1,a=!1;jv(e);const r=Cv(e,$g),c={timeline:[tv(t)],conditional_function:()=>{const e=Uc().nextStimulus;return!!n||"practice_response"!==e.assessmentStage}};let l=Uc().corpora.stimulus;const u=Uc().translations,p={},d={};for(const e of l){const{itemConfig:n,errorMessages:i}=Mj(e,u,t);d[e.itemId]=n,i.length&&(p[e.itemId]=i.join("; "))}if(Object.keys(p).length)throw console.error("The following errors were found"),console.table(p),new Error("Something went wrong. Please look in the console for error details");const m=DO(t,FO(l,25),["item","answer","distractors"]);let h=0;const f=BO(m,t),g=[Rv(n?t:f).default,r,...i?Fj:[Lj,Aj,jj]],v={trialType:"audio",responseAllowed:!0,promptAboveButtons:!0,task:e.task,layoutConfig:{showPrompt:!0},layoutConfigMap:d,terminateCat:n},y={timeline:[mv(v),c],conditional_function:()=>Uc().skipCurrentTrial?(Uc("skipCurrentTrial",!1),!1):!(n&&jg._seMeasurement<s)},b=l.filter(e=>1===Number(e.block_index)&&"practice_response"===e.assessmentStage);let x=!1;const _={timeline:[yv,...Fj,...b.map(e=>mv(v,e))],conditional_function:()=>{const e=ZO()&&!x;return e&&(x=!0),e}},w=l.filter(e=>"polygon"===e.trialType&&"practice_response"===e.assessmentStage),k=l.filter(e=>"3D"===e.trialType&&"practice_response"===e.assessmentStage);l=l.filter(e=>!w.includes(e)&&!k.includes(e)),Uc("corpora",{downex:Uc().corpora.downex,stimulus:l});const S={timeline:[Pj,...k.map(e=>mv(v,e)),{...Zg,stimulus:""}],conditional_function:()=>"3D"===Uc().nextStimulus.trialType&&!o&&(o=!0,!0)},T={timeline:[Rj,...w.map(e=>mv(v,e)),{...Zg,stimulus:""}],conditional_function:()=>!("polygon"!==Uc().nextStimulus.trialType||a||!i||(a=!0,0))};function E(){g.push(Rv(m[h]).default),h++}function C(){return i&&"2D"===Uc().nextStimulus.trialType?"mentalRotationInstruct5Downex":"generalYourTurn"}const I=l.length;Uc("totalTestTrials",PO(l));const O=b.length+4;for(let e=0;e<I;e++)e%25==0&&E(),e<=O&&g.push(_),g.push({...Kg,stimulus:""}),g.push(xv(C)),g.push(S),g.push(T),g.push(y);return Rg(),g.push(fv()),g.push(qg),{jsPsych:Fg,timeline:g}}(e,t),variants:{}},heartsAndFlowers:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:function(e,t){const n=2===Uc().version;n?document.body.classList.add("hf-touch"):document.body.classList.add("hf-mouseover");const{heavyInstructions:i}=Uc(),s=Rv(t).default;jv(e);const o=Cv(e,$g),a={practiceTrialCount:6,correctPracticeTrial:2,testTrialCount:12,stimulusPresentationTime:3e3,interStimulusInterval:500},r={practiceTrialCount:6,correctPracticeTrial:2,testTrialCount:16,stimulusPresentationTime:3e3,interStimulusInterval:500},c={practiceTrialCount:6,correctPracticeTrial:3,testTrialCount:16,stimulusPresentationTime:3e3,interStimulusInterval:500},l={practiceTrialCount:6,correctPracticeTrial:3,testTrialCount:16,stimulusPresentationTime:2e3,interStimulusInterval:500},u={testTrialCount:16,stimulusPresentationTime:1500,interStimulusInterval:500};let p=a.testTrialCount+r.testTrialCount+c.testTrialCount;n?i||(p+=l.testTrialCount+u.testTrialCount):p+=l.testTrialCount,Uc("totalTestTrials",p);let d=[s,o];if(n&&(d.push(fA()),d.push(gA()),d.push(vA())),a&&d.push(...bA(a,Bj.Heart)),r&&d.push(...bA(r,Bj.Flower)),c){const e=c;d.push(...xA()),d.push(...function(e){let t=0;const n=e=>{t=e.correct?t+1:0},i=n=>{t>=e.correctPracticeTrial&&Fg.endCurrentTimeline()},s=(r="heartPracticeFeedback2",c="feedbackGoodJob",l="flowerPracticeFeedback2",u="feedbackGoodJob",p=i,sA(r,c,l,u,p)),o={timeline:[Zj(e.interStimulusInterval),Xj(!0,Uj.HeartsAndFlowersPractice,Hj.HeartsAndFlowersPractice,e.stimulusPresentationTime,n),s],timeline_variables:tA(e.practiceTrialCount),randomize_order:!1},a={timeline:[uA(),pA(),dA(),zg]};var r,c,l,u,p;return[lA(),zg,o,a]}(e)),d.push(..._A(e))}return n?(l&&!i&&(d.push(mA()),d.push(..._A(l))),u&&!i&&(d.push(mA()),d.push(..._A(u)))):l&&d.push(..._A(l)),d.push(hA()),d.push(qg),{jsPsych:Fg,timeline:d}},variants:{}},memoryGame:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:function(e){const{heavyInstructions:t}=Uc();jv(e);const n=Rv(AM).default,i=Cv(e,$g),s={timeline:[...WA(!1,"memoryGameForwardTryAgain",3)]},o={timeline:[...WA(!0,"memoryGameBackwardTryAgain",3)]},a=()=>({timeline:[FA({mode:"display"}),FA({mode:"input"})],conditional_function:()=>Uc().numIncorrect<Uc().maxIncorrect}),r={timeline:[a()],repetitions:16},c={timeline:[FA({mode:"display"}),FA({mode:"input",resetSeq:!0})],conditional_function:()=>{const e=Uc().numIncorrect<Uc().maxIncorrect;return Uc("numIncorrect",0),e}},l={timeline:[FA({mode:"display",reverse:!0}),FA({mode:"input",reverse:!0})],repetitions:21};Uc("totalTestTrials",r.repetitions+l.repetitions);const u={timeline:[gv(!0,"feedbackCorrect","memoryGameForwardTryAgain",!0)],conditional_function:()=>Uc().isCorrect},p=(e,t)=>({timeline:[FA({reverse:e,mode:"input",isPractice:!0,animation:"pulse",prompt:t})],conditional_function:()=>!Uc().isCorrect}),d=(e,t,n)=>({timeline:[FA({reverse:e,mode:"display",isPractice:!0,customSeqLength:t}),FA({reverse:e,mode:"input",isPractice:!0,animation:n}),u,p(e,e?"memoryGameInstruct11Downex":"memoryGameFeedbackIncorrectDownex")]}),m={timeline:[KA[0],d(!1,1,"cursor"),d(!1,1),KA[1],d(!1,2,"cursor"),d(!1,2),d(!1,2),KA[2],KA[3],KA[4]]};let h=!1;const f={timeline:[yv,...m.timeline.slice(1)],conditional_function:()=>{const e=ZO(!0)&&!h;return e&&(h=!0,Uc("heavyInstructions",!0),Uc("gridSize",2),Uc("numOfBlocks",4),Uc("blockSize",50)),e}},g={timeline:[a(),f],repetitions:4},v={timeline:[d(!0,2,"cursor"),d(!0,2),d(!0,2)]},y={timeline:[qA,o,GA(!0,"memoryGameBackwardTryAgain")]},b={timeline:[...VA,s,GA(!1,"memoryGameForwardTryAgain"),HA]},x=[n,i,t?m:b,zg,g,zg,r,c,UA,zg,t?v:y,HA,zg,l,fv()];return Rg(),x.push(qg),{jsPsych:Fg,timeline:x}},variants:{}},sameDifferentSelection:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:(e,t)=>Uc().runCat?kL(e,t):function(e,t){const n=Uc().heavyInstructions;let i=Uc().corpora.stimulus;n||2!==Uc().version||(i=i.filter(e=>!(e.trialType.includes("something-same")&&"practice_response"!==e.assessmentStage)),Uc("corpora",{practice:Uc().corpora.practice,stimulus:i}));const s=DO(t,FO(i,25),["image","answer","distractors"]),o=BO(s,t);o.images={};const a=Rv(o).default;jv(e);const r=[a,Cv(e,$g)],c={timeline:[tv(t)],conditional_function:()=>{const e=Uc().nextStimulus.trialType,t=Uc().nextStimulus.assessmentStage;return!("something-same-2"!==e&&!e.includes("match")||"practice_response"===t)}},l={timeline:[gv(!0,"feedbackCorrect","feedbackNotQuiteRight")],conditional_function:()=>"practice_response"===Uc().nextStimulus.assessmentStage&&!Uc().nextStimulus.trialType.includes("something-same-1")&&2===Uc().version},u={timeline:[2===Uc().version?vL():xL(),l]},p={timeline:[rL(),l]},d={timeline:[JA],conditional_function:()=>Uc().numIncorrect>=Uc().maxIncorrect&&n},{blockCountList:m,blockOperations:h}=wL(!1),f=m.reduce((e,t)=>e+t,0);Uc("totalTestTrials",f);let g=0;function v(){r.push(Rv(s[g]).default),g++}const y=2===Uc().version?0:350,b={updateTestDimensions:()=>{r.push({...Kg,stimulus:""}),r.push(u)},updateSomethingSame:()=>{r.push({...Kg,stimulus:"",trial_duration:y}),r.push(u),r.push(c),r.push(d)},updateMatching:()=>{r.push({...Kg,stimulus:"",trial_duration:y}),r.push(p),r.push(c),r.push(d)}};let x=0;return m.forEach((e,t)=>{for(let n=0;n<e;n+=1)x%25==0&&v(),b[h[t]](),x++}),Rg(),r.push(fv()),r.push(qg),{jsPsych:Fg,timeline:r}}(e,t),variants:{}},trog:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:async function(e,t){const n=Rv(t).default;Uc("currentCatBlock",0),jv(e);const i=Cv(e,$g),s=[],o=Uc().corpora.stimulus,a=Uc().translations,r={},{runCat:c}=Uc(),{semThreshold:l}=Uc(),u={};for(const e of o){const{itemConfig:n,errorMessages:i}=AL(e,a,t);u[e.itemId]=n,i.length&&(r[e.itemId]=i.join("; "))}if(Object.keys(r).length)throw console.error("The following errors were found"),console.table(r),new Error("Something went wrong. Please look in the console for error details");const p=DO(t,FO(o,25),["answer","distractors"]);let d=0;if(Uc().isRoarApp)s.push(i,n);else{const e=c?n:TL();s.push(e,i)}const m={trialType:"audio",responseAllowed:!0,promptAboveButtons:!0,task:e.task,layoutConfig:{showPrompt:!1},layoutConfigMap:u,terminateCat:!1},h={timeline:[mv(m,void 0)],conditional_function:()=>Uc().skipCurrentTrial?(Uc("skipCurrentTrial",!1),!1):!(c&&jg._seMeasurement<l)};function f(){s.push(Rv(p[d]).default),d++}if(c){const e=iy(o);e.ipLight.forEach(e=>{s.push({...Zg,stimulus:""}),s.push(mv(m,e))}),e.ipLight.filter(e=>"practice_response"===e.assessmentStage).length>0&&s.push(xv()),e.start.forEach(e=>{s.push({...Zg,stimulus:""}),s.push(mv(m,e))});const t=e.cat.length;Uc("totalTestTrials",t);for(let e=0;e<t;e++)s.push({...Kg,stimulus:""}),s.push(h);const n={timeline:sy(e.unnormed,5).map(e=>mv(m,e))};s.push(n)}else if(Yc()){await Mg(e),LL=Qv(e);const t=o.filter(e=>{var t,n;return(null===(t=e.trialType)||void 0===t?void 0:t.includes("instruction"))||(null===(n=e.assessmentStage)||void 0===n?void 0:n.includes("instruction"))});for(const e of t)s.push({...Zg,stimulus:""}),s.push(mv(m,e));Dg({ignorePreviousItem:!0});const n={timeline:[{...Kg,stimulus:""},mv(m)],conditional_function:()=>null!=Uc().nextStimulus,loop_function:()=>null!=Uc().nextStimulus,on_timeline_finish:()=>{Dg()}};s.push(n),s.push({...Kg,stimulus:""}),s.push({...xv(),conditional_function:()=>(Dg({ignorePreviousItem:!0}),Uc().currentCatBlock>0)});const i={timeline:[{...Kg,stimulus:""},mv({...m,validityEvaluator:LL})],conditional_function:()=>null!=Uc().nextStimulus,loop_function:()=>(Dg(),null!=Uc().nextStimulus),on_timeline_finish:()=>{const{task:e,scoringVersion:t,currentCatBlock:n}=Uc(),{catOrderMap:i}=Vr[e][t],s=i[n],o=Pg[s]||0;"composite"===s&&o>0&&o%5==0?Ng(2):"new"===s&&Ng(1)}};s.push(i)}else{const e=Uc().totalTrials;Uc("totalTestTrials",PO(o));for(let t=0;t<e;t++)Uc().isRoarApp||t%25!=0||f(),s.push({...Kg,stimulus:""}),Uc().isRoarApp&&s.push(xv()),s.push(h)}return Rg(),s.push(fv()),s.push(qg),{jsPsych:Fg,timeline:s}},variants:{}},vocab:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:function(e,t){jv(e);const n=Cv(e,$g),i=Uc().corpora.stimulus,s=Uc().translations,o={},{runCat:a}=Uc(),{semThreshold:r}=Uc(),c={};for(const e of i){const{itemConfig:n,errorMessages:i}=SL(e,s,t);c[e.itemId]=n,i.length&&(o[e.itemId]=i.join("; "))}if(Object.keys(o).length)throw console.error("The following errors were found"),console.table(o),new Error("Something went wrong. Please look in the console for error details");const l=DO(t,FO(i,25),["answer","distractors"]);let u=0;const p=a?Rv(t).default:TL(),d={trialType:"audio",responseAllowed:!0,promptAboveButtons:!0,task:e.task,layoutConfig:{showPrompt:!1},layoutConfigMap:c,terminateCat:!1};function m(){f.push(Rv(l[u]).default),u++}const h={timeline:[{...Kg,stimulus:""},mv(d)],conditional_function:()=>Uc().skipCurrentTrial?(Uc("skipCurrentTrial",!1),!1):!(a&&jg._seMeasurement<r)},f=[p,n];if(a){const e=iy(i);e.ipLight.forEach(e=>{f.push({...Zg,stimulus:""}),f.push(mv(d,e))}),e.start.forEach(e=>{f.push({...Zg,stimulus:""}),f.push(mv(d,e))});const t=e.cat.length;Uc("totalTestTrials",t);for(let e=0;e<t;e++)f.push(h);const n={timeline:sy(e.unnormed,5).map(e=>mv(d,e))};f.push(n)}else{const e=Uc().totalTrials;Uc("totalTestTrials",PO(i));for(let t=0;t<e;t++)t%25==0&&m(),f.push(h)}return Rg(),f.push(fv()),f.push(qg),{jsPsych:Fg,timeline:f}}},theoryOfMind:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:IL,variants:{}},intro:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:function(e,t){const n=Rv(t).default;jv(e);const i=[n,Cv(e,$g),...jL];return i.push(fv("introFinished")),i.push(qg),{jsPsych:Fg,timeline:i}},variants:{}},roarInference:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:async function(e,t){const n=Rv(t).default;Uc("currentCatBlock",0),jv(e);const i=[n,Cv(e,$g),...PL],s=Uc().corpora.stimulus,o=Uc().translations,a={},r={};for(const e of s){const{itemConfig:n,errorMessages:i}=FL(e,o,t);r[e.itemId]=n,r[e.itemId].story=ry(e.item),r[e.itemId].storyId=e.itemId,i.length&&(a[e.itemId]=i.join("; "))}const c={responseAllowed:!0,promptAboveButtons:!0,task:e.task,layoutConfigMap:r},l=e=>({timeline:[DL(e)]});if(Yc()){await Mg(e),Dg({ignorePreviousItem:!0}),BL=Qv(e);const t={timeline:[DL({...c,validityEvaluator:BL})],loop_function:()=>{const e=Ag.remainingItems.filter(e=>{var t;return e.itemId===(null===(t=Uc().nextStimulus)||void 0===t?void 0:t.itemId)});return Dg({additionalItemsToRemove:e}),null!=Uc().nextStimulus}};i.push(t)}else{const e={timeline:[yv],conditional_function:()=>Uc().numIncorrect>=2},t={timeline:PL,conditional_function:()=>Uc().numIncorrect>=2},n=Uc().inferenceNumStories,s=Uc().stimulusBlocks,o=null==n||null==s?Uc().totalTrials:n*s;for(let n=0;n<o;n+=1)4===n&&(i.push(e),i.push(t)),i.push({...Kg,stimulus:""}),i.push(l(c))}return Rg(),i.push(fv()),i.push(qg),{jsPsych:Fg,timeline:i}},variants:{inferenceKids:{}}},adultReasoning:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:function(e,t){const n=Rv(t).default;jv(e);const i=[n,Cv(e,$g)],s=Uc().corpora.stimulus,o=Uc().translations,a={},r=Uc().runCat;Uc("totalTestTrials",PO(s));const c={};for(const e of s){const{itemConfig:n,errorMessages:i}=$L(e,o,t);c[e.itemId]=n,i.length&&(a[e.itemId]=i.join("; "))}if(Object.keys(a).length)throw console.error("The following errors were found"),console.table(a),new Error("Something went wrong. Please look in the console for error details");const l={trialType:"audio",responseAllowed:!0,promptAboveButtons:!0,task:e.task,layoutConfigMap:c,terminateCat:!1},u=e=>({timeline:[mv(l,e)]});let p;if(r){const e=iy(s,!1);p=8,[...e.ipLight,...e.ipHeavy].forEach(e=>{i.push({...Zg,stimulus:""}),i.push(u(e))})}else p=Uc().totalTrials;for(let e=0;e<p;e++)i.push({...Kg,stimulus:""}),i.push(u());return Rg(),i.push(fv()),i.push(qg),{jsPsych:Fg,timeline:i}},variants:{}},hostileAttribution:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:IL,variants:{}},childSurvey:{setConfig:Qr,getCorpus:nl,getTranslations:sl,buildTaskTimeline:function(e,t){const n=Rv(t).default;jv(e);const i=[n,Cv(e,$g)];let s=Uc().corpora.stimulus;const o=Uc().translations,a={};Uc("totalTrials",s.length);const r={};for(const e of s){const{itemConfig:n,errorMessages:i}=zL(e,o,t);r[e.itemId]=n,i.length&&(a[e.itemId]=i.join("; "))}if(Object.keys(a).length)throw console.error("The following errors were found"),console.table(a),new Error("Something went wrong. Please look in the console for error details");const c={trialType:"audio",responseAllowed:!0,promptAboveButtons:!0,task:e.task,layoutConfigMap:r,terminateCat:!1},l={timeline:[{...Kg,stimulus:""},UL(c)]};Uc("totalTestTrials",PO(s));const u=Uc().totalTrials;for(let e=0;e<u;e++)i.push(l);return Rg(),i.push(fv()),i.push(qg),{jsPsych:Fg,timeline:i}},variants:{}}};const KL=Object.prototype.toString;function WL(e){switch(KL.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ZL(e,Error)}}function GL(e,t){return KL.call(e)===`[object ${t}]`}function YL(e){return GL(e,"Object")}function JL(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function ZL(e,t){try{return e instanceof t}catch(e){return!1}}function XL(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}function QL(e,t){let n=e;const i=n.length;if(i<=150)return n;t>i&&(t=i);let s=Math.max(t-60,0);s<5&&(s=0);let o=Math.min(s+140,i);return o>i-5&&(o=i),o===i&&(s=Math.max(o-140,0)),n=n.slice(s,o),s>0&&(n=`'{snip} ${n}`),o<i&&(n+=" {snip}"),n}function eP(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const i=e[t];try{XL(i)?n.push("[VueViewModel]"):n.push(String(i))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function tP(e){return e&&e.Math==Math?e:void 0}const nP="object"==typeof globalThis&&tP(globalThis)||"object"==typeof window&&tP(window)||"object"==typeof self&&tP(self)||"object"==typeof global&&tP(global)||function(){return this}()||{};function iP(e,t,n){const i=n||nP,s=i.__SENTRY__=i.__SENTRY__||{};return s[e]||(s[e]=t())}const sP=nP;function oP(e,t){const n=e,i=[];let s,o,a,r,c;if(!n||!n.tagName)return"";if(sP.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;i.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(l&&l.length)l.forEach(e=>{i.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&i.push(`#${n.id}`),s=n.className,s&&GL(s,"String"))for(o=s.split(/\s+/),c=0;c<o.length;c++)i.push(`.${o[c]}`);const u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)a=u[c],r=n.getAttribute(a),r&&i.push(`[${a}="${r}"]`);return i.join("")}const aP="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,rP=["debug","info","warn","error","log","assert","trace"],cP={};function lP(e){if(!("console"in nP))return e();const t=nP.console,n={},i=Object.keys(cP);i.forEach(e=>{const i=cP[e];n[e]=t[e],t[e]=i});try{return e()}finally{i.forEach(e=>{t[e]=n[e]})}}const uP=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return aP?rP.forEach(n=>{t[n]=(...t)=>{e&&lP(()=>{nP.console[n](`Sentry Logger [${n}]:`,...t)})}}):rP.forEach(e=>{t[e]=()=>{}}),t}();function pP(e,t,n){if(!(t in e))return;const i=e[t],s=n(i);"function"==typeof s&&function(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,dP(e,"__sentry_original__",t)}catch(e){}}(s,i),e[t]=s}function dP(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){aP&&uP.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function mP(e){if(WL(e))return{message:e.message,name:e.name,stack:e.stack,...fP(e)};if(t=e,"undefined"!=typeof Event&&ZL(t,Event)){const t={type:e.type,target:hP(e.target),currentTarget:hP(e.currentTarget),...fP(e)};return"undefined"!=typeof CustomEvent&&ZL(e,CustomEvent)&&(t.detail=e.detail),t}return e;var t}function hP(e){try{return t=e,"undefined"!=typeof Element&&ZL(t,Element)?function(e,t={}){if(!e)return"<unknown>";try{let n=e;const i=5,s=[];let o=0,a=0;const r=" > ",c=r.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<i&&(l=oP(n,u),!("html"===l||o>1&&a+s.length*c+l.length>=p));)s.push(l),a+=l.length,n=n.parentNode;return s.reverse().join(r)}catch(e){return"<unknown>"}}(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}var t}function fP(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function gP(e){return vP(e,new Map)}function vP(e,t){if(function(e){if(!YL(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const i={};t.set(e,i);for(const n of Object.keys(e))void 0!==e[n]&&(i[n]=vP(e[n],t));return i}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const i=[];return t.set(e,i),e.forEach(e=>{i.push(vP(e,t))}),i}return e}const yP="<anonymous>";function bP(e){try{return e&&"function"==typeof e&&e.name||yP}catch(e){return yP}}const xP={},_P={};function wP(e){const t="console";!function(e,t){xP[e]=xP[e]||[],xP[e].push(t)}(t,e),function(e,t){_P[e]||(t(),_P[e]=!0)}(t,kP)}function kP(){"console"in nP&&rP.forEach(function(e){e in nP.console&&pP(nP.console,e,function(t){return cP[e]=t,function(...t){!function(e,t){const n=e&&xP[e];if(n)for(const i of n)try{i(t)}catch(t){aP&&uP.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${bP(i)}\nError:`,t)}}("console",{args:t,level:e});const n=cP[e];n&&n.apply(nP.console,t)}})})}function SP(){const e=nP,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function TP(e,t=100,n=1/0){try{return EP("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function EP(e,t,n=1/0,i=1/0,s=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,a]=s;if(null==t||["number","boolean","string"].includes(typeof t)&&("number"!=typeof(r=t)||r==r))return t;var r;const c=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(XL(t))return"[VueViewModel]";if(function(e){return YL(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}(t))return"[SyntheticEvent]";if("number"==typeof t&&t!=t)return"[NaN]";if("function"==typeof t)return`[Function: ${bP(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const n=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}(e,t);if(!c.startsWith("[object "))return c;if(t.__sentry_skip_normalization__)return t;const l="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===l)return c.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&"function"==typeof u.toJSON)try{return EP("",u.toJSON(),l-1,i,s)}catch(e){}const p=Array.isArray(t)?[]:{};let d=0;const m=mP(t);for(const e in m){if(!Object.prototype.hasOwnProperty.call(m,e))continue;if(d>=i){p[e]="[MaxProperties ~]";break}const t=m[e];p[e]=EP(e,t,l-1,i,s),d++}return a(t),p}var CP;!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(CP||(CP={}));class IP{constructor(e){IP.prototype.__init.call(this),IP.prototype.__init2.call(this),IP.prototype.__init3.call(this),IP.prototype.__init4.call(this),this._state=CP.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new IP((n,i)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){i(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){i(e)}else i(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new IP((t,n)=>{let i,s;return this.then(t=>{s=!1,i=t,e&&e()},t=>{s=!0,i=t,e&&e()}).then(()=>{s?n(i):t(i)})})}__init(){this._resolve=e=>{this._setResult(CP.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(CP.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===CP.PENDING&&(JL(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===CP.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===CP.RESOLVED&&e[1](this._value),this._state===CP.REJECTED&&e[2](this._value),e[0]=!0)})}}}const OP=["fatal","error","warning","log","info","debug"];function jP(e){return"warn"===e?"warning":OP.includes(e)?e:"log"}function AP(){return Date.now()/1e3}const LP=function(){const{performance:e}=nP;if(!e||!e.now)return AP;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();(()=>{const{performance:e}=nP;if(!e||!e.now)return;const t=36e5,n=e.now(),i=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-i):t,o=s<t,a=e.timing&&e.timing.navigationStart,r="number"==typeof a?Math.abs(a+n-i):t;(o||r<t)&&(s<=r&&e.timeOrigin)})();const PP="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,RP="production";function MP(e,t,n,i=0){return new IP((s,o)=>{const a=e[i];if(null===t||"function"!=typeof a)s(t);else{const r=a({...t},n);PP&&a.id&&null===r&&uP.log(`Event processor "${a.id}" dropped event`),JL(r)?r.then(t=>MP(e,t,n,i+1).then(s)).then(null,o):MP(e,r,n,i+1).then(s).then(null,o)}})}function NP(e){const t=LP(),n={sid:SP(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return gP({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&DP(n,e),n}function DP(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||LP(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:SP()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function FP(e){const{spanId:t,traceId:n}=e.spanContext(),{data:i,op:s,parent_span_id:o,status:a,tags:r,origin:c}=BP(e);return gP({data:i,op:s,parent_span_id:o,span_id:t,status:a,tags:r,trace_id:n,origin:c})}function BP(e){return function(e){return"function"==typeof e.getSpanJSON}(e)?e.getSpanJSON():"function"==typeof e.toJSON?e.toJSON():{}}function $P(e){if(e)return function(e){return e instanceof WP||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>zP.includes(e))}(e)?{captureContext:e}:e}const zP=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function qP(e,t){const n="string"==typeof t?t:void 0,i="string"!=typeof t?{captureContext:t}:void 0;return eR().captureMessage(e,n,i)}function UP(){return eR().getClient()}function HP(e){return e.transaction}function VP(e){const t=UP();if(!t)return{};const n=function(e,t,n){const i=t.getOptions(),{publicKey:s}=t.getDsn()||{},{segment:o}=n&&n.getUser()||{},a=gP({environment:i.environment||RP,release:i.release,user_segment:o,public_key:s,trace_id:e});return t.emit&&t.emit("createDsc",a),a}(BP(e).trace_id||"",t,eR().getScope()),i=HP(e);if(!i)return n;const s=i&&i._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:o,source:a}=i.metadata;null!=o&&(n.sample_rate=`${o}`);const r=BP(i);return a&&"url"!==a&&(n.transaction=r.description),n.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return Boolean(1&t)}(i)),t.emit&&t.emit("createDsc",n),n}function KP(e,t){const{fingerprint:n,span:i,breadcrumbs:s,sdkProcessingMetadata:o}=t;!function(e,t){const{extra:n,tags:i,user:s,contexts:o,level:a,transactionName:r}=t,c=gP(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=gP(i);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=gP(s);u&&Object.keys(u).length&&(e.user={...u,...e.user});const p=gP(o);p&&Object.keys(p).length&&(e.contexts={...p,...e.contexts});a&&(e.level=a);r&&(e.transaction=r)}(e,t),i&&function(e,t){e.contexts={trace:FP(t),...e.contexts};const n=HP(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:VP(t),...e.sdkProcessingMetadata};const i=BP(n).description;i&&(e.tags={transaction:i,...e.tags})}}(e,i),function(e,t){e.fingerprint=e.fingerprint?function(e){return Array.isArray(e)?e:[e]}(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,s),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}class WP{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=GP()}static clone(e){return e?e.clone():new WP}clone(){const e=new WP;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&DP(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e;if(t instanceof WP){const e=t.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),t.getRequestSession()&&(this._requestSession=t.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else if(YL(t)){const t=e;this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=GP(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const i={timestamp:AP(),...e},s=this._breadcrumbs;return s.push(i),this._breadcrumbs=s.length>n?s.slice(-n):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:t,_contexts:n,_tags:i,_extra:s,_user:o,_level:a,_fingerprint:r,_eventProcessors:c,_propagationContext:l,_sdkProcessingMetadata:u,_transactionName:p,_span:d}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:i,extra:s,user:o,level:a,fingerprint:r||[],eventProcessors:c,propagationContext:l,sdkProcessingMetadata:u,transactionName:p,span:d}}applyToEvent(e,t={},n=[]){KP(e,this.getScopeData());return MP([...n,...iP("globalEventProcessors",()=>[]),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:SP();if(!this._client)return uP.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},this),n}captureMessage(e,t,n){const i=n&&n.event_id?n.event_id:SP();if(!this._client)return uP.warn("No client configured on scope - will not capture message!"),i;const s=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:i},this),i}captureEvent(e,t){const n=t&&t.event_id?t.event_id:SP();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(uP.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function GP(){return{traceId:SP(),spanId:SP().substring(16)}}const YP=parseFloat("7.114.0"),JP=100;class ZP{constructor(e,t,n,i=YP){let s,o;this._version=i,t?s=t:(s=new WP,s.setClient(e)),n?o=n:(o=new WP,o.setClient(e)),this._stack=[{scope:s}],e&&this.bindClient(e),this._isolationScope=o}isOlderThan(e){return this._version<e}bindClient(e){const t=this.getStackTop();t.client=e,t.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();let n;try{n=e(t)}catch(e){throw this.popScope(),e}return JL(n)?n.then(e=>(this.popScope(),e),e=>{throw this.popScope(),e}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:SP(),i=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:i,...t,event_id:n}),n}captureMessage(e,t,n){const i=this._lastEventId=n&&n.event_id?n.event_id:SP(),s=new Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:i}),i}captureEvent(e,t){const n=t&&t.event_id?t.event_id:SP();return e.type||(this._lastEventId=n),this.getScope().captureEvent(e,{...t,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=JP}=i.getOptions&&i.getOptions()||{};if(o<=0)return;const a={timestamp:AP(),...e},r=s?lP(()=>s(a,t)):a;null!==r&&(i.emit&&i.emit("beforeAddBreadcrumb",r,t),n.addBreadcrumb(r,o))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=QP(this);try{e(this)}finally{QP(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return PP&&uP.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);if(PP&&!n){this.getClient()?uP.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):uP.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),DP(e,n)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:i,environment:s=RP}=n&&n.getOptions()||{},{userAgent:o}=nP.navigator||{},a=NP({release:i,environment:s,user:t.getUser(),...o&&{userAgent:o},...e}),r=t.getSession&&t.getSession();return r&&"ok"===r.status&&DP(r,{status:"exited"}),this.endSession(),t.setSession(a),a}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_callExtensionMethod(e,...t){const n=XP().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);PP&&uP.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function XP(){return nP.__SENTRY__=nP.__SENTRY__||{extensions:{},hub:void 0},nP}function QP(e){const t=XP(),n=tR(t);return nR(t,e),n}function eR(){const e=XP();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=XP()){t=e,t&&t.__SENTRY__&&t.__SENTRY__.hub&&!tR(e).isOlderThan(YP)||nR(e,new ZP);var t;return tR(e)}(e)}function tR(e){return iP("hub",()=>new ZP,e)}function nR(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}function iR(e,t){return Object.assign(function(...e){return t(...e)},{id:e})}const sR="CaptureConsole",oR=(e={})=>{const t=e.levels||rP;return{name:sR,setupOnce(){},setup(e){"console"in nP&&wP(({args:n,level:i})=>{UP()===e&&t.includes(i)&&function(e,t){const n={level:jP(t),extra:{arguments:e}};!function(...e){const t=eR();if(2===e.length){const[n,i]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,i(n))):t.withScope(i)}t.withScope(e[0])}(i=>{if(i.addEventProcessor(e=>(e.logger="console",function(e,t){const n=function(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}(e);if(!n)return;const i=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...i,...t},t&&"data"in t){const e={...i&&i.data,...t.data};n.mechanism.data=e}}(e,{handled:!1,type:"console"}),e)),"assert"===t&&!1===e[0]){const t=`Assertion failed: ${eP(e.slice(1)," ")||"console.assert"}`;return i.setExtra("arguments",e.slice(1)),void qP(t,n)}const s=e.find(e=>e instanceof Error);if("error"===t&&s)return o=s,a=n,void eR().captureException(o,$P(a));var o,a;qP(eP(e," "),n)})}(n,i)})}}};iR(sR,oR);const aR="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,rR="ExtraErrorData",cR=(e={})=>{const t=e.depth||3,n=e.captureErrorCause||!1;return{name:rR,setupOnce(){},processEvent:(e,i)=>function(e,t={},n,i){if(!t.originalException||!WL(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,o=function(e,t){try{const n=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],i={};for(const t of Object.keys(e)){if(-1!==n.indexOf(t))continue;const s=e[t];i[t]=WL(s)?s.toString():s}if(t&&void 0!==e.cause&&(i.cause=WL(e.cause)?e.cause.toString():e.cause),"function"==typeof e.toJSON){const t=e.toJSON();for(const e of Object.keys(t)){const n=t[e];i[e]=WL(n)?n.toString():n}}return i}catch(e){aR&&uP.error("Unable to extract extra data from the Error object:",e)}return null}(t.originalException,i);if(o){const t={...e.contexts},i=TP(o,n);return YL(i)&&(dP(i,"__sentry_skip_normalization__",!0),t[s]=i),{...e,contexts:t}}return e}(e,i,t,n)}};iR(rR,cR);const lR=nP,uR="ContextLines",pR=(e={})=>{const t=null!=e.frameContextLines?e.frameContextLines:7;return{name:uR,setupOnce(){},processEvent:e=>function(e,t){const n=lR.document,i=lR.location&&(s=lR.location.href,s.split(/[\?#]/,1)[0]);var s;if(!n||!i)return e;const o=e.exception&&e.exception.values;if(!o||!o.length)return e;const a=n.documentElement.innerHTML;if(!a)return e;const r=["<!DOCTYPE html>","<html>",...a.split("\n"),"</html>"];return o.forEach(e=>{const n=e.stacktrace;n&&n.frames&&(n.frames=n.frames.map(e=>function(e,t,n,i){if(e.filename!==n||!e.lineno||!t.length)return e;return function(e,t,n=5){if(void 0===t.lineno)return;const i=e.length,s=Math.max(Math.min(i-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,s-n),s).map(e=>QL(e,0)),t.context_line=QL(e[Math.min(i-1,s)],t.colno||0),t.post_context=e.slice(Math.min(s+1,i),s+1+n).map(e=>QL(e,0))}(t,e,i),e}(e,r,i,t)))}),e}(e,t)}};iR(uR,pR);const dR=new RegExp("^https:\\/\\/roar-levante-tasks--pr\\d+-\\w+\\.web\\.app\\/"),mR=new RegExp("^https:\\/\\/gse-roar-admin-staging\\.web\\.app\\/game\\/core-tasks|https:\\/\\/roar-staging--pr\\d+-\\w+\\.web\\.app\\/");var hR=nh;var fR=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:hR(e,t,n)},gR=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var vR=function(e){return gR.test(e)};var yR=function(e){return e.split("")},bR="\\ud800-\\udfff",xR="["+bR+"]",_R="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",wR="\\ud83c[\\udffb-\\udfff]",kR="[^"+bR+"]",SR="(?:\\ud83c[\\udde6-\\uddff]){2}",TR="[\\ud800-\\udbff][\\udc00-\\udfff]",ER="(?:"+_R+"|"+wR+")"+"?",CR="[\\ufe0e\\ufe0f]?",IR=CR+ER+("(?:\\u200d(?:"+[kR,SR,TR].join("|")+")"+CR+ER+")*"),OR="(?:"+[kR+_R+"?",_R,SR,TR,xR].join("|")+")",jR=RegExp(wR+"(?="+wR+")|"+OR+IR,"g");var AR=yR,LR=vR,PR=function(e){return e.match(jR)||[]};var RR=fR,MR=vR,NR=function(e){return LR(e)?PR(e):AR(e)},DR=fs;var FR=function(e){return function(t){t=DR(t);var n=MR(t)?NR(t):void 0,i=n?n[0]:t.charAt(0),s=n?RR(n,1).join(""):t.slice(1);return i[e]()+s}}("toUpperCase"),BR=fs,$R=FR;var zR=function(e){return $R(BR(e).toLowerCase())};var qR=function(e,t,n,i){var s=-1,o=null==e?0:e.length;for(i&&o&&(n=e[++s]);++s<o;)n=t(n,e[s],s,e);return n};var UR=function(e){return function(t){return null==e?void 0:e[t]}},HR=UR({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),VR=fs,KR=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,WR=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var GR=function(e){return(e=VR(e))&&e.replace(KR,HR).replace(WR,"")},YR=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var JR=function(e){return e.match(YR)||[]},ZR=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var XR=function(e){return ZR.test(e)},QR="\\ud800-\\udfff",eM="\\u2700-\\u27bf",tM="a-z\\xdf-\\xf6\\xf8-\\xff",nM="A-Z\\xc0-\\xd6\\xd8-\\xde",iM="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",sM="["+iM+"]",oM="\\d+",aM="["+eM+"]",rM="["+tM+"]",cM="[^"+QR+iM+oM+eM+tM+nM+"]",lM="(?:\\ud83c[\\udde6-\\uddff]){2}",uM="[\\ud800-\\udbff][\\udc00-\\udfff]",pM="["+nM+"]",dM="(?:"+rM+"|"+cM+")",mM="(?:"+pM+"|"+cM+")",hM="(?:['’](?:d|ll|m|re|s|t|ve))?",fM="(?:['’](?:D|LL|M|RE|S|T|VE))?",gM="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",vM="[\\ufe0e\\ufe0f]?",yM=vM+gM+("(?:\\u200d(?:"+["[^"+QR+"]",lM,uM].join("|")+")"+vM+gM+")*"),bM="(?:"+[aM,lM,uM].join("|")+")"+yM,xM=RegExp([pM+"?"+rM+"+"+hM+"(?="+[sM,pM,"$"].join("|")+")",mM+"+"+fM+"(?="+[sM,pM+dM,"$"].join("|")+")",pM+"?"+dM+"+"+hM,pM+"+"+fM,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",oM,bM].join("|"),"g");var _M=JR,wM=XR,kM=fs,SM=function(e){return e.match(xM)||[]};var TM=qR,EM=GR,CM=function(e,t,n){return e=kM(e),void 0===(t=n?void 0:t)?wM(e)?SM(e):_M(e):e.match(t)||[]},IM=RegExp("['’]","g");var OM=zR,jM=i(function(e){return function(t){return TM(CM(EM(t).replace(IM,"")),e,"")}}(function(e,t,n){return t=t.toLowerCase(),e+(n?OM(t):t)}));let AM,LM,PM,RM,MM;class NM{constructor(e,t,n,i){this.gameParams=t,this.userParams=n,this.firekit=e,Ig.setInstance(i,t,n)}async init(){var e,t,n;aT({dsn:"https://80b25aba46b9210279fa831982692c41@o4505913837420544.ingest.us.sentry.io/4509570973171713",integrations:[fO({maskAllText:!0,maskAllInputs:!0}),EO(),oR({levels:["error"]}),pR(),cR()],attachStacktrace:!0,tracesSampleRate:.2,tracePropagationTargets:[dR,mR,"https://roar.education/game/core-tasks","localhost"],replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,beforeSend:e=>e}),await this.firekit.startRun();const{taskName:i}=this.gameParams;let{language:s}=this.gameParams;Uc("language",s),"es"===s?s="es-CO":"en"===s?s="en-US":"de"===s&&(s="de-DE");const{setConfig:o,getCorpus:a,buildTaskTimeline:r,getTranslations:c}=VL[(l=i,l.replace(/-([a-z])/gi,(e,t)=>t.toUpperCase()))];var l;const u="gse-roar-assessment-dev"===(null===(n=null===(t=null===(e=this.firekit.firebaseProject)||void 0===e?void 0:e.firebaseApp)||void 0===t?void 0:t.options)||void 0===n?void 0:n.projectId),p=xr(this.firekit)&&"hearts-and-flowers"===i;let d,m,h,f;"roar-inference"!==i&&"trog"!==i&&(d=Gc(i,u,"visual",s,p),m=Gc("shared",u,"visual",s,p),h=Gc("shared",u,"audio",s,p),f=Gc("shared",u,"audio","shared",p));try{"roar-inference"===i||"trog"===i?(s=s.includes("-")?s.split("-")[0]:s,AM=await Lv(Wc[jM(i)],{},s)):(LM=await Av(h,{},s,i),PM=await Av(f,{},"shared",i),RM=await Av(d,{},s,i),MM=await Av(m,{},s,"shared"))}catch(e){throw new Error("Error fetching media assets: "+e)}const g=await o(this.firekit,this.gameParams,this.userParams);if(Hc(g),"roar-inference"===i||"trog"===i?await al(s):await c(u,i,s),"hearts-and-flowers"!==i&&"memory-game"!==i&&"intro"!==i&&await a(g,u),"roar-inference"!==i&&"trog"!==i){await async function(e,t){try{const n=t?"https://storage.googleapis.com/roar-levante-tasks/audio/assets-per-task.json":`https://storage.googleapis.com/levante-assets-${e?"dev":"prod"}/audio/assets-per-task.json`,i=await fetch(n);if(!i.ok)throw new Error(`Error: ${i.status}`);const s=await i.json();Uc("assetsPerTask",s)}catch(e){console.error("Error fetching JSON:",e)}}(u,p);const e=[...Uc().assetsPerTask[i].audio,...Uc().assetsPerTask.shared.audio];LM=NO(LM,[],e,[]),AM=MO([LM,PM,RM,MM])}return"undefined"!=typeof window&&(window.__mediaAssets=AM),r(g,AM)}async run(){(()=>{const e=document.createElement("div");e.style.height="100vh",e.style.width="100%",e.style.display="flex",e.style.justifyContent="center",e.style.alignItems="center";const t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("id",Yv),t.setAttribute("viewBox","0 0 620 620"),t.setAttribute("width","300"),t.setAttribute("height","300"),t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),t.innerHTML='\n<path d="M0 0 C24.09 0 48.18 0 73 0 C73.02578125 9.21035156 73.0515625 18.42070312 73.078125 27.91015625 C73.10330942 33.76629693 73.12949358 39.6224053 73.16015625 45.47851562 C73.20857611 54.76114635 73.25306661 64.0436696 73.27099609 73.32641602 C73.28407714 80.08918842 73.31120425 86.85174028 73.35461307 93.61438841 C73.37708434 97.18918321 73.39291942 100.76370749 73.39188385 104.33857918 C73.39256883 127.11586982 74.23570821 146.37753421 90.7109375 163.90234375 C107.7336873 179.50168956 126.19678116 180.0085557 149 181 C149 201.46 149 221.92 149 243 C137.3984375 243.0928125 137.3984375 243.0928125 125.5625 243.1875 C121.9574353 243.22846802 121.9574353 243.22846802 118.27954102 243.27026367 C89.84890928 243.45838537 62.7303181 237.3912908 41 218 C40.195625 217.33742187 39.39125 216.67484375 38.5625 215.9921875 C15.62349402 196.56571681 3.1542582 167.45107438 0 138 C-0.60820541 127.98024643 -0.48418408 117.93638697 -0.40557575 107.90311861 C-0.38014294 104.09424643 -0.37818782 100.28535391 -0.37347412 96.47640991 C-0.36116486 89.30174746 -0.32851125 82.1273361 -0.28807616 74.95278299 C-0.23450338 65.23091629 -0.21331532 55.50897828 -0.19006729 45.78700066 C-0.15273718 30.52447994 -0.07296807 15.26248845 0 0 Z "\nfill="#DB6D4D"\ntransform="translate(196,0)"\nopacity="0"\n>\n<animate\n attributeName="opacity"\n values="0;1;0" dur="5s"\n repeatCount="indefinite"\n begin="0s"\n/>\n</path>\n<path\nd="M0 0 C11.37841346 8.89805809 18.73092589 19.52930095 21 34 C22.1080213 50.42051238 18.52116018 63.60192587 8.25 76.6875 C-1.02678931 86.93062153 -13.86891708 91.96497271 -27.39453125 93.22265625 C-40.74614178 93.7187581 -53.20738631 89.38311632 -63.25 80.6875 C-74.02276382 70.48883331 -79.85558558 59.20121837 -81.25390625 44.29296875 C-81.58878931 30.11625272 -76.74215899 17.13488118 -67.4453125 6.47265625 C-49.54816026 -11.62462389 -20.98880433 -14.72964304 0 0 Z "\nfill="#DB6D4D"\ntransform="translate(366,74)"\nopacity="0"\n>\n<animate\n attributeName="opacity"\n values="0;1;0" dur="5s"\n repeatCount="indefinite"\n begin="0s"\n/>\n</path>\n<path d="M0 0 C12.51011518 36.24822591 12.51011518 36.24822591 18.3125 54.125 C18.69075928 55.27774414 19.06901855 56.43048828 19.45874023 57.61816406 C19.96836304 59.20322754 19.96836304 59.20322754 20.48828125 60.8203125 C20.92974487 62.18567139 20.92974487 62.18567139 21.38012695 63.57861328 C22 66 22 66 22 70 C12.96644407 72.96724191 3.93255713 75.93347463 -5.10151291 78.89915085 C-7.30484958 79.62248843 -9.5081552 80.34592052 -11.7114563 81.06936646 C-26.21102811 85.82998317 -40.71066204 90.59012886 -55.2265625 95.30078125 C-56.20511703 95.61847473 -57.18367157 95.93616821 -58.19187927 96.26348877 C-62.61363753 97.69852205 -67.03621701 99.13093815 -71.46020508 100.55908203 C-79.09042671 103.02746897 -86.70343688 105.54264752 -94.28125 108.16796875 C-94.97008774 108.40257309 -95.65892548 108.63717743 -96.36863708 108.87889099 C-110.54784019 113.85273609 -121.18811853 123.69114156 -128 137 C-136.99975018 158.53898413 -133.07868152 176.70799748 -126 198 C-132.88225468 200.84509207 -139.81998016 203.3616014 -146.8984375 205.671875 C-148.39451035 206.16279633 -148.39451035 206.16279633 -149.92080688 206.66363525 C-152.00930547 207.34762463 -154.09837388 208.02987634 -156.18798828 208.71044922 C-159.38929256 209.754662 -162.58724517 210.80872909 -165.78515625 211.86328125 C-167.82272058 212.52924609 -169.8604744 213.19463149 -171.8984375 213.859375 C-172.85261566 214.17493347 -173.80679382 214.49049194 -174.78988647 214.81561279 C-176.1224498 215.24671356 -176.1224498 215.24671356 -177.48193359 215.68652344 C-178.64914444 216.06813629 -178.64914444 216.06813629 -179.8399353 216.4574585 C-182 217 -182 217 -186 217 C-187.80586082 211.56279281 -189.60185987 206.12245568 -191.3894043 200.67919922 C-191.99683258 198.83394101 -192.60679082 196.98951338 -193.21948242 195.14599609 C-203.87785511 163.05758381 -207.6994984 131.07930289 -192.25 99.75 C-173.86339677 64.08112015 -142.60268168 45.20781506 -105.5 33.3125 C-103.67842985 32.71806925 -101.85723081 32.12250022 -100.03637695 31.52587891 C-96.25652937 30.28983576 -92.47437187 29.06129422 -88.68994141 27.83935547 C-83.12619954 26.04280109 -77.56841759 24.22835842 -72.01171875 22.41015625 C-63.98212309 19.78464066 -55.94801637 17.17331753 -47.91146851 14.56916809 C-42.55631958 12.83276545 -37.2044956 11.08653766 -31.8553009 9.33187866 C-28.39236749 8.19620294 -24.92837755 7.06377153 -21.46426392 5.93170166 C-19.83451375 5.3981865 -18.20525212 4.86317644 -16.57650757 4.32659912 C-14.34395845 3.59133454 -12.10971646 2.86145827 -9.875 2.1328125 C-9.21780472 1.91481995 -8.56060944 1.69682739 -7.88349915 1.472229 C-5.11661779 0.57530632 -2.93271586 0 0 0 Z "\nfill="#E2A1C1"\ntransform="translate(564,83)"\nopacity="0"\n>\n<animate\n attributeName="opacity"\n values="0;1;0" dur="5s"\n repeatCount="indefinite"\n begin="1s"\n/>\n</path>\n<path\nd="M0 0 C10.26936887 9.37737469 15.16600426 22.67108026 16.00390625 36.26953125 C16.00390625 51.32581634 11.0212786 63.27511318 1.00390625 74.4140625 C-11.45158925 85.69486306 -25.45429345 89.3003282 -41.83642578 88.59326172 C-54.48816802 87.5434789 -65.41276982 80.86599259 -73.9609375 71.8203125 C-84.21738579 59.6936865 -87.14147747 45.90900195 -86.17626953 30.39648438 C-85.11900523 18.76371184 -78.43860464 7.30488456 -69.99609375 -0.5859375 C-48.66002535 -18.14411857 -21.34509255 -16.95911463 0 0 Z "\nfill="#E2A1C1"\ntransform="translate(531.99609375,214.5859375)"\nopacity="0"\n>\n<animate\n attributeName="opacity"\n values="0;1;0" dur="5s"\n repeatCount="indefinite"\n begin="1s"\n/>\n</path>\n\n<path\nd="M0 0 C10.61057853 9.04046744 19.67440674 18.97280644 27.83154297 30.26245117 C28.31558594 30.92873535 28.79962891 31.59501953 29.29833984 32.28149414 C32.01271735 36.0201812 34.71451386 39.76770134 37.40966797 43.52026367 C40.84583511 48.29578643 44.33391073 53.03184415 47.83154297 57.76245117 C55.11141789 67.61619203 62.27985122 77.54820147 69.43603516 87.49194336 C71.04619787 89.72855236 72.65747913 91.96435157 74.26904297 94.19995117 C74.79481934 94.93052734 75.3205957 95.66110352 75.86230469 96.41381836 C78.77279119 100.44806868 81.7135334 104.45695544 84.69091797 108.44213867 C85.329729 109.2994458 85.96854004 110.15675293 86.62670898 111.04003906 C87.85936429 112.69126601 89.09661202 114.33907774 90.33911133 115.98291016 C93.04740313 119.61363934 95.47469374 122.87676431 96.83154297 127.26245117 C90.03551221 133.07503903 83.00099885 138.34687314 75.67138672 143.45556641 C70.01170659 147.40700461 64.43976784 151.4653244 58.89404297 155.57495117 C52.60349114 160.23412663 46.29414934 164.84329103 39.83154297 169.26245117 C36.55752085 167.87611776 34.90341049 166.41738405 32.83544922 163.54370117 C32.28373047 162.78573242 31.73201172 162.02776367 31.16357422 161.24682617 C30.28765625 160.01706055 30.28765625 160.01706055 29.39404297 158.76245117 C28.77787109 157.91166992 28.16169922 157.06088867 27.52685547 156.18432617 C25.62066917 153.54918929 23.7256113 150.90630657 21.83154297 148.26245117 C20.72688087 146.73061914 19.62145049 145.19934077 18.51513672 143.66870117 C16.91801219 141.45883719 15.32152834 139.24854324 13.72827148 137.03588867 C9.79993936 131.58359878 5.82537165 126.16690367 1.83154297 120.76245117 C-2.70596936 114.62228548 -7.20790785 108.45875203 -11.66845703 102.26245117 C-17.94196118 93.55581489 -24.25522548 84.87968255 -30.66894531 76.27563477 C-31.94427699 74.5634262 -33.21153392 72.84520796 -34.47705078 71.12573242 C-44.22747925 58.31480729 -57.65258442 50.1113869 -73.60595703 47.75463867 C-92.77426409 45.87774194 -108.70355195 52.03913547 -123.54345703 63.76245117 C-124.59360497 64.62622207 -125.64314324 65.49073505 -126.69189453 66.35620117 C-129.16845703 68.26245117 -129.16845703 68.26245117 -131.16845703 68.26245117 C-132.38256836 66.89575195 -132.38256836 66.89575195 -133.75048828 64.95776367 C-134.52042114 63.87833496 -134.52042114 63.87833496 -135.3059082 62.77709961 C-135.85867432 61.98851562 -136.41144043 61.19993164 -136.98095703 60.38745117 C-138.16045251 58.72846047 -139.34014555 57.06961021 -140.52001953 55.41088867 C-141.12491211 54.55591797 -141.72980469 53.70094727 -142.35302734 52.82006836 C-145.16054744 48.86477243 -148.00958788 44.93982775 -150.85595703 41.01245117 C-156.32248065 33.44976662 -161.75504638 25.86322189 -167.16845703 18.26245117 C-164.08975342 14.98296254 -160.72033888 12.38392245 -157.04345703 9.82495117 C-152.91785218 6.92926854 -148.81467865 4.01422035 -144.77392578 1.00073242 C-101.02996257 -31.5115448 -44.00783623 -35.93908897 0 0 Z "\nfill="#E79E42"\ntransform="translate(501.16845703125,331.737548828125)"\nopacity="0"\n>\n<animate\n attributeName="opacity"\n values="0;1;0" dur="5s"\n repeatCount="indefinite"\n begin="2s"\n/>\n</path>\n<path \nd="M0 0 C10.30912429 9.80184992 15.69012279 21.70190093 16.22045898 35.89086914 C16.39947804 50.94474432 11.95795025 63.51433034 1.5 74.5625 C-9.9061953 85.39455795 -22.9256596 89.28762376 -38.39453125 89.02734375 C-53.46712434 88.18743228 -65.01653075 80.74860667 -75.03515625 69.875 C-85.11075314 57.5059808 -86.35380342 43.08383611 -85.25 27.8125 C-82.99631187 15.30860383 -75.31234412 3.53773236 -64.97265625 -3.8046875 C-43.84512009 -17.22217492 -19.31081268 -16.28166559 0 0 Z "\nfill="#E79E42"\ntransform="translate(451.25,409.1875)"\nopacity="0"\n>\n<animate\n attributeName="opacity"\n values="0;1;0" dur="5s"\n repeatCount="indefinite"\n begin="2s"\n/>\n</path>\n<path\nd="M0 0 C4.88157637 1.57409756 8.44018064 4.40154619 12.4375 7.5 C17.0707642 11.04518137 21.7162226 14.53703151 26.51342773 17.85766602 C52.51478097 35.89740709 69.59229597 60.60519879 75.53051758 91.78564453 C77.99571018 108.6638171 77.15662352 127.75822746 72 144 C71.79632813 144.69125977 71.59265625 145.38251953 71.3828125 146.09472656 C65.96412958 164.34933275 55.98444025 179.62037717 44.67333984 194.75 C41.90695744 198.46972282 39.20681466 202.23683755 36.5 206 C35.41698764 207.50023176 34.33365416 209.00023176 33.25 210.5 C32.71375 211.2425 32.1775 211.985 31.625 212.75 C30 215 28.375 217.25 26.75 219.5 C26.21383057 220.24241943 25.67766113 220.98483887 25.12524414 221.74975586 C24.04121584 223.2506555 22.95706858 224.75146922 21.87280273 226.25219727 C19.17412345 229.98773967 16.47748688 233.72472254 13.78515625 237.46484375 C7.59265435 246.06204578 1.35700505 254.62457933 -4.95605469 263.13378906 C-7.68875219 266.82516555 -10.38855985 270.53020992 -13 274.30859375 C-13.45737549 274.96698242 -13.91475098 275.62537109 -14.38598633 276.30371094 C-15.23058877 277.52617434 -16.06690593 278.75441958 -16.89331055 279.98925781 C-18.01171875 281.60546875 -18.01171875 281.60546875 -20 284 C-23.38420514 284 -23.97116449 283.55796384 -26.59765625 281.61328125 C-27.30728516 281.09378906 -28.01691406 280.57429688 -28.74804688 280.0390625 C-29.89370117 279.18441406 -29.89370117 279.18441406 -31.0625 278.3125 C-32.69908188 277.11049071 -34.33580449 275.90867301 -35.97265625 274.70703125 C-36.80941895 274.08908691 -37.64618164 273.47114258 -38.50830078 272.83447266 C-42.31909972 270.02883448 -46.15978521 267.26515797 -50 264.5 C-51.48064993 263.43124055 -52.96111749 262.36222839 -54.44140625 261.29296875 C-55.18148926 260.75849121 -55.92157227 260.22401367 -56.68408203 259.67333984 C-59.13251265 257.90425451 -61.58000038 256.13387032 -64.02734375 254.36328125 C-64.84912109 253.76902344 -65.67089844 253.17476562 -66.51757812 252.5625 C-68.09602805 251.42102209 -69.67416785 250.27911518 -71.25195312 249.13671875 C-71.96158203 248.62367188 -72.67121094 248.110625 -73.40234375 247.58203125 C-74.33808228 246.90491089 -74.33808228 246.90491089 -75.29272461 246.21411133 C-76.84109387 245.11300446 -78.41912991 244.05391339 -80 243 C-79.39295849 239.90071349 -78.41654477 237.87660113 -76.55078125 235.33984375 C-76.03942627 234.63827148 -75.52807129 233.93669922 -75.0012207 233.21386719 C-74.44394287 232.46266602 -73.88666504 231.71146484 -73.3125 230.9375 C-72.7352417 230.14891602 -72.1579834 229.36033203 -71.56323242 228.54785156 C-69.71538603 226.02699796 -67.85853419 223.51298165 -66 221 C-64.7914256 219.3608548 -63.5830892 217.72153409 -62.375 216.08203125 C-60.59263206 213.66397319 -58.80976401 211.24629621 -57.02490234 208.83007812 C-52.80867222 203.11753884 -48.66011649 197.36112402 -44.546875 191.57421875 C-41.61457164 187.45110281 -38.65135832 183.35046443 -35.6875 179.25 C-34.8677771 178.11510132 -34.8677771 178.11510132 -34.03149414 176.95727539 C-31.24870703 173.1058459 -28.4615849 169.25764487 -25.66796875 165.4140625 C-22.95480242 161.67870044 -20.25465264 157.93427623 -17.56542969 154.18164062 C-16.52762647 152.73531974 -15.48664181 151.29127603 -14.44238281 149.84960938 C-3.55927908 134.78711565 4.04212266 119.83573302 1.5703125 100.66796875 C-1.61357925 81.58427191 -11.52777514 68.27881812 -27 57 C-29.96430385 54.9417 -32.95724033 52.94031052 -36 51 C-34.72757348 48.33851091 -33.34399338 45.92766173 -31.63671875 43.5234375 C-31.16854736 42.86174561 -30.70037598 42.20005371 -30.21801758 41.51831055 C-29.71294678 40.81101807 -29.20787598 40.10372559 -28.6875 39.375 C-28.15987061 38.6322583 -27.63224121 37.8895166 -27.08862305 37.12426758 C-25.39661001 34.74648502 -23.6993083 32.37257367 -22 30 C-21.4421582 29.22092285 -20.88431641 28.4418457 -20.30957031 27.63916016 C-13.64545716 18.34549741 -6.91310802 9.11029739 0 0 Z "\nfill="#F9DB57"\ntransform="translate(273,323)"\nopacity="0"\n>\n<animate\n attributeName="opacity"\n values="0;1;0" dur="5s"\n repeatCount="indefinite"\n begin="3s"\n/>\n</path>\n<path\nd="M0 0 C10.14825309 9.6488946 15.66164055 21.48455313 16.22070312 35.48193359 C16.41521963 50.95572131 11.59944137 63.75226253 0.9375 75.125 C-10.15044071 85.49211856 -23.65114495 89.60050792 -38.7109375 89.1328125 C-53.58537599 87.78656089 -65.30974123 80.87734477 -75.0703125 69.734375 C-84.99925677 57.06125016 -86.54781164 43.48357553 -85.25 27.8125 C-82.81625534 15.00768436 -75.45494151 3.71022834 -64.90234375 -3.875 C-43.80273976 -17.25034326 -19.2543351 -16.23404724 0 0 Z "\nfill="#F9DB57"\ntransform="translate(241.25,393.1875)"\nopacity="0"\n>\n<animate\n attributeName="opacity"\n values="0;1;0" dur="5s"\n repeatCount="indefinite"\n begin="3s"\n/>\n</path>\n<path d="M0 0 C7.10882683 1.45341757 13.91774477 3.45782092 20.81640625 5.6953125 C21.91347397 6.04761932 23.01054169 6.39992615 24.14085388 6.76290894 C27.61596225 7.8798367 31.08924411 9.00232657 34.5625 10.125 C36.93021972 10.88708802 39.29805711 11.64881055 41.66601562 12.41015625 C47.44537842 14.26921152 53.22325523 16.13282654 59 18 C58.42918066 24.06798254 57.10842941 29.42521287 55.15625 35.1875 C54.86826538 36.04827148 54.58028076 36.90904297 54.28356934 37.79589844 C53.67229886 39.61254534 53.05686574 41.42779634 52.4375 43.24169922 C51.51391584 45.95905699 50.61579725 48.68394273 49.71875 51.41015625 C44.51155973 66.92259458 37.83953817 80.58380173 27 93 C26.43410156 93.72058594 25.86820313 94.44117188 25.28515625 95.18359375 C8.05690097 116.33250231 -20.01616086 127.95307792 -46.56591797 130.7890625 C-65.12447693 132.39734685 -82.8328286 130.14353075 -100.5546875 124.55078125 C-101.66775269 124.20380692 -102.78081787 123.85683258 -103.9276123 123.49934387 C-118.09221883 119.06437005 -132.20916109 114.4786749 -146.32568359 109.89349365 C-150.637994 108.49330012 -154.9511399 107.09568156 -159.26437378 105.69833565 C-162.83420797 104.54160046 -166.40338845 103.38292664 -169.97119141 102.21994019 C-176.72226537 100.02128395 -183.47806904 97.84186339 -190.25389862 95.72051907 C-193.43668931 94.72327553 -196.61673466 93.71743489 -199.79664612 92.71105385 C-201.31938174 92.23193247 -202.84349802 91.75717565 -204.3690033 91.28694725 C-206.47547675 90.63737464 -208.57685429 89.97330993 -210.67773438 89.3059082 C-211.87732788 88.93198441 -213.07692139 88.55806061 -214.31286621 88.17280579 C-215.19962036 87.78577988 -216.08637451 87.39875397 -217 87 C-218.26191736 83.21424791 -217.53515889 81.8128261 -216.30932617 78.04736328 C-215.91529099 76.82244171 -215.5212558 75.59752014 -215.11528015 74.33547974 C-214.67474682 72.99701259 -214.23397034 71.65862544 -213.79296875 70.3203125 C-213.34719815 68.94675897 -212.90216548 67.57296576 -212.45783997 66.19894409 C-211.28453619 62.57819626 -210.10026943 58.96112195 -208.91400146 55.34460449 C-207.95031322 52.40034786 -206.99449784 49.45356548 -206.03910351 46.50660896 C-204.89729452 42.98528573 -203.75184539 39.46515101 -202.60546875 35.9453125 C-202.38782553 35.27666294 -202.1701823 34.60801338 -201.94594383 33.91910172 C-201.32551892 32.01591046 -200.70224512 30.11364864 -200.07885742 28.21142578 C-199.72498459 27.13015411 -199.37111176 26.04888245 -199.0065155 24.93484497 C-198.08568339 22.24983964 -197.08109797 19.62397708 -196 17 C-189.60904884 18.33168207 -183.46374859 20.01138745 -177.2578125 22.02734375 C-176.32020584 22.32833481 -175.38259918 22.62932587 -174.4165802 22.93943787 C-172.38316093 23.59287079 -170.35034843 24.24819434 -168.31808472 24.9052124 C-165.07075307 25.95503741 -161.82182228 26.99978038 -158.57250977 28.04345703 C-148.04334571 31.4279984 -137.51993842 34.83030417 -126.99833679 38.23826694 C-121.61591722 39.98160171 -116.2327416 41.72259008 -110.84918213 43.46240139 C-106.94066979 44.7258988 -103.03352324 45.99351244 -99.1273737 47.26429462 C-96.09506142 48.24969405 -93.06104777 49.22983271 -90.02734375 50.2109375 C-88.3991143 50.74272865 -88.3991143 50.74272865 -86.73799133 51.28526306 C-68.94792644 57.02101886 -52.17082265 58.64783248 -34.7109375 50.45703125 C-13.92197296 38.95731289 -6.79270886 21.69293485 0 0 Z "\nfill="#F5D7BB"\ntransform="translate(221,238)"\nopacity="0"\n>\n<animate\n attributeName="opacity"\n values="0;1;0" dur="5s"\n repeatCount="indefinite"\n begin="4s"\n/>\n</path>\n<path\nd="M0 0 C9.23330394 9.96751847 13.94129582 22.44842451 14.6875 35.9375 C13.9784103 49.76474924 9.15683775 62.8308106 -0.42578125 72.90625 C-13.0046043 84.20329315 -26.97026457 87.78323285 -43.41796875 87.11230469 C-55.95614884 86.14658428 -67.35285191 79.25379406 -75.83984375 70.2265625 C-86.05674223 57.56884049 -89.31962282 43.86294784 -87.6875 27.9375 C-84.90395416 13.32781588 -77.10766305 1.50198351 -64.91918945 -6.85742188 C-44.22034547 -20.48505256 -18.00176966 -16.12828232 0 0 Z "\nfill="#F5D7BB"\ntransform="translate(193.6875,190.0625)"\nopacity="0"\n>\n<animate\n attributeName="opacity"\n values="0;1;0" dur="5s"\n repeatCount="indefinite"\n begin="4s"\n/>\n</path>\n',e.appendChild(t),document.body.appendChild(e)})();const{jsPsych:e,timeline:t}=await this.init();document.getElementById(Yv).remove();Ig.getInstance().capture("Task Launched",{taskName:this.gameParams.taskName,language:this.gameParams.language,gameParams:this.gameParams,userParams:this.userParams}),e.run(t);const n=Uc().translations,i=new Cg(4e3,n);Uc("pageSetup",i),i.init(),await(e=>{const t=n=>{e()?n():setTimeout(()=>t(n),400)};return new Promise(t)})(()=>{var e,t;return!0===(null===(t=null===(e=this.firekit)||void 0===e?void 0:e.run)||void 0===t?void 0:t.completed)&&Uc().taskComplete})}}export{NM as TaskLauncher,AM as mediaAssets};
17
+ //# sourceMappingURL=index.c92b94e1.js.map