@bdelab/roav-ran 1.0.19 → 1.0.20

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.
@@ -1,4 +1,4 @@
1
- ;!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0a70e5e6-09bd-4ce4-ae31-adceefe8522c",e._sentryDebugIdIdentifier="sentry-dbid-0a70e5e6-09bd-4ce4-ae31-adceefe8522c")}catch(e){}}();import e from"path";("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"fe4589f120c2a3869635b3998c58ba60a7520160"};var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,i={exports:{}};
1
+ ;!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cc82ae1b-7d9f-4d33-9d9b-68b1c174bf8e",e._sentryDebugIdIdentifier="sentry-dbid-cc82ae1b-7d9f-4d33-9d9b-68b1c174bf8e")}catch(e){}}();import e from"path";("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"54bead5cc5e593a837220f5cca3ccd500ee435a7"};var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,i={exports:{}};
2
2
  /*! store2 - v2.14.3 - 2024-02-14
3
3
  * Copyright (c) 2024 Nathan Bubna; Licensed MIT */t=i,function(e,n){var a={version:"2.14.3",areas:{},apis:{},nsdelim:".",inherit:function(e,n){for(var a in e)n.hasOwnProperty(a)||Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(e,a));return n},stringify:function(e,n){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e,n||a.replace)},parse:function(e,n){try{return JSON.parse(e,n||a.revive)}catch(n){return e}},fn:function(e,n){for(var t in a.storeAPI[e]=n,a.apis)a.apis[t][e]=n},get:function(e,n){return e.getItem(n)},set:function(e,n,a){e.setItem(n,a)},remove:function(e,n){e.removeItem(n)},key:function(e,n){return e.key(n)},length:function(e){return e.length},clear:function(e){e.clear()},Store:function(e,n,t){var i=a.inherit(a.storeAPI,(function(e,n,a){return 0===arguments.length?i.getAll():"function"==typeof n?i.transact(e,n,a):void 0!==n?i.set(e,n,a):"string"==typeof e||"number"==typeof e?i.get(e):"function"==typeof e?i.each(e):e?i.setAll(e,n):i.clear()}));i._id=e;try{var o="__store2_test";n.setItem(o,"ok"),i._area=n,n.removeItem(o)}catch(e){i._area=a.storage("fake")}return i._ns=t||"",a.areas[e]||(a.areas[e]=i._area),a.apis[i._ns+i._id]||(a.apis[i._ns+i._id]=i),i},storeAPI:{area:function(e,n){var t=this[e];return t&&t.area||(t=a.Store(e,n,this._ns),this[e]||(this[e]=t)),t},namespace:function(e,n,t){if(t=t||this._delim||a.nsdelim,!e)return this._ns?this._ns.substring(0,this._ns.length-t.length):"";var i=e,o=this[i];if(!(o&&o.namespace||((o=a.Store(this._id,this._area,this._ns+i+t))._delim=t,this[i]||(this[i]=o),n)))for(var s in a.areas)o.area(s,a.areas[s]);return o},isFake:function(e){return e?(this._real=this._area,this._area=a.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,n){for(var t=0,i=a.length(this._area);t<i;t++){var o=this._out(a.key(this._area,t));if(void 0!==o&&!1===e.call(this,o,this.get(o),n))break;i>a.length(this._area)&&(i--,t--)}return n||this},keys:function(e){return this.each((function(e,n,a){a.push(e)}),e||[])},get:function(e,n){var t,i=a.get(this._area,this._in(e));return"function"==typeof n&&(t=n,n=null),null!==i?a.parse(i,t):null!=n?n:i},getAll:function(e){return this.each((function(e,n,a){a[e]=n}),e||{})},transact:function(e,n,a){var t=this.get(e,a),i=n(t);return this.set(e,void 0===i?t:i),this},set:function(e,n,t){var i,o=this.get(e);return null!=o&&!1===t?n:("function"==typeof t&&(i=t,t=void 0),a.set(this._area,this._in(e),a.stringify(n,i),t)||o)},setAll:function(e,n){var a,t;for(var i in e)t=e[i],this.set(i,t,n)!==t&&(a=!0);return a},add:function(e,n,t){var i=this.get(e);if(i instanceof Array)n=i.concat(n);else if(null!==i){var o=typeof i;if(o===typeof n&&"object"===o){for(var s in n)i[s]=n[s];n=i}else n=i+n}return a.set(this._area,this._in(e),a.stringify(n,t)),n},remove:function(e,n){var t=this.get(e,n);return a.remove(this._area,this._in(e)),t},clear:function(){return this._ns?this.each((function(e){a.remove(this._area,this._in(e))}),1):a.clear(this._area),this},clearAll:function(){var e=this._area;for(var n in a.areas)a.areas.hasOwnProperty(n)&&(this._area=a.areas[n],this.clear());return this._area=e,this},_in:function(e){return"string"!=typeof e&&(e=a.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 a.inherit(a.storageAPI,{items:{},name:e})},storageAPI:{length:0,has:function(e){return this.items.hasOwnProperty(e)},key:function(e){var n=0;for(var a in this.items)if(this.has(a)&&e===n++)return a},setItem:function(e,n){this.has(e)||this.length++,this.items[e]=n},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=a.Store("local",function(){try{return localStorage}catch(e){}}());i.local=i,i._=a,i.area("session",function(){try{return sessionStorage}catch(e){}}()),i.area("page",a.storage("page")),"function"==typeof n&&void 0!==n.amd?n("store2",[],(function(){return i})):t.exports?t.exports=i:(e.store&&(a.conflict=e.store),e.store=i)}(n,n&&n.define);var o=a(i.exports);var s=function(){this.__data__=[],this.size=0};var r=function(e,n){return e===n||e!=e&&n!=n},c=r;var l=function(e,n){for(var a=e.length;a--;)if(c(e[a][0],n))return a;return-1},p=l,u=Array.prototype.splice;var d=l;var m=l;var h=l;var f=s,v=function(e){var n=this.__data__,a=p(n,e);return!(a<0)&&(a==n.length-1?n.pop():u.call(n,a,1),--this.size,!0)},g=function(e){var n=this.__data__,a=d(n,e);return a<0?void 0:n[a][1]},b=function(e){return m(this.__data__,e)>-1},x=function(e,n){var a=this.__data__,t=h(a,e);return t<0?(++this.size,a.push([e,n])):a[t][1]=n,this};function y(e){var n=-1,a=null==e?0:e.length;for(this.clear();++n<a;){var t=e[n];this.set(t[0],t[1])}}y.prototype.clear=f,y.prototype.delete=v,y.prototype.get=g,y.prototype.has=b,y.prototype.set=x;var w=y,k=w;var _=function(){this.__data__=new k,this.size=0};var j=function(e){var n=this.__data__,a=n.delete(e);return this.size=n.size,a};var O=function(e){return this.__data__.get(e)};var C=function(e){return this.__data__.has(e)},S="object"==typeof n&&n&&n.Object===Object&&n,T=S,P="object"==typeof self&&self&&self.Object===Object&&self,E=T||P||Function("return this")(),I=E.Symbol,L=I,A=Object.prototype,R=A.hasOwnProperty,N=A.toString,D=L?L.toStringTag:void 0;var z=function(e){var n=R.call(e,D),a=e[D];try{e[D]=void 0;var t=!0}catch(e){}var i=N.call(e);return t&&(n?e[D]=a:delete e[D]),i},M=Object.prototype.toString;var F=z,q=function(e){return M.call(e)},B=I?I.toStringTag:void 0;var U=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":B&&B in Object(e)?F(e):q(e)};var H=function(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)},V=U,W=H;var $,K=function(e){if(!W(e))return!1;var n=V(e);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n},Y=E["__core-js_shared__"],G=($=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"";var J=function(e){return!!G&&G in e},X=Function.prototype.toString;var Z=function(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Q=K,ee=J,ne=H,ae=Z,te=/^\[object .+?Constructor\]$/,ie=Function.prototype,oe=Object.prototype,se=ie.toString,re=oe.hasOwnProperty,ce=RegExp("^"+se.call(re).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var le=function(e){return!(!ne(e)||ee(e))&&(Q(e)?ce:te).test(ae(e))},pe=function(e,n){return null==e?void 0:e[n]};var ue=function(e,n){var a=pe(e,n);return le(a)?a:void 0},de=ue(E,"Map"),me=ue(Object,"create"),he=me;var fe=function(){this.__data__=he?he(null):{},this.size=0};var ve=function(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n},ge=me,be=Object.prototype.hasOwnProperty;var xe=function(e){var n=this.__data__;if(ge){var a=n[e];return"__lodash_hash_undefined__"===a?void 0:a}return be.call(n,e)?n[e]:void 0},ye=me,we=Object.prototype.hasOwnProperty;var ke=me;var _e=fe,je=ve,Oe=xe,Ce=function(e){var n=this.__data__;return ye?void 0!==n[e]:we.call(n,e)},Se=function(e,n){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=ke&&void 0===n?"__lodash_hash_undefined__":n,this};function Te(e){var n=-1,a=null==e?0:e.length;for(this.clear();++n<a;){var t=e[n];this.set(t[0],t[1])}}Te.prototype.clear=_e,Te.prototype.delete=je,Te.prototype.get=Oe,Te.prototype.has=Ce,Te.prototype.set=Se;var Pe=Te,Ee=w,Ie=de;var Le=function(e){var n=typeof e;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e};var Ae=function(e,n){var a=e.__data__;return Le(n)?a["string"==typeof n?"string":"hash"]:a.map},Re=Ae;var Ne=Ae;var De=Ae;var ze=Ae;var Me=function(){this.size=0,this.__data__={hash:new Pe,map:new(Ie||Ee),string:new Pe}},Fe=function(e){var n=Re(this,e).delete(e);return this.size-=n?1:0,n},qe=function(e){return Ne(this,e).get(e)},Be=function(e){return De(this,e).has(e)},Ue=function(e,n){var a=ze(this,e),t=a.size;return a.set(e,n),this.size+=a.size==t?0:1,this};function He(e){var n=-1,a=null==e?0:e.length;for(this.clear();++n<a;){var t=e[n];this.set(t[0],t[1])}}He.prototype.clear=Me,He.prototype.delete=Fe,He.prototype.get=qe,He.prototype.has=Be,He.prototype.set=Ue;var Ve=He,We=w,$e=de,Ke=Ve;var Ye=w,Ge=_,Je=j,Xe=O,Ze=C,Qe=function(e,n){var a=this.__data__;if(a instanceof We){var t=a.__data__;if(!$e||t.length<199)return t.push([e,n]),this.size=++a.size,this;a=this.__data__=new Ke(t)}return a.set(e,n),this.size=a.size,this};function en(e){var n=this.__data__=new Ye(e);this.size=n.size}en.prototype.clear=Ge,en.prototype.delete=Je,en.prototype.get=Xe,en.prototype.has=Ze,en.prototype.set=Qe;var nn=en;var an=Ve,tn=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},on=function(e){return this.__data__.has(e)};function sn(e){var n=-1,a=null==e?0:e.length;for(this.__data__=new an;++n<a;)this.add(e[n])}sn.prototype.add=sn.prototype.push=tn,sn.prototype.has=on;var rn=sn,cn=function(e,n){for(var a=-1,t=null==e?0:e.length;++a<t;)if(n(e[a],a,e))return!0;return!1},ln=function(e,n){return e.has(n)};var pn=function(e,n,a,t,i,o){var s=1&a,r=e.length,c=n.length;if(r!=c&&!(s&&c>r))return!1;var l=o.get(e),p=o.get(n);if(l&&p)return l==n&&p==e;var u=-1,d=!0,m=2&a?new rn:void 0;for(o.set(e,n),o.set(n,e);++u<r;){var h=e[u],f=n[u];if(t)var v=s?t(f,h,u,n,e,o):t(h,f,u,e,n,o);if(void 0!==v){if(v)continue;d=!1;break}if(m){if(!cn(n,(function(e,n){if(!ln(m,n)&&(h===e||i(h,e,a,t,o)))return m.push(n)}))){d=!1;break}}else if(h!==f&&!i(h,f,a,t,o)){d=!1;break}}return o.delete(e),o.delete(n),d};var un=E.Uint8Array,dn=r,mn=pn,hn=function(e){var n=-1,a=Array(e.size);return e.forEach((function(e,t){a[++n]=[t,e]})),a},fn=function(e){var n=-1,a=Array(e.size);return e.forEach((function(e){a[++n]=e})),a},vn=I?I.prototype:void 0,gn=vn?vn.valueOf:void 0;var bn=function(e,n,a,t,i,o,s){switch(a){case"[object DataView]":if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=n.byteLength||!o(new un(e),new un(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return dn(+e,+n);case"[object Error]":return e.name==n.name&&e.message==n.message;case"[object RegExp]":case"[object String]":return e==n+"";case"[object Map]":var r=hn;case"[object Set]":var c=1&t;if(r||(r=fn),e.size!=n.size&&!c)return!1;var l=s.get(e);if(l)return l==n;t|=2,s.set(e,n);var p=mn(r(e),r(n),t,i,o,s);return s.delete(e),p;case"[object Symbol]":if(gn)return gn.call(e)==gn.call(n)}return!1};var xn=function(e,n){for(var a=-1,t=n.length,i=e.length;++a<t;)e[i+a]=n[a];return e},yn=Array.isArray,wn=xn,kn=yn;var _n=function(e,n,a){var t=n(e);return kn(e)?t:wn(t,a(e))};var jn=function(){return[]},On=function(e,n){for(var a=-1,t=null==e?0:e.length,i=0,o=[];++a<t;){var s=e[a];n(s,a,e)&&(o[i++]=s)}return o},Cn=jn,Sn=Object.prototype.propertyIsEnumerable,Tn=Object.getOwnPropertySymbols,Pn=Tn?function(e){return null==e?[]:(e=Object(e),On(Tn(e),(function(n){return Sn.call(e,n)})))}:Cn;var En=function(e,n){for(var a=-1,t=Array(e);++a<e;)t[a]=n(a);return t};var In=function(e){return null!=e&&"object"==typeof e},Ln=U,An=In;var Rn=function(e){return An(e)&&"[object Arguments]"==Ln(e)},Nn=In,Dn=Object.prototype,zn=Dn.hasOwnProperty,Mn=Dn.propertyIsEnumerable,Fn=Rn(function(){return arguments}())?Rn:function(e){return Nn(e)&&zn.call(e,"callee")&&!Mn.call(e,"callee")},qn={exports:{}};var Bn=function(){return!1};!function(e,n){var a=E,t=Bn,i=n&&!n.nodeType&&n,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?a.Buffer:void 0,r=(s?s.isBuffer:void 0)||t;e.exports=r}(qn,qn.exports);var Un=qn.exports,Hn=/^(?:0|[1-9]\d*)$/;var Vn=function(e,n){var a=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==a||"symbol"!=a&&Hn.test(e))&&e>-1&&e%1==0&&e<n};var Wn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},$n=U,Kn=Wn,Yn=In,Gn={};Gn["[object Float32Array]"]=Gn["[object Float64Array]"]=Gn["[object Int8Array]"]=Gn["[object Int16Array]"]=Gn["[object Int32Array]"]=Gn["[object Uint8Array]"]=Gn["[object Uint8ClampedArray]"]=Gn["[object Uint16Array]"]=Gn["[object Uint32Array]"]=!0,Gn["[object Arguments]"]=Gn["[object Array]"]=Gn["[object ArrayBuffer]"]=Gn["[object Boolean]"]=Gn["[object DataView]"]=Gn["[object Date]"]=Gn["[object Error]"]=Gn["[object Function]"]=Gn["[object Map]"]=Gn["[object Number]"]=Gn["[object Object]"]=Gn["[object RegExp]"]=Gn["[object Set]"]=Gn["[object String]"]=Gn["[object WeakMap]"]=!1;var Jn=function(e){return Yn(e)&&Kn(e.length)&&!!Gn[$n(e)]};var Xn=function(e){return function(n){return e(n)}},Zn={exports:{}};!function(e,n){var a=S,t=n&&!n.nodeType&&n,i=t&&e&&!e.nodeType&&e,o=i&&i.exports===t&&a.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=s}(Zn,Zn.exports);var Qn=Zn.exports,ea=Jn,na=Xn,aa=Qn&&Qn.isTypedArray,ta=aa?na(aa):ea,ia=En,oa=Fn,sa=yn,ra=Un,ca=Vn,la=ta,pa=Object.prototype.hasOwnProperty;var ua=function(e,n){var a=sa(e),t=!a&&oa(e),i=!a&&!t&&ra(e),o=!a&&!t&&!i&&la(e),s=a||t||i||o,r=s?ia(e.length,String):[],c=r.length;for(var l in e)!n&&!pa.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ca(l,c))||r.push(l);return r},da=Object.prototype;var ma=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||da)};var ha=function(e,n){return function(a){return e(n(a))}},fa=ha(Object.keys,Object),va=ma,ga=fa,ba=Object.prototype.hasOwnProperty;var xa=K,ya=Wn;var wa=function(e){return null!=e&&ya(e.length)&&!xa(e)},ka=ua,_a=function(e){if(!va(e))return ga(e);var n=[];for(var a in Object(e))ba.call(e,a)&&"constructor"!=a&&n.push(a);return n},ja=wa;var Oa=function(e){return ja(e)?ka(e):_a(e)},Ca=_n,Sa=Pn,Ta=Oa;var Pa=function(e){return Ca(e,Ta,Sa)},Ea=Object.prototype.hasOwnProperty;var Ia=function(e,n,a,t,i,o){var s=1&a,r=Pa(e),c=r.length;if(c!=Pa(n).length&&!s)return!1;for(var l=c;l--;){var p=r[l];if(!(s?p in n:Ea.call(n,p)))return!1}var u=o.get(e),d=o.get(n);if(u&&d)return u==n&&d==e;var m=!0;o.set(e,n),o.set(n,e);for(var h=s;++l<c;){var f=e[p=r[l]],v=n[p];if(t)var g=s?t(v,f,p,n,e,o):t(f,v,p,e,n,o);if(!(void 0===g?f===v||i(f,v,a,t,o):g)){m=!1;break}h||(h="constructor"==p)}if(m&&!h){var b=e.constructor,x=n.constructor;b==x||!("constructor"in e)||!("constructor"in n)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(m=!1)}return o.delete(e),o.delete(n),m},La=ue(E,"DataView"),Aa=de,Ra=ue(E,"Promise"),Na=ue(E,"Set"),Da=ue(E,"WeakMap"),za=U,Ma=Z,Fa="[object Map]",qa="[object Promise]",Ba="[object Set]",Ua="[object WeakMap]",Ha="[object DataView]",Va=Ma(La),Wa=Ma(Aa),$a=Ma(Ra),Ka=Ma(Na),Ya=Ma(Da),Ga=za;(La&&Ga(new La(new ArrayBuffer(1)))!=Ha||Aa&&Ga(new Aa)!=Fa||Ra&&Ga(Ra.resolve())!=qa||Na&&Ga(new Na)!=Ba||Da&&Ga(new Da)!=Ua)&&(Ga=function(e){var n=za(e),a="[object Object]"==n?e.constructor:void 0,t=a?Ma(a):"";if(t)switch(t){case Va:return Ha;case Wa:return Fa;case $a:return qa;case Ka:return Ba;case Ya:return Ua}return n});var Ja=nn,Xa=pn,Za=bn,Qa=Ia,et=Ga,nt=yn,at=Un,tt=ta,it="[object Arguments]",ot="[object Array]",st="[object Object]",rt=Object.prototype.hasOwnProperty;var ct=function(e,n,a,t,i,o){var s=nt(e),r=nt(n),c=s?ot:et(e),l=r?ot:et(n),p=(c=c==it?st:c)==st,u=(l=l==it?st:l)==st,d=c==l;if(d&&at(e)){if(!at(n))return!1;s=!0,p=!1}if(d&&!p)return o||(o=new Ja),s||tt(e)?Xa(e,n,a,t,i,o):Za(e,n,c,a,t,i,o);if(!(1&a)){var m=p&&rt.call(e,"__wrapped__"),h=u&&rt.call(n,"__wrapped__");if(m||h){var f=m?e.value():e,v=h?n.value():n;return o||(o=new Ja),i(f,v,a,t,o)}}return!!d&&(o||(o=new Ja),Qa(e,n,a,t,i,o))},lt=In;var pt=function e(n,a,t,i,o){return n===a||(null==n||null==a||!lt(n)&&!lt(a)?n!=n&&a!=a:ct(n,a,t,i,e,o))},ut=nn,dt=pt;var mt=H;var ht=function(e){return e==e&&!mt(e)},ft=ht,vt=Oa;var gt=function(e,n){return function(a){return null!=a&&(a[e]===n&&(void 0!==n||e in Object(a)))}},bt=function(e,n,a,t){var i=a.length,o=i,s=!t;if(null==e)return!o;for(e=Object(e);i--;){var r=a[i];if(s&&r[2]?r[1]!==e[r[0]]:!(r[0]in e))return!1}for(;++i<o;){var c=(r=a[i])[0],l=e[c],p=r[1];if(s&&r[2]){if(void 0===l&&!(c in e))return!1}else{var u=new ut;if(t)var d=t(l,p,c,e,n,u);if(!(void 0===d?dt(p,l,3,t,u):d))return!1}}return!0},xt=function(e){for(var n=vt(e),a=n.length;a--;){var t=n[a],i=e[t];n[a]=[t,i,ft(i)]}return n},yt=gt;var wt=function(e){var n=xt(e);return 1==n.length&&n[0][2]?yt(n[0][0],n[0][1]):function(a){return a===e||bt(a,e,n)}},kt=U,_t=In;var jt=function(e){return"symbol"==typeof e||_t(e)&&"[object Symbol]"==kt(e)},Ot=yn,Ct=jt,St=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tt=/^\w*$/;var Pt=function(e,n){if(Ot(e))return!1;var a=typeof e;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=e&&!Ct(e))||(Tt.test(e)||!St.test(e)||null!=n&&e in Object(n))},Et=Ve;function It(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var a=function(){var t=arguments,i=n?n.apply(this,t):t[0],o=a.cache;if(o.has(i))return o.get(i);var s=e.apply(this,t);return a.cache=o.set(i,s)||o,s};return a.cache=new(It.Cache||Et),a}It.Cache=Et;var Lt=It;var At=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/\\(\\)?/g,Nt=function(e){var n=Lt(e,(function(e){return 500===a.size&&a.clear(),e})),a=n.cache;return n}((function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(At,(function(e,a,t,i){n.push(t?i.replace(Rt,"$1"):a||e)})),n}));var Dt=function(e,n){for(var a=-1,t=null==e?0:e.length,i=Array(t);++a<t;)i[a]=n(e[a],a,e);return i},zt=Dt,Mt=yn,Ft=jt,qt=I?I.prototype:void 0,Bt=qt?qt.toString:void 0;var Ut=function e(n){if("string"==typeof n)return n;if(Mt(n))return zt(n,e)+"";if(Ft(n))return Bt?Bt.call(n):"";var a=n+"";return"0"==a&&1/n==-1/0?"-0":a},Ht=Ut;var Vt=yn,Wt=Pt,$t=Nt,Kt=function(e){return null==e?"":Ht(e)};var Yt=function(e,n){return Vt(e)?e:Wt(e,n)?[e]:$t(Kt(e))},Gt=jt;var Jt=function(e){if("string"==typeof e||Gt(e))return e;var n=e+"";return"0"==n&&1/e==-1/0?"-0":n},Xt=Yt,Zt=Jt;var Qt=function(e,n){for(var a=0,t=(n=Xt(n,e)).length;null!=e&&a<t;)e=e[Zt(n[a++])];return a&&a==t?e:void 0},ei=Qt;var ni=function(e,n,a){var t=null==e?void 0:ei(e,n);return void 0===t?a:t};var ai=Yt,ti=Fn,ii=yn,oi=Vn,si=Wn,ri=Jt;var ci=function(e,n,a){for(var t=-1,i=(n=ai(n,e)).length,o=!1;++t<i;){var s=ri(n[t]);if(!(o=null!=e&&a(e,s)))break;e=e[s]}return o||++t!=i?o:!!(i=null==e?0:e.length)&&si(i)&&oi(s,i)&&(ii(e)||ti(e))},li=function(e,n){return null!=e&&n in Object(e)},pi=ci;var ui=function(e,n){return null!=e&&pi(e,n,li)},di=pt,mi=ni,hi=ui,fi=Pt,vi=ht,gi=gt,bi=Jt;var xi=function(e,n){return fi(e)&&vi(n)?gi(bi(e),n):function(a){var t=mi(a,e);return void 0===t&&t===n?hi(a,e):di(n,t,3)}};var yi=Qt;var wi=function(e){return function(n){return yi(n,e)}},ki=function(e){return function(n){return null==n?void 0:n[e]}},_i=wi,ji=Pt,Oi=Jt;var Ci=function(e){return ji(e)?ki(Oi(e)):_i(e)},Si=wt,Ti=xi,Pi=function(e){return e},Ei=yn,Ii=Ci;var Li=function(e){return"function"==typeof e?e:null==e?Pi:"object"==typeof e?Ei(e)?Ti(e[0],e[1]):Si(e):Ii(e)};var Ai=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}},Ri=ue,Ni=function(){try{var e=Ri(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Di=function(e,n,a){"__proto__"==n&&Ni?Ni(e,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[n]=a},zi=r,Mi=Object.prototype.hasOwnProperty;var Fi=function(e,n,a){var t=e[n];Mi.call(e,n)&&zi(t,a)&&(void 0!==a||n in e)||Di(e,n,a)},qi=Yt,Bi=Vn,Ui=H,Hi=Jt;var Vi=function(e,n,a,t){if(!Ui(e))return e;for(var i=-1,o=(n=qi(n,e)).length,s=o-1,r=e;null!=r&&++i<o;){var c=Hi(n[i]),l=a;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var p=r[c];void 0===(l=t?t(p,c,r):void 0)&&(l=Ui(p)?p:Bi(n[i+1])?[]:{})}Fi(r,c,l),r=r[c]}return e},Wi=Qt,$i=Vi,Ki=Yt;var Yi=function(e,n,a){for(var t=-1,i=n.length,o={};++t<i;){var s=n[t],r=Wi(e,s);a(r,s)&&$i(o,Ki(s,e),r)}return o},Gi=ha(Object.getPrototypeOf,Object),Ji=xn,Xi=Gi,Zi=Pn,Qi=jn,eo=Object.getOwnPropertySymbols?function(e){for(var n=[];e;)Ji(n,Zi(e)),e=Xi(e);return n}:Qi;var no=H,ao=ma,to=function(e){var n=[];if(null!=e)for(var a in Object(e))n.push(a);return n},io=Object.prototype.hasOwnProperty;var oo=ua,so=function(e){if(!no(e))return to(e);var n=ao(e),a=[];for(var t in e)("constructor"!=t||!n&&io.call(e,t))&&a.push(t);return a},ro=wa;var co=_n,lo=eo,po=function(e){return ro(e)?oo(e,!0):so(e)};var uo=Dt,mo=Li,ho=Yi,fo=function(e){return co(e,po,lo)};var vo=function(e,n){if(null==e)return{};var a=uo(fo(e),(function(e){return[e]}));return n=mo(n),ho(e,a,(function(e,a){return n(e,a[0])}))},go=Li,bo=Ai,xo=vo;var yo=a((function(e,n){return xo(e,bo(go(n)))}));var wo=a((function(e){return null===e}));var ko=a((function(e){return void 0===e}));function _o(e){return _o="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},_o(e)}function jo(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Oo(e){var n=function(e,n){if("object"!=_o(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var t=a.call(e,n||"default");if("object"!=_o(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==_o(n)?n:n+""}function Co(e,n){for(var a=0;a<n.length;a++){var t=n[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,Oo(t.key),t)}}function So(e,n,a){return n&&Co(e.prototype,n),a&&Co(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function To(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Po(e,n){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},Po(e,n)}function Eo(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Po(e,n)}function Io(e,n){if(n&&("object"===_o(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return To(e)}function Lo(e){return Lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lo(e)}function Ao(e,n,a){return(n=Oo(n))in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function Ro(e,n){(null==n||n>e.length)&&(n=e.length);for(var a=0,t=new Array(n);a<n;a++)t[a]=e[a];return t}function No(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,n){if(e){if("string"==typeof e)return Ro(e,n);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Ro(e,n):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 Do(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function zo(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?Do(Object(a),!0).forEach((function(n){Ao(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Do(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}var Mo={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,n){console&&console[e]&&console[e].apply(console,n)}},Fo=function(){function e(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};jo(this,e),this.init(n,a)}return So(e,[{key:"init",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||Mo,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,n,a,t){return t&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(a).concat(this.prefix," ").concat(e[0])),this.logger[n](e))}},{key:"create",value:function(n){return new e(this.logger,zo(zo({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return(n=n||this.options).prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),qo=new Fo,Bo=function(){function e(){jo(this,e),this.observers={}}return So(e,[{key:"on",value:function(e,n){var a=this;return e.split(" ").forEach((function(e){a.observers[e]=a.observers[e]||[],a.observers[e].push(n)})),this}},{key:"off",value:function(e,n){this.observers[e]&&(n?this.observers[e]=this.observers[e].filter((function(e){return e!==n})):delete this.observers[e])}},{key:"emit",value:function(e){for(var n=arguments.length,a=new Array(n>1?n-1:0),t=1;t<n;t++)a[t-1]=arguments[t];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,a)}));this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(n){n.apply(n,[e].concat(a))}))}}]),e}();function Uo(){var e,n,a=new Promise((function(a,t){e=a,n=t}));return a.resolve=e,a.reject=n,a}function Ho(e){return null==e?"":""+e}function Vo(e,n,a){function t(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof n?[].concat(n):n.split(".");o.length>1;){if(i())return{};var s=t(o.shift());!e[s]&&a&&(e[s]=new a),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:t(o.shift())}}function Wo(e,n,a){var t=Vo(e,n,Object);t.obj[t.k]=a}function $o(e,n){var a=Vo(e,n),t=a.obj,i=a.k;if(t)return t[i]}function Ko(e,n,a){for(var t in n)"__proto__"!==t&&"constructor"!==t&&(t in e?"string"==typeof e[t]||e[t]instanceof String||"string"==typeof n[t]||n[t]instanceof String?a&&(e[t]=n[t]):Ko(e[t],n[t],a):e[t]=n[t]);return e}function Yo(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Go={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Jo(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return Go[e]})):e}var Xo="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Zo=[" ",",","?","!",";"];function Qo(e,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[n])return e[n];for(var t=n.split(a),i=e,o=0;o<t.length;++o){if(!i)return;if("string"==typeof i[t[o]]&&o+1<t.length)return;if(void 0===i[t[o]]){for(var s=2,r=t.slice(o,o+s).join(a),c=i[r];void 0===c&&t.length>o+s;)s++,c=i[r=t.slice(o,o+s).join(a)];if(void 0===c)return;if(null===c)return null;if(n.endsWith(r)){if("string"==typeof c)return c;if(r&&"string"==typeof c[r])return c[r]}var l=t.slice(o+s).join(a);return l?Qo(c,l,a):void 0}i=i[t[o]]}return i}}function es(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function ns(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?es(Object(a),!0).forEach((function(n){Ao(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):es(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function as(e){var n=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 a,t=Lo(e);if(n){var i=Lo(this).constructor;a=Reflect.construct(t,arguments,i)}else a=t.apply(this,arguments);return Io(this,a)}}var ts=function(e){Eo(a,Bo);var n=as(a);function a(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return jo(this,a),t=n.call(this),Xo&&Bo.call(To(t)),t.data=e||{},t.options=i,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return So(a,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function(e,n,a){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=void 0!==t.ignoreJSONStructure?t.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[e,n];a&&"string"!=typeof a&&(s=s.concat(a)),a&&"string"==typeof a&&(s=s.concat(i?a.split(i):a)),e.indexOf(".")>-1&&(s=e.split("."));var r=$o(this.data,s);return r||!o||"string"!=typeof a?r:Qo(this.data&&this.data[e]&&this.data[e][n],a,i)}},{key:"addResource",value:function(e,n,a,t){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[e,n];a&&(s=s.concat(o?a.split(o):a)),e.indexOf(".")>-1&&(t=n,n=(s=e.split("."))[1]),this.addNamespaces(n),Wo(this.data,s,t),i.silent||this.emit("added",e,n,a,t)}},{key:"addResources",value:function(e,n,a){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in a)"string"!=typeof a[i]&&"[object Array]"!==Object.prototype.toString.apply(a[i])||this.addResource(e,n,i,a[i],{silent:!0});t.silent||this.emit("added",e,n,a)}},{key:"addResourceBundle",value:function(e,n,a,t,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,n];e.indexOf(".")>-1&&(t=a,a=n,n=(s=e.split("."))[1]),this.addNamespaces(n);var r=$o(this.data,s)||{};t?Ko(r,a,i):r=ns(ns({},r),a),Wo(this.data,s,r),o.silent||this.emit("added",e,n,a)}},{key:"removeResourceBundle",value:function(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}},{key:"hasResourceBundle",value:function(e,n){return void 0!==this.getResource(e,n)}},{key:"getResourceBundle",value:function(e,n){return n||(n=this.options.defaultNS),"v1"===this.options.compatibilityAPI?ns(ns({},{}),this.getResource(e,n)):this.getResource(e,n)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find((function(e){return n[e]&&Object.keys(n[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),a}(),is={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,n,a,t,i){var o=this;return e.forEach((function(e){o.processors[e]&&(n=o.processors[e].process(n,a,t,i))})),n}};function os(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function ss(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?os(Object(a),!0).forEach((function(n){Ao(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):os(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function rs(e){var n=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 a,t=Lo(e);if(n){var i=Lo(this).constructor;a=Reflect.construct(t,arguments,i)}else a=t.apply(this,arguments);return Io(this,a)}}var cs={},ls=function(e){Eo(a,Bo);var n=rs(a);function a(e){var t,i,o,s,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return jo(this,a),t=n.call(this),Xo&&Bo.call(To(t)),i=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=e,s=To(t),i.forEach((function(e){o[e]&&(s[e]=o[e])})),t.options=r,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=qo.create("translator"),t}return So(a,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var a=this.resolve(e,n);return a&&void 0!==a.res}},{key:"extractFromKey",value:function(e,n){var a=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===a&&(a=":");var t=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=n.ns||this.options.defaultNS||[],o=a&&e.indexOf(a)>-1,s=!(this.options.userDefinedKeySeparator||n.keySeparator||this.options.userDefinedNsSeparator||n.nsSeparator||function(e,n,a){n=n||"",a=a||"";var t=Zo.filter((function(e){return n.indexOf(e)<0&&a.indexOf(e)<0}));if(0===t.length)return!0;var i=new RegExp("(".concat(t.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var s=e.indexOf(a);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}(e,a,t));if(o&&!s){var r=e.match(this.interpolator.nestingRegexp);if(r&&r.length>0)return{key:e,namespaces:i};var c=e.split(a);(a!==t||a===t&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),e=c.join(t)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,n,t){var i=this;if("object"!==_o(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"===_o(n)&&(n=ss({},n)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,r=this.extractFromKey(e[e.length-1],n),c=r.key,l=r.namespaces,p=l[l.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(d){var m=n.nsSeparator||this.options.nsSeparator;return o?{res:"".concat(p).concat(m).concat(c),usedKey:c,exactUsedKey:c,usedLng:u,usedNS:p}:"".concat(p).concat(m).concat(c)}return o?{res:c,usedKey:c,exactUsedKey:c,usedLng:u,usedNS:p}:c}var h=this.resolve(e,n),f=h&&h.res,v=h&&h.usedKey||c,g=h&&h.exactUsedKey||c,b=Object.prototype.toString.apply(f),x=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject;if(y&&f&&("string"!=typeof f&&"boolean"!=typeof f&&"number"!=typeof f)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(b)<0&&("string"!=typeof x||"[object Array]"!==b)){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,f,ss(ss({},n),{},{ns:l})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return o?(h.res=w,h):w}if(s){var k="[object Array]"===b,_=k?[]:{},j=k?g:v;for(var O in f)if(Object.prototype.hasOwnProperty.call(f,O)){var C="".concat(j).concat(s).concat(O);_[O]=this.translate(C,ss(ss({},n),{joinArrays:!1,ns:l})),_[O]===C&&(_[O]=f[O])}f=_}}else if(y&&"string"==typeof x&&"[object Array]"===b)(f=f.join(x))&&(f=this.extendTranslation(f,e,n,t));else{var S=!1,T=!1,P=void 0!==n.count&&"string"!=typeof n.count,E=a.hasDefaultValue(n),I=P?this.pluralResolver.getSuffix(u,n.count,n):"",L=n["defaultValue".concat(I)]||n.defaultValue;!this.isValidLookup(f)&&E&&(S=!0,f=L),this.isValidLookup(f)||(T=!0,f=c);var A=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:f,R=E&&L!==f&&this.options.updateMissing;if(T||S||R){if(this.logger.log(R?"updateKey":"missingKey",u,p,c,R?L:f),s){var N=this.resolve(c,ss(ss({},n),{},{keySeparator:!1}));N&&N.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 D=[],z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&z&&z[0])for(var M=0;M<z.length;M++)D.push(z[M]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(n.lng||this.language):D.push(n.lng||this.language);var F=function(e,a,t){var o=E&&t!==f?t:A;i.options.missingKeyHandler?i.options.missingKeyHandler(e,p,a,o,R,n):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,p,a,o,R,n),i.emit("missingKey",e,p,a,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?D.forEach((function(e){i.pluralResolver.getSuffixes(e,n).forEach((function(a){F([e],c+a,n["defaultValue".concat(a)]||L)}))})):F(D,c,L))}f=this.extendTranslation(f,e,n,h,t),T&&f===c&&this.options.appendNamespaceToMissingKey&&(f="".concat(p,":").concat(c)),(T||S)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(p,":").concat(c):c,S?f:void 0):this.options.parseMissingKeyHandler(f))}return o?(h.res=f,h):f}},{key:"extendTranslation",value:function(e,n,a,t,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,ss(ss({},this.options.interpolation.defaultVariables),a),t.usedLng,t.usedNS,t.usedKey,{resolved:t});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(ss(ss({},a),{interpolation:ss(ss({},this.options.interpolation),a.interpolation)}));var s,r="string"==typeof e&&(a&&a.interpolation&&void 0!==a.interpolation.skipOnVariables?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(r){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=a.replace&&"string"!=typeof a.replace?a.replace:a;if(this.options.interpolation.defaultVariables&&(l=ss(ss({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,a.lng||this.language,a),r){var p=e.match(this.interpolator.nestingRegexp);s<(p&&p.length)&&(a.nest=!1)}!a.lng&&"v1"!==this.options.compatibilityAPI&&t&&t.res&&(a.lng=t.usedLng),!1!==a.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return i&&i[0]===t[0]&&!a.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(t[0]," in key: ").concat(n[0])),null):o.translate.apply(o,t.concat([n]))}),a)),a.interpolation&&this.interpolator.reset()}var u=a.postProcess||this.options.postProcess,d="string"==typeof u?[u]:u;return null!=e&&d&&d.length&&!1!==a.applyPostProcessor&&(e=is.handle(d,e,n,this.options&&this.options.postProcessPassResolved?ss({i18nResolved:t},a):a,this)),e}},{key:"resolve",value:function(e){var n,a,t,i,o,s=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(n)){var c=s.extractFromKey(e,r),l=c.key;a=l;var p=c.namespaces;s.options.fallbackNS&&(p=p.concat(s.options.fallbackNS));var u=void 0!==r.count&&"string"!=typeof r.count,d=u&&!r.ordinal&&0===r.count&&s.pluralResolver.shouldUseIntlApi(),m=void 0!==r.context&&("string"==typeof r.context||"number"==typeof r.context)&&""!==r.context,h=r.lngs?r.lngs:s.languageUtils.toResolveHierarchy(r.lng||s.language,r.fallbackLng);p.forEach((function(e){s.isValidLookup(n)||(o=e,!cs["".concat(h[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(cs["".concat(h[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(a,'" 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(a){if(!s.isValidLookup(n)){i=a;var o,c=[l];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(c,l,a,e,r);else{var p;u&&(p=s.pluralResolver.getSuffix(a,r.count,r));var h="".concat(s.options.pluralSeparator,"zero");if(u&&(c.push(l+p),d&&c.push(l+h)),m){var f="".concat(l).concat(s.options.contextSeparator).concat(r.context);c.push(f),u&&(c.push(f+p),d&&c.push(f+h))}}for(;o=c.pop();)s.isValidLookup(n)||(t=o,n=s.getResource(a,e,o,r))}})))}))}})),{res:n,usedKey:a,exactUsedKey:t,usedLng:i,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,n,a){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,a,t):this.resourceStore.getResource(e,n,a,t)}}],[{key:"hasDefaultValue",value:function(e){var n="defaultValue";for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&n===a.substring(0,12)&&void 0!==e[a])return!0;return!1}}]),a}();function ps(e){return e.charAt(0).toUpperCase()+e.slice(1)}var us=function(){function e(n){jo(this,e),this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=qo.create("languageUtils")}return So(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var n=e.split("-");return 2===n.length?null:(n.pop(),"x"===n[n.length-1].toLowerCase()?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var n=e.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],a=e.split("-");return this.options.lowerCaseLng?a=a.map((function(e){return e.toLowerCase()})):2===a.length?(a[0]=a[0].toLowerCase(),a[1]=a[1].toUpperCase(),n.indexOf(a[1].toLowerCase())>-1&&(a[1]=ps(a[1].toLowerCase()))):3===a.length&&(a[0]=a[0].toLowerCase(),2===a[1].length&&(a[1]=a[1].toUpperCase()),"sgn"!==a[0]&&2===a[2].length&&(a[2]=a[2].toUpperCase()),n.indexOf(a[1].toLowerCase())>-1&&(a[1]=ps(a[1].toLowerCase())),n.indexOf(a[2].toLowerCase())>-1&&(a[2]=ps(a[2].toLowerCase()))),a.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 n,a=this;return e?(e.forEach((function(e){if(!n){var t=a.formatLanguageCode(e);a.options.supportedLngs&&!a.isSupportedCode(t)||(n=t)}})),!n&&this.options.supportedLngs&&e.forEach((function(e){if(!n){var t=a.getLanguagePartFromCode(e);if(a.isSupportedCode(t))return n=t;n=a.options.supportedLngs.find((function(e){return e===t?e:e.indexOf("-")<0&&t.indexOf("-")<0?void 0:0===e.indexOf(t)?e:void 0}))}})),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n):null}},{key:"getFallbackCodes",value:function(e,n){if(!e)return[];if("function"==typeof e&&(e=e(n)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!n)return e.default||[];var a=e[n];return a||(a=e[this.getScriptPartFromCode(n)]),a||(a=e[this.formatLanguageCode(n)]),a||(a=e[this.getLanguagePartFromCode(n)]),a||(a=e.default),a||[]}},{key:"toResolveHierarchy",value:function(e,n){var a=this,t=this.getFallbackCodes(n||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(a.isSupportedCode(e)?i.push(e):a.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)),t.forEach((function(e){i.indexOf(e)<0&&o(a.formatLanguageCode(e))})),i}}]),e}(),ds=[{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}],ms={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)}},hs=["v1","v2","v3"],fs={zero:0,one:1,two:2,few:3,many:4,other:5};var vs=function(){function e(n){var a,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};jo(this,e),this.languageUtils=n,this.options=t,this.logger=qo.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=(a={},ds.forEach((function(e){e.lngs.forEach((function(n){a[n]={numbers:e.nr,plurals:ms[e.fc]}}))})),a)}return So(e,[{key:"addRule",value:function(e,n){this.rules[e]=n}},{key:"getRule",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:n.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=this.getRule(e,n);return this.shouldUseIntlApi()?a&&a.resolvedOptions().pluralCategories.length>1:a&&a.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,a).map((function(e){return"".concat(n).concat(e)}))}},{key:"getSuffixes",value:function(e){var n=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=this.getRule(e,a);return t?this.shouldUseIntlApi()?t.resolvedOptions().pluralCategories.sort((function(e,n){return fs[e]-fs[n]})).map((function(e){return"".concat(n.options.prepend).concat(e)})):t.numbers.map((function(t){return n.getSuffix(e,t,a)})):[]}},{key:"getSuffix",value:function(e,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=this.getRule(e,a);return t?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(t.select(n)):this.getSuffixRetroCompatible(t,n):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,n){var a=this,t=e.noAbs?e.plurals(n):e.plurals(Math.abs(n)),i=e.numbers[t];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return a.options.prepend&&i.toString()?a.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&t.toString()?this.options.prepend+t.toString():t.toString()}},{key:"shouldUseIntlApi",value:function(){return!hs.includes(this.options.compatibilityJSON)}}]),e}();function gs(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function bs(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?gs(Object(a),!0).forEach((function(n){Ao(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):gs(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function xs(e,n,a){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=function(e,n,a){var t=$o(e,a);return void 0!==t?t:$o(n,a)}(e,n,a);return!o&&i&&"string"==typeof a&&void 0===(o=Qo(e,a,t))&&(o=Qo(n,a,t)),o}var ys=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};jo(this,e),this.logger=qo.create("interpolator"),this.options=n,this.format=n.interpolation&&n.interpolation.format||function(e){return e},this.init(n)}return So(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var n=e.interpolation;this.escape=void 0!==n.escape?n.escape:Jo,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?Yo(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Yo(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?Yo(n.nestingPrefix):n.nestingPrefixEscaped||Yo("$t("),this.nestingSuffix=n.nestingSuffix?Yo(n.nestingSuffix):n.nestingSuffixEscaped||Yo(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=void 0!==n.alwaysFormat&&n.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 n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var a="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(a,"g")}},{key:"interpolate",value:function(e,n,a,t){var i,o,s,r=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var p=function(e){if(e.indexOf(r.formatSeparator)<0){var i=xs(n,c,e,r.options.keySeparator,r.options.ignoreJSONStructure);return r.alwaysFormat?r.format(i,void 0,a,bs(bs(bs({},t),n),{},{interpolationkey:e})):i}var o=e.split(r.formatSeparator),s=o.shift().trim(),l=o.join(r.formatSeparator).trim();return r.format(xs(n,c,s,r.options.keySeparator,r.options.ignoreJSONStructure),l,a,bs(bs(bs({},t),n),{},{interpolationkey:s}))};this.resetRegExp();var u=t&&t.missingInterpolationHandler||this.options.missingInterpolationHandler,d=t&&t.interpolation&&void 0!==t.interpolation.skipOnVariables?t.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(n){for(s=0;i=n.regex.exec(e);){var a=i[1].trim();if(void 0===(o=p(a)))if("function"==typeof u){var c=u(e,i,t);o="string"==typeof c?c:""}else if(t&&Object.prototype.hasOwnProperty.call(t,a))o="";else{if(d){o=i[0];continue}r.logger.warn("missed to pass in variable ".concat(a," for interpolating ").concat(e)),o=""}else"string"==typeof o||r.useRawValueToEscape||(o=Ho(o));var l=n.safeValue(o);if(e=e.replace(i[0],l),d?(n.regex.lastIndex+=o.length,n.regex.lastIndex-=i[0].length):n.regex.lastIndex=0,++s>=r.maxReplaces)break}})),e}},{key:"nest",value:function(e,n){var a,t,i,o=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function r(e,n){var a=this.nestingOptionsSeparator;if(e.indexOf(a)<0)return e;var t=e.split(new RegExp("".concat(a,"[ ]*{"))),o="{".concat(t[1]);e=t[0];var s=(o=this.interpolate(o,i)).match(/'/g),r=o.match(/"/g);(s&&s.length%2==0&&!r||r.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),n&&(i=bs(bs({},n),i))}catch(n){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),n),"".concat(e).concat(a).concat(o)}return delete i.defaultValue,e}for(;a=this.nestingRegexp.exec(e);){var c=[];(i=(i=bs({},s)).replace&&"string"!=typeof i.replace?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;var l=!1;if(-1!==a[0].indexOf(this.formatSeparator)&&!/{.*}/.test(a[1])){var p=a[1].split(this.formatSeparator).map((function(e){return e.trim()}));a[1]=p.shift(),c=p,l=!0}if((t=n(r.call(this,a[1].trim(),i),i))&&a[0]===e&&"string"!=typeof t)return t;"string"!=typeof t&&(t=Ho(t)),t||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(e)),t=""),l&&(t=c.reduce((function(e,n){return o.format(e,n,s.lng,bs(bs({},s),{},{interpolationkey:a[1].trim()}))}),t.trim())),e=e.replace(a[0],t),this.regexp.lastIndex=0}return e}}]),e}();function ws(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function ks(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?ws(Object(a),!0).forEach((function(n){Ao(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ws(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function _s(e){var n={};return function(a,t,i){var o=t+JSON.stringify(i),s=n[o];return s||(s=e(t,i),n[o]=s),s(a)}}var js=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};jo(this,e),this.logger=qo.create("formatter"),this.options=n,this.formats={number:_s((function(e,n){var a=new Intl.NumberFormat(e,ks({},n));return function(e){return a.format(e)}})),currency:_s((function(e,n){var a=new Intl.NumberFormat(e,ks(ks({},n),{},{style:"currency"}));return function(e){return a.format(e)}})),datetime:_s((function(e,n){var a=new Intl.DateTimeFormat(e,ks({},n));return function(e){return a.format(e)}})),relativetime:_s((function(e,n){var a=new Intl.RelativeTimeFormat(e,ks({},n));return function(e){return a.format(e,n.range||"day")}})),list:_s((function(e,n){var a=new Intl.ListFormat(e,ks({},n));return function(e){return a.format(e)}}))},this.init(n)}return So(e,[{key:"init",value:function(e){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,n){this.formats[e.toLowerCase().trim()]=n}},{key:"addCached",value:function(e,n){this.formats[e.toLowerCase().trim()]=_s(n)}},{key:"format",value:function(e,n,a){var t=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n.split(this.formatSeparator).reduce((function(e,n){var o=function(e){var n=e.toLowerCase().trim(),a={};if(e.indexOf("(")>-1){var t=e.split("(");n=t[0].toLowerCase().trim();var i=t[1].substring(0,t[1].length-1);"currency"===n&&i.indexOf(":")<0?a.currency||(a.currency=i.trim()):"relativetime"===n&&i.indexOf(":")<0?a.range||(a.range=i.trim()):i.split(";").forEach((function(e){if(e){var n=No(e.split(":")),t=n[0],i=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");a[t.trim()]||(a[t.trim()]=i),"false"===i&&(a[t.trim()]=!1),"true"===i&&(a[t.trim()]=!0),isNaN(i)||(a[t.trim()]=parseInt(i,10))}}))}return{formatName:n,formatOptions:a}}(n),s=o.formatName,r=o.formatOptions;if(t.formats[s]){var c=e;try{var l=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},p=l.locale||l.lng||i.locale||i.lng||a;c=t.formats[s](e,p,ks(ks(ks({},r),i),l))}catch(e){t.logger.warn(e)}return c}return t.logger.warn("there was no format function for ".concat(s)),e}),e)}}]),e}();function Os(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function Cs(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?Os(Object(a),!0).forEach((function(n){Ao(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Os(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function Ss(e){var n=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 a,t=Lo(e);if(n){var i=Lo(this).constructor;a=Reflect.construct(t,arguments,i)}else a=t.apply(this,arguments);return Io(this,a)}}var Ts=function(e){Eo(a,Bo);var n=Ss(a);function a(e,t,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return jo(this,a),o=n.call(this),Xo&&Bo.call(To(o)),o.backend=e,o.store=t,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=qo.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return So(a,[{key:"queueLoad",value:function(e,n,a,t){var i=this,o={},s={},r={},c={};return e.forEach((function(e){var t=!0;n.forEach((function(n){var r="".concat(e,"|").concat(n);!a.reload&&i.store.hasResourceBundle(e,n)?i.state[r]=2:i.state[r]<0||(1===i.state[r]?void 0===s[r]&&(s[r]=!0):(i.state[r]=1,t=!1,void 0===s[r]&&(s[r]=!0),void 0===o[r]&&(o[r]=!0),void 0===c[n]&&(c[n]=!0)))})),t||(r[e]=!0)})),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:t}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(e,n,a){var t=e.split("|"),i=t[0],o=t[1];n&&this.emit("failedLoading",i,o,n),a&&this.store.addResourceBundle(i,o,a),this.state[e]=n?-1:2;var s={};this.queue.forEach((function(a){!function(e,n,a,t){var i=Vo(e,n,Object),o=i.obj,s=i.k;o[s]=o[s]||[],t&&(o[s]=o[s].concat(a)),t||o[s].push(a)}(a.loaded,[i],o),function(e,n){void 0!==e.pending[n]&&(delete e.pending[n],e.pendingCount--)}(a,e),n&&a.errors.push(n),0!==a.pendingCount||a.done||(Object.keys(a.loaded).forEach((function(e){s[e]||(s[e]={});var n=a.loaded[e];n.length&&n.forEach((function(n){void 0===s[e][n]&&(s[e][n]=!0)}))})),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,n,a){var t=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:n,fcName:a,tried:i,wait:o,callback:s});else{this.readingCalls++;var r=function(r,c){if(t.readingCalls--,t.waitingReads.length>0){var l=t.waitingReads.shift();t.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}r&&c&&i<t.maxRetries?setTimeout((function(){t.read.call(t,e,n,a,i+1,2*o,s)}),o):s(r,c)},c=this.backend[a].bind(this.backend);if(2!==c.length)return c(e,n,r);try{var l=c(e,n);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,n){var a=this,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=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."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof n&&(n=[n]);var o=this.queueLoad(e,n,t,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){a.loadOne(e)}))}},{key:"load",value:function(e,n,a){this.prepareLoading(e,n,{},a)}},{key:"reload",value:function(e,n,a){this.prepareLoading(e,n,{reload:!0},a)}},{key:"loadOne",value:function(e){var n=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=e.split("|"),i=t[0],o=t[1];this.read(i,o,"read",void 0,void 0,(function(t,s){t&&n.logger.warn("".concat(a,"loading namespace ").concat(o," for language ").concat(i," failed"),t),!t&&s&&n.logger.log("".concat(a,"loaded namespace ").concat(o," for language ").concat(i),s),n.loaded(e,t,s)}))}},{key:"saveMissing",value:function(e,n,a,t,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n))this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(n,'" 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!=a&&""!==a){if(this.backend&&this.backend.create){var r=Cs(Cs({},o),{},{isUpdate:i}),c=this.backend.create.bind(this.backend);if(c.length<6)try{var l;(l=5===c.length?c(e,n,a,t,r):c(e,n,a,t))&&"function"==typeof l.then?l.then((function(e){return s(null,e)})).catch(s):s(null,l)}catch(e){s(e)}else c(e,n,a,t,s,r)}e&&e[0]&&this.store.addResource(e[0],n,a,t)}}}]),a}();function Ps(){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 n={};if("object"===_o(e[1])&&(n=e[1]),"string"==typeof e[1]&&(n.defaultValue=e[1]),"string"==typeof e[2]&&(n.tDescription=e[2]),"object"===_o(e[2])||"object"===_o(e[3])){var a=e[3]||e[2];Object.keys(a).forEach((function(e){n[e]=a[e]}))}return n},interpolation:{escapeValue:!0,format:function(e,n,a,t){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Es(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 Is(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function Ls(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?Is(Object(a),!0).forEach((function(n){Ao(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Is(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function As(e){var n=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 a,t=Lo(e);if(n){var i=Lo(this).constructor;a=Reflect.construct(t,arguments,i)}else a=t.apply(this,arguments);return Io(this,a)}}function Rs(){}var Ns=function(e){Eo(a,Bo);var n=As(a);function a(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(jo(this,a),e=n.call(this),Xo&&Bo.call(To(e)),e.options=Es(i),e.services={},e.logger=qo,e.modules={external:[]},t=To(e),Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))})),o&&!e.isInitialized&&!i.isClone){if(!e.options.initImmediate)return e.init(i,o),Io(e,To(e));setTimeout((function(){e.init(i,o)}),0)}return e}return So(a,[{key:"init",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;"function"==typeof n&&(a=n,n={}),!n.defaultNS&&!1!==n.defaultNS&&n.ns&&("string"==typeof n.ns?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));var t=Ps();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=Ls(Ls(Ls({},t),this.options),Es(n)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=Ls(Ls({},t.interpolation),this.options.interpolation)),void 0!==n.keySeparator&&(this.options.userDefinedKeySeparator=n.keySeparator),void 0!==n.nsSeparator&&(this.options.userDefinedNsSeparator=n.nsSeparator),!this.options.isClone){var o;this.modules.logger?qo.init(i(this.modules.logger),this.options):qo.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=js);var s=new us(this.options);this.store=new ts(this.options.resources,this.options);var r=this.services;r.logger=qo,r.resourceStore=this.store,r.languageUtils=s,r.pluralResolver=new vs(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==t.interpolation.format||(r.formatter=i(o),r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new ys(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new Ts(i(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(function(n){for(var a=arguments.length,t=new Array(a>1?a-1:0),i=1;i<a;i++)t[i-1]=arguments[i];e.emit.apply(e,[n].concat(t))})),this.modules.languageDetector&&(r.languageDetector=i(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=i(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new ls(this.services,this.options),this.translator.on("*",(function(n){for(var a=arguments.length,t=new Array(a>1?a-1:0),i=1;i<a;i++)t[i-1]=arguments[i];e.emit.apply(e,[n].concat(t))})),this.modules.external.forEach((function(n){n.init&&n.init(e)}))}if(this.format=this.options.interpolation.format,a||(a=Rs),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(n){e[n]=function(){var a;return(a=e.store)[n].apply(a,arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(n){e[n]=function(){var a;return(a=e.store)[n].apply(a,arguments),e}}));var l=Uo(),p=function(){var n=function(n,t){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(t),a(n,t)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return n(null,e.t.bind(e));e.changeLanguage(e.options.lng,n)};return this.options.resources||!this.options.initImmediate?p():setTimeout(p,0),l}},{key:"loadResources",value:function(e){var n=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rs,t="string"==typeof e?e:this.language;if("function"==typeof e&&(a=e),!this.options.resources||this.options.partialBundledLanguages){if(t&&"cimode"===t.toLowerCase())return a();var i=[],o=function(e){e&&n.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(t)o(t);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(i,this.options.ns,(function(e){e||n.resolvedLanguage||!n.language||n.setResolvedLanguage(n.language),a(e)}))}else a(null)}},{key:"reloadResources",value:function(e,n,a){var t=Uo();return e||(e=this.languages),n||(n=this.options.ns),a||(a=Rs),this.services.backendConnector.reload(e,n,(function(e){t.resolve(),a(e)})),t}},{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&&is.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 n=0;n<this.languages.length;n++){var a=this.languages[n];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(e,n){var a=this;this.isLanguageChangingTo=e;var t=Uo();this.emit("languageChanging",e);var i=function(e){a.language=e,a.languages=a.services.languageUtils.toResolveHierarchy(e),a.resolvedLanguage=void 0,a.setResolvedLanguage(e)},o=function(o){e||o||!a.services.languageDetector||(o=[]);var s="string"==typeof o?o:a.services.languageUtils.getBestMatchFromCodes(o);s&&(a.language||i(s),a.translator.language||a.translator.changeLanguage(s),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(s)),a.loadResources(s,(function(e){!function(e,o){o?(i(o),a.translator.changeLanguage(o),a.isLanguageChangingTo=void 0,a.emit("languageChanged",o),a.logger.log("languageChanged",o)):a.isLanguageChangingTo=void 0,t.resolve((function(){return a.t.apply(a,arguments)})),n&&n(e,(function(){return a.t.apply(a,arguments)}))}(e,s)}))};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()),t}},{key:"getFixedT",value:function(e,n,a){var t=this,i=function e(n,i){var o;if("object"!==_o(i)){for(var s=arguments.length,r=new Array(s>2?s-2:0),c=2;c<s;c++)r[c-2]=arguments[c];o=t.options.overloadTranslationOptionHandler([n,i].concat(r))}else o=Ls({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||a||e.keyPrefix;var l,p=t.options.keySeparator||".";return l=o.keyPrefix&&Array.isArray(n)?n.map((function(e){return"".concat(o.keyPrefix).concat(p).concat(e)})):o.keyPrefix?"".concat(o.keyPrefix).concat(p).concat(n):n,t.t(l,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=n,i.keyPrefix=a,i}},{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 n=this,a=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 t=a.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===t.toLowerCase())return!0;var s=function(e,a){var t=n.services.backendConnector.state["".concat(e,"|").concat(a)];return-1===t||2===t};if(a.precheck){var r=a.precheck(this,s);if(void 0!==r)return r}return!!this.hasResourceBundle(t,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!s(t,e)||i&&!s(o,e)))}},{key:"loadNamespaces",value:function(e,n){var a=this,t=Uo();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){a.options.ns.indexOf(e)<0&&a.options.ns.push(e)})),this.loadResources((function(e){t.resolve(),n&&n(e)})),t):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function(e,n){var a=Uo();"string"==typeof e&&(e=[e]);var t=this.options.preload||[],i=e.filter((function(e){return t.indexOf(e)<0}));return i.length?(this.options.preload=t.concat(i),this.loadResources((function(e){a.resolve(),n&&n(e)})),a):(n&&n(),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 n=this.services&&this.services.languageUtils||new us(Ps());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(n.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]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rs,i=Ls(Ls(Ls({},this.options),n),{isClone:!0}),o=new a(i);void 0===n.debug&&void 0===n.prefix||(o.logger=o.logger.clone(n));return["store","services","language"].forEach((function(n){o[n]=e[n]})),o.services=Ls({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new ls(o.services,o.options),o.translator.on("*",(function(e){for(var n=arguments.length,a=new Array(n>1?n-1:0),t=1;t<n;t++)a[t-1]=arguments[t];o.emit.apply(o,[e].concat(a))})),o.init(i,t),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}}}]),a}();Ao(Ns,"createInstance",(function(){return new Ns(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var Ds=Ns.createInstance();function zs(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Ms(e,n){for(var a,t="",i=0,o=-1,s=0,r=0;r<=e.length;++r){if(r<e.length)a=e.charCodeAt(r);else{if(47===a)break;a=47}if(47===a){if(o===r-1||1===s);else if(o!==r-1&&2===s){if(t.length<2||2!==i||46!==t.charCodeAt(t.length-1)||46!==t.charCodeAt(t.length-2))if(t.length>2){var c=t.lastIndexOf("/");if(c!==t.length-1){-1===c?(t="",i=0):i=(t=t.slice(0,c)).length-1-t.lastIndexOf("/"),o=r,s=0;continue}}else if(2===t.length||1===t.length){t="",i=0,o=r,s=0;continue}n&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+="/"+e.slice(o+1,r):t=e.slice(o+1,r),i=r-o-1;o=r,s=0}else 46===a&&-1!==s?++s:s=-1}return t}Ds.createInstance=Ns.createInstance,Ds.createInstance,Ds.dir,Ds.init,Ds.loadResources,Ds.reloadResources,Ds.use,Ds.changeLanguage,Ds.getFixedT,Ds.t,Ds.exists,Ds.setDefaultNamespace,Ds.hasLoadedNamespace,Ds.loadNamespaces,Ds.loadLanguages;var Fs={resolve:function(){for(var e,n="",a=!1,t=arguments.length-1;t>=-1&&!a;t--){var i;t>=0?i=arguments[t]:(void 0===e&&(e=process.cwd()),i=e),zs(i),0!==i.length&&(n=i+"/"+n,a=47===i.charCodeAt(0))}return n=Ms(n,!a),a?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(zs(e),0===e.length)return".";var n=47===e.charCodeAt(0),a=47===e.charCodeAt(e.length-1);return 0!==(e=Ms(e,!n)).length||n||(e="."),e.length>0&&a&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return zs(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var a=arguments[n];zs(a),a.length>0&&(void 0===e?e=a:e+="/"+a)}return void 0===e?".":Fs.normalize(e)},relative:function(e,n){if(zs(e),zs(n),e===n)return"";if((e=Fs.resolve(e))===(n=Fs.resolve(n)))return"";for(var a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var t=e.length,i=t-a,o=1;o<n.length&&47===n.charCodeAt(o);++o);for(var s=n.length-o,r=i<s?i:s,c=-1,l=0;l<=r;++l){if(l===r){if(s>r){if(47===n.charCodeAt(o+l))return n.slice(o+l+1);if(0===l)return n.slice(o+l)}else i>r&&(47===e.charCodeAt(a+l)?c=l:0===l&&(c=0));break}var p=e.charCodeAt(a+l);if(p!==n.charCodeAt(o+l))break;47===p&&(c=l)}var u="";for(l=a+c+1;l<=t;++l)l!==t&&47!==e.charCodeAt(l)||(0===u.length?u+="..":u+="/..");return u.length>0?u+n.slice(o+c):(o+=c,47===n.charCodeAt(o)&&++o,n.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(zs(e),0===e.length)return".";for(var n=e.charCodeAt(0),a=47===n,t=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!i){t=o;break}}else i=!1;return-1===t?a?"/":".":a&&1===t?"//":e.slice(0,t)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');zs(e);var a,t=0,i=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var s=n.length-1,r=-1;for(a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47===c){if(!o){t=a+1;break}}else-1===r&&(o=!1,r=a+1),s>=0&&(c===n.charCodeAt(s)?-1==--s&&(i=a):(s=-1,i=r))}return t===i?i=r:-1===i&&(i=e.length),e.slice(t,i)}for(a=e.length-1;a>=0;--a)if(47===e.charCodeAt(a)){if(!o){t=a+1;break}}else-1===i&&(o=!1,i=a+1);return-1===i?"":e.slice(t,i)},extname:function(e){zs(e);for(var n=-1,a=0,t=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var r=e.charCodeAt(s);if(47!==r)-1===t&&(i=!1,t=s+1),46===r?-1===n?n=s:1!==o&&(o=1):-1!==n&&(o=-1);else if(!i){a=s+1;break}}return-1===n||-1===t||0===o||1===o&&n===t-1&&n===a+1?"":e.slice(n,t)},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,n){var a=n.dir||n.root,t=n.base||(n.name||"")+(n.ext||"");return a?a===n.root?a+t:a+e+t:t}("/",e)},parse:function(e){zs(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var a,t=e.charCodeAt(0),i=47===t;i?(n.root="/",a=1):a=0;for(var o=-1,s=0,r=-1,c=!0,l=e.length-1,p=0;l>=a;--l)if(47!==(t=e.charCodeAt(l)))-1===r&&(c=!1,r=l+1),46===t?-1===o?o=l:1!==p&&(p=1):-1!==o&&(p=-1);else if(!c){s=l+1;break}return-1===o||-1===r||0===p||1===p&&o===r-1&&o===s+1?-1!==r&&(n.base=n.name=0===s&&i?e.slice(1,r):e.slice(s,r)):(0===s&&i?(n.name=e.slice(1,o),n.base=e.slice(1,r)):(n.name=e.slice(s,o),n.base=e.slice(s,r)),n.ext=e.slice(o,r)),s>0?n.dir=e.slice(0,s-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};Fs.posix=Fs;var qs=a(Fs),Bs={},Us={"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}};
4
4
  /*!
@@ -7,5 +7,5 @@
7
7
  * Copyright(c) 2015 Douglas Christopher Wilson
8
8
  * MIT Licensed
9
9
  */
10
- !function(n){var a,t,i,o=Us,s=e.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function l(e){if(!e||"string"!=typeof e)return!1;var n=r.exec(e),a=n&&o[n[1].toLowerCase()];return a&&a.charset?a.charset:!(!n||!c.test(n[1]))&&"UTF-8"}n.charset=l,n.charsets={lookup:l},n.contentType=function(e){if(!e||"string"!=typeof e)return!1;var a=-1===e.indexOf("/")?n.lookup(e):e;if(!a)return!1;if(-1===a.indexOf("charset")){var t=n.charset(a);t&&(a+="; charset="+t.toLowerCase())}return a},n.extension=function(e){if(!e||"string"!=typeof e)return!1;var a=r.exec(e),t=a&&n.extensions[a[1].toLowerCase()];if(!t||!t.length)return!1;return t[0]},n.extensions=Object.create(null),n.lookup=function(e){if(!e||"string"!=typeof e)return!1;var a=s("x."+e).toLowerCase().substr(1);if(!a)return!1;return n.types[a]||!1},n.types=Object.create(null),a=n.extensions,t=n.types,i=["nginx","apache",void 0,"iana"],Object.keys(o).forEach((function(e){var n=o[e],s=n.extensions;if(s&&s.length){a[e]=s;for(var r=0;r<s.length;r++){var c=s[r];if(t[c]){var l=i.indexOf(o[t[c]].source),p=i.indexOf(n.source);if("application/octet-stream"!==t[c]&&(l>p||l===p&&"application/"===t[c].substr(0,12)))continue}t[c]=e}}}))}(Bs);var Hs=a(Bs),Vs="undefined"!=typeof window?window:{screen:{},navigator:{}},Ws=(Vs.matchMedia||function(){return{matches:!1}}).bind(Vs),$s={get passive(){return!0}},Ks=function(){};Vs.addEventListener&&Vs.addEventListener("p",Ks,$s),Vs.removeEventListener&&Vs.removeEventListener("p",Ks,!1);var Ys="ontouchstart"in Vs,Gs=Ys||"TouchEvent"in Vs&&Ws("(any-pointer: coarse)").matches,Js=(Vs.navigator.maxTouchPoints||0)>0||Gs,Xs=Vs.navigator.userAgent||"",Zs=Ws("(pointer: coarse)").matches&&/iPad|Macintosh/.test(Xs)&&Math.min(Vs.screen.width||0,Vs.screen.height||0)>=768,Qs=(Ws("(pointer: coarse)").matches||!Ws("(pointer: fine)").matches&&Ys)&&!/Windows.*Firefox/.test(Xs),er=Ws("(any-pointer: fine)").matches||Ws("(any-hover: hover)").matches||Zs||!Ys,nr=!Js||!er&&Qs?Js?"touchOnly":"mouseOnly":"hybrid",ar="mouseOnly"===nr?"mouse":"touchOnly"===nr||Qs?"touch":"mouse";function tr(e){return e||(new URLSearchParams(window.location.search).get("lng")||"en")}function ir(){return"touchOnly"===nr||"hybrid"===nr&&"touch"===ar?"mobile":"desktop"}function or(e,n,a,t,i,o,s){return s&&o&&"device"===i||o&&"device"===i?"".concat(e,"/").concat(a,"/").concat(t,"/").concat(n):s&&o&&"shared"===i||o&&"shared"===i?"".concat(e,"/").concat(a,"/shared/").concat(n):"device"===i?"".concat(e,"/").concat(t,"/").concat(n):"shared/device"===i?"".concat(e,"/shared/").concat(t,"/").concat(n):"languageSpecific"===i?"".concat(e,"/").concat(a,"/").concat(n):"default"===i?"".concat(e,"/").concat(n):"".concat(e,"/shared/").concat(n)}function sr(e){var n=Hs.lookup(e);if(!n)throw new Error("Unrecognized file extension in path: ".concat(e));if(n.startsWith("image/"))return"images";if(n.startsWith("audio/"))return"audio";if(n.startsWith("video/"))return"video";throw new Error("Unsupported MIME type for file: ".concat(e,". Only image, audio, and video files are supported."))}function rr(e,n,a,t){return new(a||(a=Promise))((function(i,o){function s(e){try{c(t.next(e))}catch(e){o(e)}}function r(e){try{c(t.throw(e))}catch(e){o(e)}}function c(e){var n;e.done?i(e.value):(n=e.value,n instanceof a?n:new a((function(e){e(n)}))).then(s,r)}c((t=t.apply(e,n||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var cr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pr=lr(((e,{include:n,exclude:a}={})=>{const t=e=>{const t=n=>"string"==typeof n?e===n:n.test(e);return n?n.some(t):!a||!a.some(t)};for(const[n,a]of(e=>{const n=new Set;do{for(const a of Reflect.ownKeys(e))n.add([e,a])}while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return n})(e.constructor.prototype)){if("constructor"===a||!t(a))continue;const i=Reflect.getOwnPropertyDescriptor(n,a);i&&"function"==typeof i.value&&(e[a]=e[a].bind(e))}return e}));class ur 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 dr(e){return[...new Set(e)]}function mr(e){if(!e)return e;let n;if(Array.isArray(e)){n=[];for(const a of e)n.push(mr(a));return n}if("object"==typeof e&&null!==e){n={};for(const a in e)e.hasOwnProperty(a)&&(n[a]=mr(e[a]));return n}return e}window.jsPsych={get init(){throw new ur("`jsPsych.init()` was replaced by `initJsPsych()` in jsPsych v7.")},get data(){throw new ur},get randomization(){throw new ur},get turk(){throw new ur},get pluginAPI(){throw new ur},get ALL_KEYS(){throw new ur('jsPsych.ALL_KEYS was replaced by the "ALL_KEYS" string in jsPsych v7.')},get NO_KEYS(){throw new ur('jsPsych.NO_KEYS was replaced by the "NO_KEYS" string in jsPsych v7.')}};var hr,fr=Object.freeze({__proto__:null,deepCopy:mr,deepMerge:function e(n,a){let t={};for(const i in n)n.hasOwnProperty(i)&&("object"==typeof n[i]&&a.hasOwnProperty(i)?t[i]=e(n[i],a[i]):t[i]=n[i]);for(const n in a)a.hasOwnProperty(n)&&(t.hasOwnProperty(n)&&"object"==typeof a[n]?t[n]=e(t[n],a[n]):t[n]=a[n]);return t},unique:dr});class vr{constructor(e=[]){this.values=e}sum(){let e=0;for(const n of this.values)e+=n;return e}mean(){return this.sum()/this.count()}median(){if(0===this.values.length)return;const e=this.values.slice(0).sort((function(e,n){return e-n})),n=Math.floor(e.length/2);return e.length%2==0?(e[n]+e[n-1])/2:e[n]}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 n=0;for(const a of this.values)n+=Math.pow(a-e,2);return n/(this.values.length-1)}sd(){const e=this.variance();return Math.sqrt(e)}frequencies(){const e={};for(const n of this.values)void 0===e[n]?e[n]=1:e[n]++;return e}all(e){for(const n of this.values)if(!e(n))return!1;return!0}subset(e){const n=[];for(const a of this.values)e(a)&&n.push(a);return new vr(n)}}class gr{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 gr([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 gr:(e>this.trials.length&&(e=this.trials.length),new gr(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 gr:(e>this.trials.length&&(e=this.trials.length),new gr(this.trials.slice(this.trials.length-e,this.trials.length)))}values(){return this.trials}count(){return this.trials.length}readOnly(){return new gr(mr(this.trials))}addToAll(e){for(const n of this.trials)Object.assign(n,e);return this}addToLast(e){return 0!=this.trials.length&&Object.assign(this.trials[this.trials.length-1],e),this}filter(e){let n;n=Array.isArray(e)?mr(e):mr([e]);const a=[];for(const e of this.trials){let t=!1;for(const a of n){let n=!0;for(const t of Object.keys(a))void 0!==e[t]&&e[t]===a[t]||(n=!1);if(n){t=!0;break}}t&&a.push(e)}return new gr(a)}filterCustom(e){return new gr(this.trials.filter(e))}filterColumns(e){return new gr(this.trials.map((n=>Object.fromEntries(e.filter((e=>e in n)).map((e=>[e,n[e]]))))))}select(e){const n=[];for(const a of this.trials)void 0!==a[e]&&n.push(a[e]);return new vr(n)}ignore(e){Array.isArray(e)||(e=[e]);const n=mr(this.trials);for(const a of n)for(const n of e)delete a[n];return new gr(n)}uniqueNames(){const e=[];for(const n of this.trials)for(const a of Object.keys(n))e.includes(a)||e.push(a);return e}csv(){return function(e){const n="object"!=typeof e?JSON.parse(e):e;let a="",t="";const i=[];for(const e of n)for(const n in e){let e=n+"";e='"'+e.replace(/"/g,'""')+'",',i.includes(n)||(i.push(n),a+=e)}a=a.slice(0,-1),t+=a+"\r\n";for(const e of n){a="";for(const n of i){let t=void 0===e[n]?"":e[n];"object"==typeof t&&(t=JSON.stringify(t)),a+='"'+(t+"").replace(/"/g,'""')+'",'}a=a.slice(0,-1),t+=a+"\r\n"}return t}(this.trials)}json(e=!1){return e?JSON.stringify(this.trials,null,"\t"):JSON.stringify(this.trials)}localSave(e,n){let a;if("json"===(e=e.toLowerCase()))a=this.json();else{if("csv"!==e)throw new Error('Invalid format specified for localSave. Must be "json" or "csv".');a=this.csv()}!function(e,n){const a=new Blob([e],{type:"text/plain"});let t="";t=void 0!==window.webkitURL?window.webkitURL.createObjectURL(a):window.URL.createObjectURL(a);const i=document.createElement("a");i.id="jspsych-download-as-text-link",i.style.display="none",i.download=n,i.href=t,i.click()}(a,n)}}class br{constructor(e){this.jsPsych=e,this.dataProperties={},this.reset()}reset(){this.allData=new gr,this.interactionData=new gr}get(){return this.allData}getInteractionData(){return this.interactionData}write(e){const n=this.jsPsych.getProgress(),a=this.jsPsych.getCurrentTrial(),t={trial_type:a.type.info.name,trial_index:n.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),a.data),t),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((n=>n.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 gr;{const n=e.substr(0,e.lastIndexOf("-"));return this.getDataByTimelineNode(n)}}displayData(e="json"){"json"!=(e=e.toLowerCase())&&"csv"!=e&&(console.log("Invalid format declared for displayData function. Using json as default."),e="json");const n="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=n}urlVariables(){return void 0===this.query_string&&(this.query_string=function(){const e=window.location.search.substr(1).split("&"),n={};for(let a=0;a<e.length;++a){const t=e[a].split("=",2);1==t.length?n[t[0]]="":n[t[0]]=decodeURIComponent(t[1].replace(/\+/g," "))}return n}()),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 gr(e)}_fullreset(){this.reset(),this.dataProperties={}}}class xr{constructor(){this.hardwareConnected=!1,document.addEventListener("jspsych-activate",(e=>{this.hardwareConnected=!0}))}hardware(e){const n=new CustomEvent("jspsych",{detail:e});document.dispatchEvent(n)}}class yr{constructor(e,n=!1,a=0){this.getRootElement=e,this.areResponsesCaseSensitive=n,this.minimumValidRt=a,this.listeners=new Set,this.heldKeys=new Set,this.areRootListenersRegistered=!1,pr(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 n of Array.from(this.listeners))n(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,n,a){return!(!n&&this.heldKeys.has(a))&&("ALL_KEYS"===e||"NO_KEYS"!==e&&e.includes(a))}getKeyboardResponse({callback_function:e,valid_responses:n="ALL_KEYS",rt_method:a="performance",persist:t,audio_context:i,audio_context_start_time:o,allow_held_key:s=!1,minimum_valid_rt:r=this.minimumValidRt}){"performance"!==a&&"audio"!==a&&(console.log('Invalid RT method specified in getKeyboardResponse. Defaulting to "performance" method.'),a="performance");const c="performance"===a?performance.now():1e3*o;this.registerRootListeners(),this.areResponsesCaseSensitive||"string"==typeof n||(n=n.map((e=>e.toLowerCase())));const l=o=>{const p=Math.round(("performance"==a?performance.now():1e3*i.currentTime)-c);if(p<r)return;const u=this.toLowerCaseIfInsensitive(o.key);this.isResponseValid(n,s,u)&&(o.preventDefault(),t||this.cancelKeyboardResponse(l),e({key:u,rt:p}))};return this.listeners.add(l),l}cancelKeyboardResponse(e){this.listeners.delete(e)}cancelAllKeyboardResponses(){this.listeners.clear()}compareKeys(e,n){if(!("string"!=typeof e&&null!==e||"string"!=typeof n&&null!==n))return"string"==typeof e&&"string"==typeof n?this.areResponsesCaseSensitive?e===n:e.toLowerCase()===n.toLowerCase():null===e&&null===n;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"}(hr||(hr={}));const wr={data:{type:hr.OBJECT,pretty_name:"Data",default:{}},on_start:{type:hr.FUNCTION,pretty_name:"On start",default:function(){}},on_finish:{type:hr.FUNCTION,pretty_name:"On finish",default:function(){}},on_load:{type:hr.FUNCTION,pretty_name:"On load",default:function(){}},post_trial_gap:{type:hr.INT,pretty_name:"Post trial gap",default:null},css_classes:{type:hr.STRING,pretty_name:"Custom CSS classes",default:null},simulation_options:{type:hr.COMPLEX,default:null}},kr=[hr.AUDIO,hr.IMAGE,hr.VIDEO];class _r{constructor(e,n){this.useWebaudio=e,this.webaudioContext=n,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(((n,a)=>{void 0===this.audio_buffers[e]||"tmp"==this.audio_buffers[e]?this.preloadAudio([e],(()=>{n(this.audio_buffers[e])}),(()=>{}),(e=>{a(e.error)})):n(this.audio_buffers[e])}))}preloadAudio(e,n=(()=>{}),a=(e=>{}),t=(e=>{})){e=dr(e.flat());let i=0;if(0==e.length)return void n();const o=(o,s=1)=>{const r=new XMLHttpRequest;r.open("GET",o,!0),r.responseType="arraybuffer",r.onload=()=>{this.context.decodeAudioData(r.response,(t=>{this.audio_buffers[o]=t,i++,a(o),i==e.length&&n()}),(e=>{t({source:o,error:e})}))},r.onerror=e=>{let n=e;404==r.status&&(n="404"),t({source:o,error:n})},r.onloadend=e=>{404==r.status&&t({source:o,error:"404"})},r.send(),this.preload_requests.push(r)},s=(o,s=1)=>{const r=new Audio,c=()=>{this.audio_buffers[o]=r,i++,a(o),i==e.length&&n(),r.removeEventListener("canplaythrough",c)};r.addEventListener("canplaythrough",c),r.addEventListener("error",(function e(n){t({source:r.src,error:n}),r.removeEventListener("error",e)})),r.addEventListener("abort",(function e(n){t({source:r.src,error:n}),r.removeEventListener("abort",e)})),r.src=o,this.preload_requests.push(r)};for(const t of e)void 0!==this.audio_buffers[t]?(i++,a(t),i==e.length&&n()):(this.audio_buffers[t]="tmp",null!==this.audioContext()?o(t):s(t))}preloadImages(e,n=(()=>{}),a=(e=>{}),t=(e=>{})){e=dr(e.flat());var i=0;if(0!==e.length)for(let o=0;o<e.length;o++){const s=new Image,r=e[o];s.onload=()=>{i++,a(r),i===e.length&&n()},s.onerror=e=>{t({source:r,error:e})},s.src=r,this.img_cache[r]=s,this.preload_requests.push(s)}else n()}preloadVideo(e,n=(()=>{}),a=(e=>{}),t=(e=>{})){e=dr(e.flat());let i=0;if(0!==e.length)for(const o of e){const s=this.video_buffers,r=new XMLHttpRequest;r.open("GET",o,!0),r.responseType="blob",r.onload=()=>{if(200===r.status||0===r.status){const t=r.response;s[o]=URL.createObjectURL(t),i++,a(o),i===e.length&&n()}},r.onerror=e=>{let n=e;404==r.status&&(n="404"),t({source:o,error:n})},r.onloadend=e=>{404==r.status&&t({source:o,error:"404"})},r.send(),this.preload_requests.push(r)}else n()}getAutoPreloadList(e){const n=Object.fromEntries(kr.map((e=>[e,new Set]))),a=(e,t)=>{var i,o,s,r;if(void 0!==e.timeline)for(const n of e.timeline)a(n,null!==(i=e.type)&&void 0!==i?i:t);else if(null===(s=null!==(o=e.type)&&void 0!==o?o:t)||void 0===s?void 0:s.info){const{name:a,parameters:i}=(null!==(r=e.type)&&void 0!==r?r:t).info;this.preloadMap.has(a)||this.preloadMap.set(a,Object.fromEntries(Object.entries(i).filter((([e,{type:n,preload:a}])=>kr.includes(n)&&(null==a||a))).map((([e,{type:n}])=>[e,n]))));for(const[t,i]of Object.entries(this.preloadMap.get(a))){const a=e[t],o=n[i];if("string"==typeof a)o.add(a);else if(Array.isArray(a))for(const e of a.flat())"string"==typeof e&&o.add(e)}}};return a({timeline:e}),{images:[...n[hr.IMAGE]],audio:[...n[hr.AUDIO]],video:[...n[hr.VIDEO]]}}cancelPreloads(){for(const e of this.preload_requests)e.onload=()=>{},e.onerror=()=>{},e.oncanplaythrough=()=>{},e.onabort=()=>{};this.preload_requests=[]}initializeMicrophoneRecorder(e){const n=new MediaRecorder(e);this.microphone_recorder=n}getMicrophoneRecorder(){return this.microphone_recorder}initializeCameraRecorder(e,n){this.camera_stream=e;const a=new MediaRecorder(e,n);this.camera_recorder=a}getCameraStream(){return this.camera_stream}getCameraRecorder(){return this.camera_recorder}}class jr{constructor(e,n){this.getDisplayContainerElement=e,this.setJsPsychTimeout=n}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,n=0){n>0?this.setJsPsychTimeout((()=>{this.keyDown(e),this.keyUp(e)}),n):(this.keyDown(e),this.keyUp(e))}clickTarget(e,n=0){n>0?this.setJsPsychTimeout((()=>{e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0}))}),n):(e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0})))}fillTextInput(e,n,a=0){a>0?this.setJsPsychTimeout((()=>{e.value=n}),a):e.value=n}getValidKey(e){const n=["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 a;if("NO_KEYS"==e)a=null;else if("ALL_KEYS"==e)a=n[Math.floor(Math.random()*n.length)];else{const n=e.flat();a=n[Math.floor(Math.random()*n.length)]}return a}mergeSimulationData(e,n){return Object.assign(Object.assign({},e),null==n?void 0:n.data)}ensureSimulationDataConsistency(e,n){if(n.rt&&(n.rt=Math.round(n.rt)),e.trial_duration&&n.rt&&n.rt>e.trial_duration&&(n.rt=null,n.response&&(n.response=null),n.correct&&(n.correct=!1)),e.choices&&"NO_KEYS"==e.choices&&(n.rt&&(n.rt=null),n.response&&(n.response=null)),e.allow_response_before_complete&&e.sequence_reps&&e.frame_time){const a=e.sequence_reps*e.frame_time*e.stimuli.length;n.rt<a&&(n.rt=null,n.response=null)}}}class Or{constructor(){this.timeout_handlers=[]}setTimeout(e,n){const a=window.setTimeout(e,n);return this.timeout_handlers.push(a),a}clearAllTimeouts(){for(const e of this.timeout_handlers)clearTimeout(e);this.timeout_handlers=[]}}var Cr={exports:{}};!function(e,n,a){function t(e){var n=this,a=function(){var e=4022871197,n=function(n){n=String(n);for(var a=0;a<n.length;a++){var t=.02519603282416938*(e+=n.charCodeAt(a));t-=e=t>>>0,e=(t*=e)>>>0,e+=4294967296*(t-=e)}return 2.3283064365386963e-10*(e>>>0)};return n}();n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=a(" "),n.s1=a(" "),n.s2=a(" "),n.s0-=a(e),n.s0<0&&(n.s0+=1),n.s1-=a(e),n.s1<0&&(n.s1+=1),n.s2-=a(e),n.s2<0&&(n.s2+=1),a=null}function i(e,n){return n.c=e.c,n.s0=e.s0,n.s1=e.s1,n.s2=e.s2,n}function o(e,n){var a=new t(e),o=n&&n.state,s=a.next;return s.int32=function(){return 4294967296*a.next()|0},s.double=function(){return s()+11102230246251565e-32*(2097152*s()|0)},s.quick=s,o&&("object"==typeof o&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.alea=o}(0,Cr,!1);var Sr=Cr.exports,Tr=lr(Sr),Pr={exports:{}};!function(e,n,a){function t(e){var n=this,a="";n.x=0,n.y=0,n.z=0,n.w=0,n.next=function(){var e=n.x^n.x<<11;return n.x=n.y,n.y=n.z,n.z=n.w,n.w^=n.w>>>19^e^e>>>8},e===(0|e)?n.x=e:a+=e;for(var t=0;t<a.length+64;t++)n.x^=0|a.charCodeAt(t),n.next()}function i(e,n){return n.x=e.x,n.y=e.y,n.z=e.z,n.w=e.w,n}function o(e,n){var a=new t(e),o=n&&n.state,s=function(){return(a.next()>>>0)/4294967296};return s.double=function(){do{var e=((a.next()>>>11)+(a.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},s.int32=a.next,s.quick=s,o&&("object"==typeof o&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.xor128=o}(0,Pr,!1);var Er=Pr.exports,Ir={exports:{}};!function(e,n,a){function t(e){var n=this,a="";n.next=function(){var e=n.x^n.x>>>2;return n.x=n.y,n.y=n.z,n.z=n.w,n.w=n.v,(n.d=n.d+362437|0)+(n.v=n.v^n.v<<4^e^e<<1)|0},n.x=0,n.y=0,n.z=0,n.w=0,n.v=0,e===(0|e)?n.x=e:a+=e;for(var t=0;t<a.length+64;t++)n.x^=0|a.charCodeAt(t),t==a.length&&(n.d=n.x<<10^n.x>>>4),n.next()}function i(e,n){return n.x=e.x,n.y=e.y,n.z=e.z,n.w=e.w,n.v=e.v,n.d=e.d,n}function o(e,n){var a=new t(e),o=n&&n.state,s=function(){return(a.next()>>>0)/4294967296};return s.double=function(){do{var e=((a.next()>>>11)+(a.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},s.int32=a.next,s.quick=s,o&&("object"==typeof o&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.xorwow=o}(0,Ir,!1);var Lr=Ir.exports,Ar={exports:{}};!function(e,n,a){function t(e){var n=this;n.next=function(){var e,a,t=n.x,i=n.i;return e=t[i],a=(e^=e>>>7)^e<<24,a^=(e=t[i+1&7])^e>>>10,a^=(e=t[i+3&7])^e>>>3,a^=(e=t[i+4&7])^e<<7,e=t[i+7&7],a^=(e^=e<<13)^e<<9,t[i]=a,n.i=i+1&7,a},function(e,n){var a,t=[];if(n===(0|n))t[0]=n;else for(n=""+n,a=0;a<n.length;++a)t[7&a]=t[7&a]<<15^n.charCodeAt(a)+t[a+1&7]<<13;for(;t.length<8;)t.push(0);for(a=0;a<8&&0===t[a];++a);for(8==a?t[7]=-1:t[a],e.x=t,e.i=0,a=256;a>0;--a)e.next()}(n,e)}function i(e,n){return n.x=e.x.slice(),n.i=e.i,n}function o(e,n){null==e&&(e=+new Date);var a=new t(e),o=n&&n.state,s=function(){return(a.next()>>>0)/4294967296};return s.double=function(){do{var e=((a.next()>>>11)+(a.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},s.int32=a.next,s.quick=s,o&&(o.x&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.xorshift7=o}(0,Ar,!1);var Rr=Ar.exports,Nr={exports:{}};!function(e,n,a){function t(e){var n=this;n.next=function(){var e,a,t=n.w,i=n.X,o=n.i;return n.w=t=t+1640531527|0,a=i[o+34&127],e=i[o=o+1&127],a^=a<<13,e^=e<<17,a^=a>>>15,e^=e>>>12,a=i[o]=a^e,n.i=o,a+(t^t>>>16)|0},function(e,n){var a,t,i,o,s,r=[],c=128;for(n===(0|n)?(t=n,n=null):(n+="\0",t=0,c=Math.max(c,n.length)),i=0,o=-32;o<c;++o)n&&(t^=n.charCodeAt((o+32)%n.length)),0===o&&(s=t),t^=t<<10,t^=t>>>15,t^=t<<4,t^=t>>>13,o>=0&&(s=s+1640531527|0,i=0==(a=r[127&o]^=t+s)?i+1:0);for(i>=128&&(r[127&(n&&n.length||0)]=-1),i=127,o=512;o>0;--o)t=r[i+34&127],a=r[i=i+1&127],t^=t<<13,a^=a<<17,t^=t>>>15,a^=a>>>12,r[i]=t^a;e.w=s,e.X=r,e.i=i}(n,e)}function i(e,n){return n.i=e.i,n.w=e.w,n.X=e.X.slice(),n}function o(e,n){null==e&&(e=+new Date);var a=new t(e),o=n&&n.state,s=function(){return(a.next()>>>0)/4294967296};return s.double=function(){do{var e=((a.next()>>>11)+(a.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},s.int32=a.next,s.quick=s,o&&(o.X&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.xor4096=o}(0,Nr,!1);var Dr=Nr.exports,zr={exports:{}};!function(e,n,a){function t(e){var n=this,a="";n.next=function(){var e=n.b,a=n.c,t=n.d,i=n.a;return e=e<<25^e>>>7^a,a=a-t|0,t=t<<24^t>>>8^i,i=i-e|0,n.b=e=e<<20^e>>>12^a,n.c=a=a-t|0,n.d=t<<16^a>>>16^i,n.a=i-e|0},n.a=0,n.b=0,n.c=-1640531527,n.d=1367130551,e===Math.floor(e)?(n.a=e/4294967296|0,n.b=0|e):a+=e;for(var t=0;t<a.length+20;t++)n.b^=0|a.charCodeAt(t),n.next()}function i(e,n){return n.a=e.a,n.b=e.b,n.c=e.c,n.d=e.d,n}function o(e,n){var a=new t(e),o=n&&n.state,s=function(){return(a.next()>>>0)/4294967296};return s.double=function(){do{var e=((a.next()>>>11)+(a.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},s.int32=a.next,s.quick=s,o&&("object"==typeof o&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.tychei=o}(0,zr,!1);var Mr=zr.exports,Fr={exports:{}};!function(e){!function(n,a,t){var i,o=256,s="random",r=t.pow(o,6),c=t.pow(2,52),l=2*c,p=o-1;function u(e,p,u){var g=[],b=f(h((p=1==p?{entropy:!0}:p||{}).entropy?[e,v(a)]:null==e?function(){try{var e;return i&&(e=i.randomBytes)?e=e(o):(e=new Uint8Array(o),(n.crypto||n.msCrypto).getRandomValues(e)),v(e)}catch(e){var t=n.navigator,s=t&&t.plugins;return[+new Date,n,s,n.screen,v(a)]}}():e,3),g),x=new d(g),y=function(){for(var e=x.g(6),n=r,a=0;e<c;)e=(e+a)*o,n*=o,a=x.g(1);for(;e>=l;)e/=2,n/=2,a>>>=1;return(e+a)/n};return y.int32=function(){return 0|x.g(4)},y.quick=function(){return x.g(4)/4294967296},y.double=y,f(v(x.S),a),(p.pass||u||function(e,n,a,i){return i&&(i.S&&m(i,x),e.state=function(){return m(x,{})}),a?(t[s]=e,n):e})(y,b,"global"in p?p.global:this==t,p.state)}function d(e){var n,a=e.length,t=this,i=0,s=t.i=t.j=0,r=t.S=[];for(a||(e=[a++]);i<o;)r[i]=i++;for(i=0;i<o;i++)r[i]=r[s=p&s+e[i%a]+(n=r[i])],r[s]=n;(t.g=function(e){for(var n,a=0,i=t.i,s=t.j,r=t.S;e--;)n=r[i=p&i+1],a=a*o+r[p&(r[i]=r[s=p&s+n])+(r[s]=n)];return t.i=i,t.j=s,a})(o)}function m(e,n){return n.i=e.i,n.j=e.j,n.S=e.S.slice(),n}function h(e,n){var a,t=[],i=typeof e;if(n&&"object"==i)for(a in e)try{t.push(h(e[a],n-1))}catch(e){}return t.length?t:"string"==i?e:e+"\0"}function f(e,n){for(var a,t=e+"",i=0;i<t.length;)n[p&i]=p&(a^=19*n[p&i])+t.charCodeAt(i++);return v(n)}function v(e){return String.fromCharCode.apply(0,e)}if(f(t.random(),a),e.exports){e.exports=u;try{i=require("crypto")}catch(e){}}else t["seed"+s]=u}("undefined"!=typeof self?self:cr,[],Math)}(Fr);var qr=Sr,Br=Er,Ur=Lr,Hr=Rr,Vr=Dr,Wr=Mr,$r=Fr.exports;$r.alea=qr,$r.xor128=Br,$r.xorwow=Ur,$r.xorshift7=Hr,$r.xor4096=Vr,$r.tychei=Wr;var Kr=$r,Yr=["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 Gr(e){const n=e?.seed?new Kr(e.seed):null;function a(){return e&&e.maxLength>1?function(){var n,a=!1;for(;!a;)(n=t()).length<=e.maxLength&&(a=!0);return n}():t()}function t(){return Yr[i(Yr.length)]}function i(e){const a=n?n():Math.random();return Math.floor(a*e)}if(void 0===e)return a();"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+i(e.max+1-e.min),s=[],r="",c=0,l=0;l<o*e.wordsPerString;l++)c===e.wordsPerString-1?r+=e.formatter(a(),c):r+=e.formatter(a(),c)+e.separator,c++,(l+1)%e.wordsPerString==0&&(s.push(r),r="",c=0);return"string"==typeof e.join&&(s=s.join(e.join)),s}var Jr=Gr;Gr.wordList=Yr;var Xr=lr(Jr);function Zr(e,n,a=!1){const t=Array.isArray(e),i=Array.isArray(n);if(t)if(i){if(e.length!=n.length)if(console.warn("Unclear parameters given to randomization.repeat. Items and repetitions are unequal lengths. Behavior may not be as expected."),n.length<e.length){let a=[];for(let t=0;t<e.length;t++)a.push(n);n=a}else n=n.slice(0,e.length)}else{let a=[];for(let t=0;t<e.length;t++)a.push(n);n=a}else i?(n=[n[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],n=[n]);let o=[];for(let a=0;a<e.length;a++)for(let t=0;t<n[a];t++)null==e[a]||"object"!=typeof e[a]?o.push(e[a]):o.push(Object.assign({},e[a]));let s=Qr(o);return a&&(s=function(e){const n={};for(const a of e)for(const e of Object.keys(a))void 0===n[e]&&(n[e]=[]),n[e].push(a[e]);return n}(s)),s}function Qr(e){Array.isArray(e)||console.error("Argument to shuffle() must be an array.");const n=e.slice(0);let a,t,i=n.length;for(;i;)t=Math.floor(Math.random()*i--),a=n[i],n[i]=n[t],n[t]=a;return n}function ec(e,n=!1){const a=e.length;if(1==a)return console.warn("shuffleAlternateGroups() was called with only one group. Defaulting to simple shuffle."),Qr(e[0]);let t=[];for(let e=0;e<a;e++)t.push(e);n&&(t=Qr(t));const i=[];let o=null;for(let n=0;n<a;n++)o=null===o?e[n].length:Math.min(o,e[n].length),i.push(Qr(e[n]));const s=[];for(let e=0;e<o;e++)for(let n=0;n<t.length;n++)s.push(i[t[n]][e]);return s}function nc(e,n){return Array.isArray(e)||console.error("First argument to sampleWithoutReplacement() must be an array"),n>e.length&&console.error("Cannot take a sample larger than the size of the set of items to sample."),Qr(e).slice(0,n)}function ac(e,n,a){Array.isArray(e)||console.error("First argument to sampleWithReplacement() must be an array");const t=[];if(void 0!==a){a.length!==e.length&&console.error("The length of the weights array must equal the length of the array to be sampled from.");let n=0;for(const e of a)n+=e;for(const e of a)t.push(e/n)}else for(let n=0;n<e.length;n++)t.push(1/e.length);const i=[t[0]];for(let e=1;e<t.length;e++)i.push(t[e]+i[e-1]);const o=[];for(let a=0;a<n;a++){const n=Math.random();let a=0;for(;n>i[a];)a++;o.push(e[a])}return o}function tc(e,n){return function(){var e=0,n=0;for(;0===e;)e=Math.random();for(;0===n;)n=Math.random();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*n)}()*n+e}function ic(e){return-Math.log(Math.random())/e}var oc=Object.freeze({__proto__:null,factorial:function(e,n=1,a=!1){let t=[{}];for(const[n,a]of Object.entries(e)){const e=[];for(const i of a)for(const a of t)e.push(Object.assign(Object.assign({},a),{[n]:i}));t=e}return Zr(t,n,a)},randomID:function(e=32){let n="";const a="0123456789abcdefghjklmnopqrstuvwxyz";for(let t=0;t<e;t++)n+=a[Math.floor(35*Math.random())];return n},randomInt:function(e,n){if(n<e)throw new Error("Upper boundary must be less than or equal to lower boundary");return e+Math.floor(Math.random()*(n-e+1))},randomWords:function(e){return Xr(e)},repeat:Zr,sampleBernoulli:function(e){return Math.random()<=e?1:0},sampleExGaussian:function(e,n,a,t=!1){let i=tc(e,n)+ic(a);if(t)for(;i<=0;)i=tc(e,n)+ic(a);return i},sampleExponential:ic,sampleNormal:tc,sampleWithReplacement:ac,sampleWithoutReplacement:nc,setSeed:function(e=Math.random().toString()){return Math.random=Tr(e),e},shuffle:Qr,shuffleAlternateGroups:ec,shuffleNoRepeats:function(e,n){Array.isArray(e)||console.error("First argument to shuffleNoRepeats() must be an array."),void 0!==n&&"function"!=typeof n&&console.error("Second argument to shuffleNoRepeats() must be a function."),void 0===n&&(n=function(e,n){return e===n});const a=Qr(e);for(let e=0;e<a.length-1;e++)if(n(a[e],a[e+1])){let t=Math.floor(Math.random()*(a.length-2))+1;for(;n(a[e+1],a[t])||n(a[e+1],a[t+1])||n(a[e+1],a[t-1])||n(a[e],a[t]);)t=Math.floor(Math.random()*(a.length-2))+1;const i=a[t];a[t]=a[e+1],a[e+1]=i}return a}});function sc(){const e={previewMode:!1,outsideTurk:!1,hitId:"INVALID_URL_PARAMETER",assignmentId:"INVALID_URL_PARAMETER",workerId:"INVALID_URL_PARAMETER",turkSubmitTo:"INVALID_URL_PARAMETER"},n=function(e,n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");const a=new RegExp("[\\?&]"+n+"=([^&#]*)").exec(e);return null==a?"":a[1]},a=n(window.location.href,"assignmentId")?window.location.href:document.referrer;return["assignmentId","hitId","workerId","turkSubmitTo"].map((function(t){e[t]=unescape(n(a,t))})),e.previewMode="ASSIGNMENT_ID_NOT_AVAILABLE"==e.assignmentId,e.outsideTurk=!e.previewMode&&""===e.hitId&&""==e.assignmentId&&""==e.workerId,e}var rc=Object.freeze({__proto__:null,submitToTurk:function(e){const n=sc(),a=n.assignmentId,t=n.turkSubmitTo;if(!a||!t)return;const i=document.createElement("form");i.method="POST",i.action=t+"/mturk/externalSubmit?assignmentId="+a;for(const n in e)if(e.hasOwnProperty(n)){const a=document.createElement("input");a.type="hidden",a.name=n,a.id=n,a.value=e[n],i.appendChild(a)}document.body.appendChild(i),i.submit()},turkInfo:sc});class cc{constructor(e,n,a,t){if(this.jsPsych=e,this.progress={current_location:-1,current_variable_set:0,current_repetition:0,current_iteration:0,done:!1},this.parent_node=a,this.relative_id=void 0===a?0:t,void 0!==n.timeline){this.timeline_parameters={timeline:[],loop_function:n.loop_function,conditional_function:n.conditional_function,sample:n.sample,randomize_order:void 0!==n.randomize_order&&n.randomize_order,repetitions:void 0===n.repetitions?1:n.repetitions,timeline_variables:void 0===n.timeline_variables?[{}]:n.timeline_variables,on_timeline_finish:n.on_timeline_finish,on_timeline_start:n.on_timeline_start},this.setTimelineVariablesOrder();var i=Object.assign({},n);delete i.timeline,delete i.conditional_function,delete i.loop_function,delete i.randomize_order,delete i.repetitions,delete i.timeline_variables,delete i.sample,delete i.on_timeline_start,delete i.on_timeline_finish,this.node_trial_data=i;for(var o=0;o<n.timeline.length;o++){var s=Object.assign({},i,n.timeline[o]);if("object"==typeof i.data&&"object"==typeof n.timeline[o].data){var r=Object.assign({},i.data,n.timeline[o].data);s.data=r}this.timeline_parameters.timeline.push(new cc(this.jsPsych,s,this,o))}}else void 0===n.type&&console.error('Trial level node is missing the "type" parameter. The parameters for the node are: '+JSON.stringify(n)),this.trial_parameters=Object.assign({},n)}trial(){return void 0===this.timeline_parameters?mr(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 n=[],a=0;a<e.timeline_variables.length;a++)n.push(a);void 0!==e.sample&&("custom"==e.sample.type?n=e.sample.fn(n):"with-replacement"==e.sample.type?n=ac(n,e.sample.size,e.sample.weights):"without-replacement"==e.sample.type?n=nc(n,e.sample.size):"fixed-repetitions"==e.sample.type?n=Zr(n,e.sample.size,!1):"alternate-groups"==e.sample.type?n=ec(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&&(n=Qr(n)),this.progress.order=n}}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,n=this.timeline_parameters,a=this.jsPsych.internal;if(e.done)return!0;if(-1==e.current_location){if(void 0!==n){if(void 0!==n.conditional_function&&0==e.current_repetition&&0==e.current_variable_set){a.call_immediate=!0;var t=n.conditional_function();if(a.call_immediate=!1,0==t)return e.done=!0,!0}void 0!==n.on_timeline_start&&0==e.current_variable_set&&n.on_timeline_start()}return e.current_location=0,this.advance()}if(void 0!==n){for(var i=!1;e.current_location<n.timeline.length&&0==i;){if(!n.timeline[e.current_location].advance())return i=!0,!1;e.current_location++}return e.current_variable_set<e.order.length-1?(this.nextSet(),this.advance()):e.current_repetition<n.repetitions-1?(this.nextRepetiton(),void 0!==n.on_timeline_finish&&n.on_timeline_finish(),this.advance()):(void 0!==n.on_timeline_finish&&n.on_timeline_finish(),void 0!==n.loop_function?(a.call_immediate=!0,n.loop_function(this.generatedData())?(this.reset(),a.call_immediate=!1,this.parent_node.advance()):(e.done=!0,a.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 n=this.getTimelineVariableValue(e);return void 0===n?void 0!==this.parent_node?this.parent_node.findTimelineVariable(e):void 0:n}timelineVariable(e){if(void 0===this.timeline_parameters){const n=this.findTimelineVariable(e);return void 0===n&&console.warn("Timeline variable "+e+" not found."),n}{var n=Math.max(0,this.progress.current_location);n==this.timeline_parameters.timeline.length&&(n-=1);const a=this.timeline_parameters.timeline[n].timelineVariable(e);return void 0===a&&console.warn("Timeline variable "+e+" not found."),a}}allTimelineVariables(){for(var e=this.allTimelineVariablesNames(),n={},a=0;a<e.length;a++)n[e[a]]=this.timelineVariable(e[a]);return n}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 n=Math.max(0,this.progress.current_location);return n==this.timeline_parameters.timeline.length&&(n-=1),this.timeline_parameters.timeline[n].allTimelineVariablesNames(e)}if(void 0===this.timeline_parameters)return e}length(){var e=0;if(void 0===this.timeline_parameters)return 1;for(var n=0;n<this.timeline_parameters.timeline.length;n++)e+=this.timeline_parameters.timeline[n].length();return e}percentComplete(){for(var e=this.length(),n=0,a=0;a<this.timeline_parameters.timeline.length;a++)this.timeline_parameters.timeline[a].isComplete()&&(n+=this.timeline_parameters.timeline[a].length());return n/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 n=[],a=0;a<this.timeline_parameters.timeline.length;a++){var t=this.timeline_parameters.timeline[a].trialsOfType(e);n=n.concat(t)}return n}insert(e){void 0===this.timeline_parameters?console.error("Cannot add new trials to a trial-level node."):this.timeline_parameters.timeline.push(new cc(this.jsPsych,Object.assign(Object.assign({},this.node_trial_data),e),this,this.timeline_parameters.timeline.length))}}function lc(e){return new Promise((n=>setTimeout(n,e)))}class pc{version(){return"7.3.4"}constructor(e){this.extensions={},this.turk=rc,this.randomization=oc,this.utils=fr,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,pr(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 br(this),this.pluginAPI=function(e){const n=e.getInitSettings(),a=pr(new yr(e.getDisplayContainerElement,n.case_sensitive_responses,n.minimum_valid_rt)),t=pr(new Or),i=pr(new _r(n.use_webaudio,e.webaudio_context)),o=pr(new xr),s=pr(new jr(e.getDisplayContainerElement,t.setTimeout));return Object.assign({},a,t,i,o,s)}(this);for(const n of e.extensions)this.extensions[n.type.info.name]=new n.type(this);this.pluginAPI.initAudio()}run(e){return rr(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 cc(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,n="data-only",a={}){return rr(this,void 0,void 0,(function*(){this.simulation_mode=n,this.simulation_options=a,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 n;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 a=this.data.getLastTrialData().values()[0],t=this.current_trial;if("object"==typeof t.save_trial_parameters)for(const e of Object.keys(t.save_trial_parameters)){const n=t.save_trial_parameters[e];!0===n&&(void 0===t[e]?console.warn(`Invalid parameter specified in save_trial_parameters. Trial has no property called "${e}".`):"function"==typeof t[e]?a[e]=t[e].toString():a[e]=t[e]),!1===n&&"internal_node_id"!==e&&"trial_index"!==e&&delete a[e]}const i=(null!==(n=t.extensions)&&void 0!==n?n:[]).map((e=>this.extensions[e.type.info.name].on_finish(e.params))),o=()=>{this.internal.call_immediate=!0,"function"==typeof t.on_finish&&t.on_finish(a),this.opts.on_trial_finish(a),this.opts.on_data_update(a),this.internal.call_immediate=!1,"data-only"===this.simulation_mode?this.nextTrial():null===typeof t.post_trial_gap||void 0===t.post_trial_gap?this.opts.default_iti>0?setTimeout(this.nextTrial,this.opts.default_iti):this.nextTrial():t.post_trial_gap>0?setTimeout(this.nextTrial,t.post_trial_gap):this.nextTrial()};if(i.some((e=>"function"==typeof e.then)))Promise.all(i.map((e=>Promise.resolve(e).then((e=>{Object.assign(a,e)}))))).then(o);else{for(const e of i)Object.assign(a,e);o()}}endExperiment(e="",n={}){this.timeline.end_message=e,this.timeline.end(),this.pluginAPI.cancelAllKeyboardResponses(),this.pluginAPI.clearAllTimeouts(),this.finishTrial(n)}endCurrentTimeline(){this.timeline.endActiveNode()}getCurrentTrial(){return this.current_trial}getInitSettings(){return this.opts}getCurrentTimelineNodeID(){return this.timeline.activeID()}timelineVariable(e,n=!1){return this.internal.call_immediate||!0===n?this.timeline.timelineVariable(e):{timelineVariablePlaceholder:!0,timelineVariableFunction:()=>this.timeline.timelineVariable(e)}}getAllTimelineVariables(){return this.timeline.allTimelineVariables()}addNodeToEndOfTimeline(e,n){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 rr(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 n=e.display_element instanceof Element?e.display_element:document.querySelector("#"+e.display_element);null===n?console.error("The display_element specified in initJsPsych() does not exist in the DOM."):e.display_element=n}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 rr(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()),n=()=>{void 0!==this.timeline.end_message&&(this.DOM_target.innerHTML=this.timeline.end_message),this.resolveFinishedPromise()};e?Promise.resolve(e).then(n):n()}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 ur("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({},pr(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 n of e.extensions)this.extensions[n.type.info.name].on_start(n.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 n=()=>{if("function"==typeof e.on_load&&e.on_load(),Array.isArray(e.extensions))for(const n of e.extensions)this.extensions[n.type.info.name].on_load(n.params)};let a,t,i;this.simulation_mode||(a=e.type.trial(this.DOM_target,e,n)),this.simulation_mode&&(e.type.simulate?(e.simulation_options||(t=this.simulation_options.default),e.simulation_options&&("string"==typeof e.simulation_options?this.simulation_options[e.simulation_options]?t=this.simulation_options[e.simulation_options]:this.simulation_options.default?(console.log(`No matching simulation options found for "${e.simulation_options}". Using "default" options.`),t=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.`),t={}):t=e.simulation_options),i=this.utils.deepMerge(this.simulation_options.default,t),i=this.utils.deepCopy(i),i=this.replaceFunctionsWithValues(i,null),a=!1===(null==i?void 0:i.simulate)?e.type.trial(this.DOM_target,e,n):e.type.simulate(e,(null==i?void 0:i.mode)||this.simulation_mode,i,n)):a=e.type.trial(this.DOM_target,e,n));a&&"function"==typeof a.then||this.simulation_mode&&(!this.simulation_mode||!1!==(null==i?void 0:i.simulate))||n(),this.internal.call_immediate=!1}evaluateTimelineVariables(e){for(const n of Object.keys(e))"object"==typeof e[n]&&null!==e[n]&&void 0!==e[n].timelineVariablePlaceholder&&(e[n]=e[n].timelineVariableFunction()),"object"==typeof e[n]&&null!==e[n]&&"timeline"!==n&&"timeline_variables"!==n&&this.evaluateTimelineVariables(e[n])}evaluateFunctionParameters(e){this.internal.call_immediate=!0;for(const n of Object.keys(e))"type"!==n&&(void 0!==wr[n]&&wr[n].type!==hr.FUNCTION&&(e[n]=this.replaceFunctionsWithValues(e[n],null)),void 0!==e.type.info.parameters[n]&&e.type.info.parameters[n].type!==hr.FUNCTION&&(e[n]=this.replaceFunctionsWithValues(e[n],e.type.info.parameters[n])));this.internal.call_immediate=!1}replaceFunctionsWithValues(e,n){if(null===e)return e;if(Array.isArray(e))for(let a=0;a<e.length;a++)e[a]=this.replaceFunctionsWithValues(e[a],n);else if("object"==typeof e)if(null!==n&&n.nested)for(const a of Object.keys(e))"object"==typeof n.nested[a]&&n.nested[a].type!==hr.FUNCTION&&(e[a]=this.replaceFunctionsWithValues(e[a],n.nested[a]));else for(const n of Object.keys(e))"type"!==n&&"timeline"!==n&&"timeline_variables"!==n&&(e[n]=this.replaceFunctionsWithValues(e[n],null));else if("function"==typeof e)return e();return e}setDefaultValues(e){for(const n in e.type.info.parameters)e.type.info.parameters[n].type===hr.COMPLEX?(void 0===e[n]&&e.type.info.parameters[n].default&&(e[n]=e.type.info.parameters[n].default),!0===e.type.info.parameters[n].array&&Array.isArray(e[n])&&e[n].forEach((function(a,t){for(const a in e.type.info.parameters[n].nested)void 0!==e[n][t][a]&&null!==e[n][t][a]||(void 0===e.type.info.parameters[n].nested[a].default?console.error(`You must specify a value for the ${a} parameter (nested in the ${n} parameter) in the ${e.type.info.name} plugin.`):e[n][t][a]=e.type.info.parameters[n].nested[a].default)}))):void 0!==e[n]&&null!==e[n]||(void 0===e.type.info.parameters[n].default?console.error(`You must specify a value for the ${n} parameter in the ${e.type.info.name} plugin.`):e[n]=e.type.info.parameters[n].default)}checkExclusions(e){return rr(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 n=e.min_width||0,a=e.min_height||0;if(window.innerWidth<n||window.innerHeight<a){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 "+n+"px. Your current width is "+window.innerWidth+"px.</p><p>The minimum height is "+a+"px. Your current height is "+window.innerHeight+"px.</p>";window.innerWidth<n||window.innerHeight<a;)yield lc(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 uc={name:"preload",parameters:{auto_preload:{type:hr.BOOL,pretty_name:"Auto-preload",default:!1},trials:{type:hr.TIMELINE,pretty_name:"Trials",default:[]},images:{type:hr.STRING,pretty_name:"Images",default:[],array:!0},audio:{type:hr.STRING,pretty_name:"Audio",default:[],array:!0},video:{type:hr.STRING,pretty_name:"Video",default:[],array:!0},message:{type:hr.HTML_STRING,pretty_name:"Message",default:null},show_progress_bar:{type:hr.BOOL,pretty_name:"Show progress bar",default:!0},continue_after_error:{type:hr.BOOL,pretty_name:"Continue after error",default:!1},error_message:{type:hr.HTML_STRING,pretty_name:"Error message",default:"The experiment failed to load."},show_detailed_errors:{type:hr.BOOL,pretty_name:"Show detailed errors",default:!1},max_load_time:{type:hr.INT,pretty_name:"Max load time",default:null},on_error:{type:hr.FUNCTION,pretty_name:"On error",default:null},on_success:{type:hr.FUNCTION,pretty_name:"On success",default:null}}};class dc{constructor(e){this.jsPsych=e}trial(e,n){var a=null,t=!1,i=[],o=[],s=[],r=[],c=this.jsPsych.getSafeModeStatus(),l=[],p=[],u=[];if(n.auto_preload){var d=this.jsPsych.getTimeline(),m=this.jsPsych.pluginAPI.getAutoPreloadList(d);l=l.concat(m.images),p=p.concat(m.audio),u=u.concat(m.video)}if(n.trials.length>0){var h=this.jsPsych.pluginAPI.getAutoPreloadList(n.trials);l=l.concat(h.images),p=p.concat(h.audio),u=u.concat(h.video)}l=l.concat(n.images),p=p.concat(n.audio),u=u.concat(n.video),l=this.jsPsych.utils.unique(l.flat()),p=this.jsPsych.utils.unique(p.flat()),u=this.jsPsych.utils.unique(u.flat()),c&&(u=[]);var f="";null!==n.message&&(f+=n.message),n.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 v=()=>{if(k++,n.show_progress_bar){var a=k/w*100,t=e.querySelector("#jspsych-loading-progress-bar");null!==t&&(t.style.width=a+"%")}},g=()=>{void 0!==t&&!1===t&&(this.jsPsych.pluginAPI.clearAllTimeouts(),this.jsPsych.pluginAPI.cancelPreloads(),a=!0,y())},b=()=>{this.jsPsych.pluginAPI.cancelPreloads(),void 0===a||!1!==a&&null!==a||(t=!0,_<w&&(a=!1),C("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>"),n.continue_after_error?y():x())},x=()=>{this.jsPsych.pluginAPI.clearAllTimeouts(),this.jsPsych.pluginAPI.cancelPreloads(),e.innerHTML=n.error_message,n.show_detailed_errors&&(e.innerHTML+="<p><strong>Error details:</strong></p>",r.forEach((n=>{e.innerHTML+=n})))},y=()=>{this.jsPsych.pluginAPI.clearAllTimeouts();var n={success:a,timeout:t,failed_images:i,failed_audio:o,failed_video:s};e.innerHTML="",this.jsPsych.finishTrial(n)};null!==n.max_load_time&&this.jsPsych.pluginAPI.setTimeout(b,n.max_load_time);var w=l.length+p.length+u.length,k=0,_=0;if(0==w)g();else{const e=e=>{this.jsPsych.pluginAPI.preloadVideo(u,e,O,j)},n=e=>{this.jsPsych.pluginAPI.preloadAudio(p,e,O,j)},a=e=>{this.jsPsych.pluginAPI.preloadImages(l,e,O,j)};u.length>0&&e((()=>{})),p.length>0&&n((()=>{})),l.length>0&&a((()=>{}))}function j(e){v(),null==a&&(a=!1);var t="unknown file";e.source&&(t=e.source),e.error&&e.error.path&&e.error.path.length>0&&("img"==e.error.path[0].localName?i.push(t):"audio"==e.error.path[0].localName?o.push(t):"video"==e.error.path[0].localName&&s.push(t));var c="<p><strong>Error loading file: "+t+"</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),C(t),k==w&&(n.continue_after_error?y():x())}function O(e){v(),function(e){null!==n.on_success&&n.on_success(e)}(e),++_==w?g():k==w&&(n.continue_after_error?y():x())}function C(e){null!==n.on_error&&n.on_error(e)}}simulate(e,n,a,t){"data-only"==n&&(t(),this.simulate_data_only(e,a)),"visual"==n&&this.simulate_visual(e,a,t)}create_simulation_data(e,n){return this.jsPsych.pluginAPI.mergeSimulationData({success:!0,timeout:!1,failed_images:[],failed_audio:[],failed_video:[]},n)}simulate_data_only(e,n){const a=this.create_simulation_data(e,n);this.jsPsych.finishTrial(a)}simulate_visual(e,n,a){const t=this.jsPsych.getDisplayElement();this.trial(t,e),a()}}function mc(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var t,i,o,s,r=[],c=!0,l=!1;try{if(o=(a=a.call(e)).next,0===n){if(Object(a)!==a)return;c=!1}else for(;!(c=(t=o.call(a)).done)&&(r.push(t.value),r.length!==n);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=a.return&&(s=a.return(),Object(s)!==s))return}finally{if(l)throw i}}return r}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return hc(e,n);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return hc(e,n)}(e,n)||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 hc(e,n){(null==n||n>e.length)&&(n=e.length);for(var a=0,t=new Array(n);a<n;a++)t[a]=e[a];return t}dc.info=uc,hr.BOOL,hr.HTML_STRING,hr.STRING,hr.INT;var fc=[],vc=fc.forEach,gc=fc.slice;var bc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,xc=function(e,n,a,t){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};a&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*a*1e3)),t&&(i.domain=t),document.cookie=function(e,n,a){var t=a||{};t.path=t.path||"/";var i=encodeURIComponent(n),o="".concat(e,"=").concat(i);if(t.maxAge>0){var s=t.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(s))}if(t.domain){if(!bc.test(t.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(t.domain)}if(t.path){if(!bc.test(t.path))throw new TypeError("option path is invalid");o+="; Path=".concat(t.path)}if(t.expires){if("function"!=typeof t.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires=".concat(t.expires.toUTCString())}if(t.httpOnly&&(o+="; HttpOnly"),t.secure&&(o+="; Secure"),t.sameSite)switch("string"==typeof t.sameSite?t.sameSite.toLowerCase():t.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(n),i)},yc=function(e){for(var n="".concat(e,"="),a=document.cookie.split(";"),t=0;t<a.length;t++){for(var i=a[t];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(n))return i.substring(n.length,i.length)}return null},wc={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&"undefined"!=typeof document){var a=yc(e.lookupCookie);a&&(n=a)}return n},cacheUserLanguage:function(e,n){n.lookupCookie&&"undefined"!=typeof document&&xc(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},kc={name:"querystring",lookup:function(e){var n;if("undefined"!=typeof window){var a=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(a=window.location.hash.substring(window.location.hash.indexOf("?")));for(var t=a.substring(1).split("&"),i=0;i<t.length;i++){var o=t[i].indexOf("=");if(o>0)t[i].substring(0,o)===e.lookupQuerystring&&(n=t[i].substring(o+1))}}return n}},_c=null,jc=function(){if(null!==_c)return _c;try{_c="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){_c=!1}return _c},Oc={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&jc()){var a=window.localStorage.getItem(e.lookupLocalStorage);a&&(n=a)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&jc()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},Cc=null,Sc=function(){if(null!==Cc)return Cc;try{Cc="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Cc=!1}return Cc},Tc={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&Sc()){var a=window.sessionStorage.getItem(e.lookupSessionStorage);a&&(n=a)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&Sc()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},Pc={name:"navigator",lookup:function(e){var n=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var a=0;a<navigator.languages.length;a++)n.push(navigator.languages[a]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},Ec={name:"htmlTag",lookup:function(e){var n,a=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return a&&"function"==typeof a.getAttribute&&(n=a.getAttribute("lang")),n}},Ic={name:"path",lookup:function(e){var n;if("undefined"!=typeof window){var a=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(a instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof a[e.lookupFromPathIndex])return;n=a[e.lookupFromPathIndex].replace("/","")}else n=a[0].replace("/","")}return n}},Lc={name:"subdomain",lookup:function(e){var n="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,a="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(a)return a[n]}};var Ac=function(){function e(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};jo(this,e),this.type="languageDetector",this.detectors={},this.init(n,a)}return So(e,[{key:"init",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=function(e){return vc.call(gc.call(arguments,1),(function(n){if(n)for(var a in n)void 0===e[a]&&(e[a]=n[a])})),e}(n,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],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=a,this.addDetector(wc),this.addDetector(kc),this.addDetector(Oc),this.addDetector(Tc),this.addDetector(Pc),this.addDetector(Ec),this.addDetector(Ic),this.addDetector(Lc)}},{key:"addDetector",value:function(e){return this.detectors[e.name]=e,this}},{key:"detect",value:function(e){var n=this;e||(e=this.options.order);var a=[];return e.forEach((function(e){if(n.detectors[e]){var t=n.detectors[e].lookup(n.options);t&&"string"==typeof t&&(t=[t]),t&&(a=a.concat(t))}})),a=a.map((function(e){return n.options.convertDetectedLanguage(e)})),this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}},{key:"cacheUserLanguage",value:function(e,n){var a=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach((function(n){a.detectors[n]&&a.detectors[n].cacheUserLanguage(e,a.options)})))}}]),e}();Ac.type="languageDetector";var Rc={progressBar:"Progress Complete",fullScreenTrial:{prompt:"Switching to full screen mode.",buttonText:"Go"},instructions:{intro:{header:"Welcome to ROAR Multichoice!",topText:"In this activity, you're going to help me complete some sentences.",bottomText:""},instructions:{header:"What word completes the sentence?",topText:"Choose the best option to fill in the blank.",bottomText:""},practice:{header:"Let's practice!",topText:"Remember, your job is to choose the right word that fills in the blank.",bottomText:""},postPractice:{header:"Great job!",topText:"Now you're ready to try on your own. Try your best to choose the word that completes the sentence.",bottomText:""},practiceCorrect:{header:"That's right!",topText:"",bottomText:""},break1:{header:"Keep up the good work!",topText:"",bottomText:""},break2:{header:"You are doing great!",topText:"",bottomText:""},break3:{header:"Let's keep going.",topText:"",bottomText:""},break4:{header:"You are an expert at this!",topText:"",bottomText:""},break5:{header:"You can do it!",topText:"",bottomText:""},ending:{header:"You're all done! Thank you for helping me find those words!",topText:"",bottomText:""}}};(new Ac).addDetector({name:"defaultToEnglish",lookup:e=>"en"}),Ds.use(Ac).init({debug:!1,load:"languageOnly",fallbackLng:"en",detection:{order:["defaultToEnglish","querystring"]},resources:{en:{translation:Rc}}}),function(e){const n=new pc(e);Object.defineProperties(n,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,n])=>[e,{get(){throw new ur(n)}}]))))}({show_progress_bar:!1,auto_update_progress_bar:!1,message_progress_bar:`${Ds.t("progressBar")}`});var Nc={default:{languageSpecific:{device:[],shared:["tryAgain.mp3","thatsRight.mp3","clickButton.jpg","intro.mp3","ins.mp3","surveyPractice.mp3","surveyPostPractice.mp3","great-job-click.mp3","break1.mp3","break2.mp3","break3.mp3","break4.mp3","break5.mp3","ending.mp3"]},shared:["nullAudio.mp3","select.mp3","goButton.png","coin.mp3","countdown0.mp3","countdown1.mp3","countdown2.mp3","countdown3.mp3","fail.mp3","fairyCoin.mp3","coin_bag.gif","ROARLion.gif"]}};const Dc="https://storage.googleapis.com/egma-math";!function(e,n,a){var t={images:{},video:{},audio:{}},i=tr(a),o=ir(),s=function(e,a){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.forEach((function(e){var c=sr(e),l=qs.parse(e).name,p=l.replace(/^([A-Z])|[\s-_](\w)/g,(function(e,n,a,t){return a?a.toUpperCase():n.toLowerCase()})),u=or(n,e,i,o,a,s,r);t[c][p]=u}))},r=function(e){var n,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Array.isArray(e)?s(e,"default"):(e.languageSpecific&&(Array.isArray(e.languageSpecific)?s(e.languageSpecific,"languageSpecific"):function(e,n){Object.entries(e).forEach((function(e){var a=mc(e,2),t=a[0],i=a[1];s(i,t,!0,n)}))}(e.languageSpecific,a)),e.device&&s(e.device,"device"),e.shared&&(n=e.shared,Array.isArray(n)?s(n,"shared"):Object.entries(n).forEach((function(e){var n=mc(e,2),a=n[0],t=n[1];s(t,"device"===a?"shared/device":"shared")}))))};e.preload&&Object.entries(e.preload).forEach((function(e){var n=mc(e,2)[1];r(n)})),e.default&&r(e.default,!0)}(Nc,Dc),function(e,n,a){var t={},i=tr(a),o=ir();function s(e,a,s){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=arguments.length>4&&void 0!==arguments[4]&&arguments[4];e.forEach((function(e){var l=sr(e),p=or(n,e,i,o,s,r,c);t[a]||(t[a]={type:dc,message:"The experiment is loading",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:[]}),t[a][l].push(p)}))}function r(e,n,a){Array.isArray(n)?s(n,e,"languageSpecific"):function(e,n,a){Object.entries(n).forEach((function(n){var t=mc(n,2),i=t[0];s(t[1],e,i,!0,a)}))}(e,n,a)}function c(e,n){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Array.isArray(n)?s(n,e,"default"):(n.languageSpecific&&r(e,n.languageSpecific,a),n.device&&s(n.device,e,"device"),n.shared&&function(e,n){Array.isArray(n)?s(n,e,"shared"):Object.entries(n).forEach((function(n){var a=mc(n,2),t=a[0];s(a[1],e,"device"===t?"shared/device":"shared")}))}(e,n.shared))}return e.preload&&Object.entries(e.preload).forEach((function(e){var n=mc(e,2);c(n[0],n[1])})),e.default&&c("default",e.default,!0),t}(Nc,Dc).default;const zc=(e,n)=>{let a;return a=["true","false"].includes(e?.toLocaleLowerCase())?function(e,n=!1){return null==e?n:"true"===e.trim().toLowerCase()}(e?.toLocaleLowerCase()):!(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:13,t=Number(e);if(null!=e){if(Number.isNaN(t)){var i={k:0,tk:0,pk:0,preschool:0,prekindergarten:0,transitionalkindergarten: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,postgraduate:13,university:13,graduate:13,master:13,doctorate:13,masters:13}[e.toLowerCase().replace(/\s/g,"").replace(/-/g,"")];if(void 0===i)return;return i<n?n:i>a?a:i}return t<n?n:t>a?a:t}}(n)>=6),a};async function Mc(){const e=document.createElement("div");e.innerHTML='<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">\n\n\x3c!-- <h5 style="text-align:left;">\n Stanford University Research Consent Form\n <span style="float:right;">\n For IRB Use Only\n </span>\n</h5>\n\n<h5 style="text-align:left;">\n Protocol Director: Jason D. Yeatman, Ph.D.\n <span style="float:right;">\n Approval Date: October 31, 2023\n </span>\n</h5>\n\n<h5 style="text-align:left;">\n Protocol Title: Plasticity and Reading\n <span style="float:right;">\n Expiration Date: October 31, 2024\n </span>\n</h5> --\x3e\n\n<style>\n body {\n margin: 20px; /* Adjust the margin size as needed */\n }\n</style>\n\n<body>\n<h3 style="text-align: center;"> STANFORD UNIVERSITY CONSENT FORM </h3>\n\n<h4 style="text-align: center;"> Stanford University Reading &amp; Dyslexia Research Program: Behavioral Testing </h4>\n\n<blockquote>\n<h4 id="principal-investigator-">Principal Investigator:</h4>\n<p>Jason D. Yeatman </p>\n<p>Associate Professor</p>\n<p>Graduate School of Education</p>\n<p>School of Medicine, Division of Developmental Behavioral Pediatrics</p>\n<h4 id="contact-">Contact:</h4>\n<p>readingresearch@stanford.edu</p>\n<p><a href="https://dyslexia.stanford.edu/">https://dyslexia.stanford.edu/</a> </p>\n</blockquote>\n<h4 id="purpose-of-the-study">PURPOSE OF THE STUDY</h4>\n<p>Data collected through games in the web-browser will help researchers understand relationships between academic skills, reading proficiency, cognition, perception, and/or attitudes towards reading and school in individuals with a broad range of reading skills.</p>\n<h4 id="study-procedures">STUDY PROCEDURES</h4>\n<p>In this study, you or your child will be asked to complete computer tasks via a computer screen. An eye-tracking software will request access to your webcam and will be used to measure eye movements. You will be asked to provide verbal responses in which case the web browser will request access to your computer microphone. You or your child may be asked to complete multiple activities in one session depending on the study. </p>\n<h4 id="privacy-or-data-collection">PRIVACY OR DATA COLLECTION</h4>\n<p>We will do our best to ensure your privacy. Data that is collected through this online experiment is stored separately from identifying information such as your name. For the sake of payment, sometimes we store an email address you provide, but this is stored separately from the responses that are recorded in the online experiment. Each participant is assigned a code and that is used rather than names. This is called “coded data” and we try to ensure that the identity of our research participants is kept confidential. Data collected as part of this study may be used for many years to help discover trends in the population and explore changes due to development and education. In addition, coded data may be shared online or with collaborators to allow for new and unforeseen discoveries. Researchers may choose to include coded data in publications to support findings, or they may choose to release coded data alongside findings for replicability.</p>\n<p>We will collect mouse and click data, scrolling behavior, scores earned, button presses and their timestamps, time spent on each page, audio recordings, or other data that may be derived from your behavior on our page. This data will be stored on servers. The eye-tracking software will use your webcam to track your eyes. This software will record and save video data for future analysis. Once analysis has been completed, the video data will be deleted. Incomplete data may be logged if you quit out of the experiment early. If you would like to void your data, you may request it through our contact email.</p>\n<h4 id="compensation">COMPENSATION</h4>\n<p>We value [your/your child’s] participation. A Tango gift card will be sent through email upon completion of this study. Specific reward amounts will be indicated on the task card and/or study invitation, which you can view before launching the task or scheduling the appointment. If you or your child is completing these activities as part of another study, the compensation rate will remain consistent with the rate of the study you or your child is enrolled in. </p>\n<p>Please note that the gift card system we use to pay participants is not affiliated with Stanford and we will need to input your name and email into this system to send you the electronic gift card payment. If you feel uncomfortable with this process, please let us know before signing the consent form. Depending on the study, we may be able to look into other forms of payment for you.</p>\n<h4 id="risks-stress-or-discomfort">RISKS, STRESS, OR DISCOMFORT</h4>\n<p>If there is any reason to believe you are/your child is not safe to participate in any of the tasks, please contact us at readingresearch@stanford.edu. Some people may experience some physical discomfort or boredom due to being asked to sit for long periods. For computer tasks, some people may also experience dry eyes or eye fatigue. For some tasks that are untimed, breaks can be taken as needed during the session.</p>\n<h4 id="contact-information">CONTACT INFORMATION</h4>\n<p>If you have any additional questions or concerns about our research, feel free to email us at readingresearch@stanford.edu. We will be more than happy to help!</p>\n<p>For general information regarding questions or concerns about [your/your child’s] rights as a research participant, please call 1-866-680-2906 to reach the Administrative Panel on Human Subjects in Medical Research, Stanford University.</p>\n<form id="consentForm">\n <p>\n <input type="checkbox" id="webcamConsent" name="consent">\n I confirm that I have a webcam, and I agree to have my webcam track my eyes. I understand that the webcam will record or save video data and that it will be deleted once analysis is complete.\n </p>\n <p>\n <input type="checkbox" id="voiceConsent" name="consent">\n I agree to have my voice recorded. This data will only be used for data scoring purposes, will be stored securely, and will not be shared with others outside the lab.\n </p>\n <p>\n <input type="checkbox" id="participationConsent" name="consent">\n I agree to participate in this research. Participation in this research is voluntary, and I can stop at any time without penalty. I feel that I understand what I am getting into, and I know I am free to leave the experiment at any time by simply closing the web browser.\n </p>\n <button id="confirmButton" disabled>Continue to test</button>\n</form>\n</body>\n\n<h5 class="card-title" style="display: none;"></h5>\n\n<script>\n document.getElementById(\'consentForm\').addEventListener(\'change\', function() {\n var checkboxes = document.querySelectorAll(\'input[type="checkbox"][name="consent"]\');\n var allChecked = Array.from(checkboxes).every(checkbox => checkbox.checked);\n document.getElementById(\'confirmButton\').disabled = !allChecked;\n });\n<\/script>\n\n',document.body.appendChild(e),await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await Fc(a.src)}}(e),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(e),await new Promise((n=>{const a=document.getElementById("confirmButton");a&&a.addEventListener("click",(()=>{document.querySelectorAll("script[data-dynamic]").forEach((e=>e.parentNode.removeChild(e))),e.remove(),n()}))}))}function Fc(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;var qc='<!DOCTYPE html>\n<html lang="en">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">\n <style>\n body {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100vh;\n margin: 0;\n background-color: #ffffff; /* White background */\n color: #000000; /* Black text */\n }\n\n .loading-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 20px;\n border-radius: 10px;\n background: rgba(0, 0, 0, 0.05); /* Slight gray tint to differentiate from the white background */\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */\n }\n\n .loading-spinner {\n border: 8px solid rgba(0, 0, 0, 0.1); /* Lighter border for the spinner */\n border-top: 8px solid #0d6efd; /* Blue color for active part of the spinner */\n border-radius: 50%;\n width: 80px;\n height: 80px;\n animation: spin 1s linear infinite;\n margin-bottom: 20px;\n }\n\n h2 {\n font-weight: 400;\n letter-spacing: 1px;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n </style>\n</head>\n<body>\n <div class="loading-container">\n <div class="loading-spinner"></div>\n <h2>Loading...</h2>\n </div>\n</body>\n</html>\n',Bc={};function Uc(){const e=document.getElementById("deviceList");e.innerHTML="",Object.keys(Bc).forEach((n=>{const a=document.createElement("option");a.value=n,a.text=n.charAt(0).toUpperCase()+n.slice(1),e.add(a)}))}function Hc(e){console.log("You selected a "+e.deviceName),screenHeight=e.screenHeight,screenWidth=e.screenWidth,webcamHeight=e.webcamHeight,screenSizeCalibrated=e.screenSizeCalibrated,webcamCentered=e.webcamCentered,HeightWebcamEntered=e.HeightWebcamEntered,heightInput_textbox.value=webcamHeight,heightInput_textbox.disabled=HeightWebcamEntered,Wc("Custom"!==e.deviceName)}function Vc(){var e=document.querySelectorAll(".card-title"),n=1;e.forEach((function(e){"none"!==e.parentElement.parentElement.style.display&&null!==e.parentElement.parentElement.offsetParent&&(e.textContent=e.textContent.replace(/\(\d+\)/,"("+n+")"),n++)}))}function Wc(e=!0){const n=document.querySelectorAll('[id*="-collapsableCards"]');console.log(n),n.forEach((n=>{n.style.display=e?"none":""})),Vc()}var $c=Object.freeze({__proto__:null,collapseCards:Wc,get deviceConfig(){return Bc},handleDevice:Hc,inputParticipantName:function(e){var n=document.getElementById("idInput");n.placeholder=e,n.disabled=!0},selectDevice:function(){const e=document.getElementById("deviceList"),n=e.options[e.selectedIndex].value;Hc(Bc[n]||Bc.custom)},updateCardNumbers:Vc,updateDeviceConfigFromJSON:async function(e){try{const n=await fetch(e),a=await n.json();console.log(a),Bc=a,Uc()}catch(e){console.error("Error fetching or parsing JSON:",e)}},updateDropdownOptions:Uc});function Kc(){const e=window.navigator,n=window.screen,a={userAgent:e.userAgent,platform:e.platform,language:e.language,deviceMemory:e.deviceMemory||"Not available",hardwareConcurrency:e.hardwareConcurrency,maxTouchPoints:e.maxTouchPoints,cookiesEnabled:e.cookieEnabled,webDriver:e.webdriver,onlineStatus:e.onLine,gpu:"Not available"},t={width:n.width,height:n.height,colorDepth:n.colorDepth,pixelDepth:n.pixelDepth,retinaDisplay:window.matchMedia("(-webkit-min-device-pixel-ratio: 2)").matches,landscapeOrientation:window.matchMedia("(orientation: landscape)").matches},i=document.createElement("canvas"),o=i.getContext("webgl")||i.getContext("experimental-webgl");if(o){const e=o.getExtension("WEBGL_debug_renderer_info");a.gpu=e?o.getParameter(e.UNMASKED_RENDERER_WEBGL):"Not available"}return{device:a,screen:t}}async function Yc(e){o.session.set("clickedTests",[]),o.session.set("testComplete",!1);const n=qc,a=document.createElement("div");a.innerHTML='\x3c!-- Scripts --\x3e\n<script data-dynamic src="https://cdn.jsdelivr.net/npm/remote-calibrator@latest"><\/script>\n<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">\n\n\x3c!-- CSS --\x3e\n<style>\n\nbody {\n margin: 0;\n}\n\n .column {\n float: left;\n padding: 10px;\n}\n\n.left, .right {\n width: 33%;\n}\n\n.middle {\n width: 33%;\n}\n\n.row:after {\n content: "";\n display: table;\n clear: both;\n}\n\n.container {\n width: 75%; /* Set the width for the container */\n margin: auto; /* Center the container if needed */\n}\n\n #audio-visualization {\n width: 100%; /* Both elements fill the container */\n /* display: block; Ensure they are not inline */\n}\n\n#audio-visualization {\n height: 100px; /* Set a fixed height for the canvas */\n}\n\n</style>\n\n\x3c!-- HTML --\x3e\n<body id="body">\n\n <div class="px-4 py-5 my-5 text-center" style="display: block;">\n <h1 class="display-5 fw-bold" id="title">Configure Device</h1>\n <h5> To get started, we will need to set up a few things. </h5>\n <h5> If you’re not sure what to do, ask an adult to help you with this part. </h5>\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/parent-help-icon.png" width="10%">\n <div class="col-lg-6 mx-auto" style="margin-top: -8vh;">\n <p class="lead mt-3 mb-5"></p>\n\n\n \x3c!-- Preconfigured Devices --\x3e\n <div id="findDevice-collapsableCards">\n <form>\n <b>First, check for your device in this preconfigured dropdown list:</b>\n <select id="deviceList" onchange="selectDevice()">\n </select>\n <br> If your device is <b></b>not in this list, please provide the following information: </br>\n </form>\n </div>\n </br>\n\n\n <div class="d-grid gap-2 justify-content-center">\n\n\n \x3c!-- ROW 1: Full Screen | Get Screen Size --\x3e\n <div class="row gap-2" id="screenSize-collapsableCards">\n <div class="col" >\n <div class="card" style="width:20rem; height:11rem" id="card-fullscreen">\n <div class="card-body">\n <h5 class="card-title">(1) Full Screen</h5>\n <p class="card-text">Do not exit out of \'Full Screen\' mode for the remainder of this study.</p>\n <button type="button" class="btn btn-primary" id="fullscreen" onclick="openFullscreen()">Make Fullscreen</button>\n </div>\n </div>\n </div>\n <div class="col">\n <div class="card" style="width:20rem;height:11rem" id="card-screen-size">\n <div class="card-body">\n <h5 class="card-title">(2) Screen Size</h5>\n <p class="card-text">We need this to calibrate your device\'s screen size.</p>\n <button type="button" class="btn btn-primary" id="measureScreen" onclick="getScreenSize()">Measure Screen Size</button>\n </div>\n </div>\n </div>\n </div>\n\n\n \x3c!-- ROW 2: Webcam Centered | Height of Webcam --\x3e\n <div class="row gap-2" id="webcam-collapsableCards">\n <div class="col">\n <div class="card" style="width: 20rem;" id="card-webcam-center">\n <div class="card-body">\n <h5 class="card-title">(3) Is your webcam centred?</h5>\n <h6 class="card-subtitle mb-2 text-muted">It is expected that for laptops the webcam is already centred.</h6>\n <p class="card-text">If you are using a separate webcam, please centre this in the middle (as seen in the image below).</p>\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/webcamCentered.jpg" alt="center webcam" width="100%" style="padding-bottom:10px;">\n <button type="button" class="btn btn-primary" id="measureDistanceFromScreeen" onclick="getwebcamCentered()">My Webcam is Centred</button>\n </div>\n </div>\n </div>\n <div class="col">\n <div class="card" style="width: 20rem;" id="card-height-camera">\n <div class="card-body">\n <h5 class="card-title">(4) Height of Webcam</h5>\n <p class="card-text">This is the distance between the centre of your webcam\'s lens and the top bezel of your screen (image provided for example)</p>\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/webcamPosition.PNG" alt="center webcam" width="100%" style="padding-bottom:10px;">\n <label for="heightInput">Height in cm:</label>\n <input type="number" id="heightInput" name="heightInput" required\n minlength="1" maxlength="8" size="10" value="2">\n </br></br>\n <button type="button" class="btn btn-primary" id="getHeightbutton" onclick="getHeightWebcam()">Done</button>\n </div>\n </div>\n </div>\n </div>\n\n\n \x3c!-- ROW 3: Camera Access --\x3e\n <div class="row gap-2">\n <div class="col">\n <div class="card" style="width: 42rem;height:11rem" id="card-camera">\n <div class="card-body">\n <h5 class="card-title">(5) Camera Access</h5>\n <p class="card-text">Please provide access to your camera to record your eye movements.</p>\n <button type="button" class="btn btn-primary" id="start-camera">Provide Access</button>\n </div>\n </div>\n </div>\n </div>\n\n\n \x3c!-- ROW 4: Check Recording --\x3e\n <div class="row gap-2" style="padding-top:1rem;">\n <div class="col">\n <div class="card" style="width:42rem" id="card-final-check">\n <div class="card-body">\n <h5 class="card-title">(6) Final Checks</h5>\n <p>Please ensure your video is well-lit and centered. Speak at a normal volume to check the audio level below.</p>\n\n <div class="column left">\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/badlighting.jpg" alt="center webcam" width="100%" style="padding-bottom:10px;">\n <b>Bad Lighting</b> &#10060 </br>\n (Make sure eyes and face are clearly visible)\n </div>\n <div class="column middle">\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/glassesReflection.jpg" alt="center webcam" width="100%" style="padding-bottom:10px;">\n <b>Glasses On</b> &#10060 </br>\n (Remove Glasses)\n </div>\n <div class="column middle">\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/goodPosition.jpg" alt="center webcam" width="100%" style="padding-bottom:10px;">\n <b>Ideal View</b>&#10004 &#65039 </br>\n (Face close to camera and centered with clear view of eyes)\n </div>\n <div class="container">\n <video autoplay="true" id="videoElement" style="width:100%; background-color: darkgray;"></video>\n <canvas id="audio-visualization" width="640" height="100"></canvas>\n </div>\n\n <button type="button" class="btn btn-primary" id="Final-Check" onclick="finalCheckComplete()" disabled >I\'m Looking and Sounding Great</button>\n </div>\n </div>\n </div> \n </div>\n \n\n \x3c!-- ROW 5: User Details --\x3e\n <div class="row gap-2" style="padding-top:1rem;">\n <div class="col">\n <div class="card" style="width:42rem" id="card-camera">\n <div class="card-body">\n <h5 class="card-title">(8) Ready to Start?</h5>\n <label for="idInput">Participant ID:</label>\n <input type="text" id="idInput" name="idInput" required\n minlength="1" maxlength="100" size="10">\n </br></br>\n <button type="button" class="btn btn-primary" id="confirmButton" disabled>Continue</button>\n </div>\n </div>\n </div> \n </div>\n </div>\n </div>\n </div>\n\n \x3c!-- Audio Playing --\x3e \n <audio autoplay id="voiceover"> </audio>\n\n </body>\n\n<script data-dynamic>\n\nvar voiceover = document.getElementById(\'voiceover\'); // TO DO: Doesn\'t have enough time to load? Only plays if the consent screen shows up first\nvoiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/deviceConfig.mp3`;\n\nRemoteCalibrator.init();\n\nvar desktop = document.documentElement;\nvar finalCheckButton = document.getElementById("Final-Check")\nvar confirmButton = document.getElementById("confirmButton");\nvar cardFullscreen = document.getElementById("card-fullscreen");\nvar cardScreenSize = document.getElementById("card-screen-size");\nvar cardDistanceScreen = document.getElementById("card-distance-screen");\nvar cardcamera = document.getElementById("card-camera");\nvar cardwebcamCenter = document.getElementById("card-webcam-center");\nvar cardheightcamera = document.getElementById("card-height-camera")\nvar cardfinalcheck = document.getElementById("card-final-check");\nvar heightInput_textbox = document.getElementById("heightInput")\nvar idInput_textbox = document.getElementById("idInput")\nvar video = document.querySelector("#videoElement");\n\nvar audioDetected = false;\nvar fullScreen = false;\nvar screenSizeCalibrated = false;\nvar cameraStarted = false;\nvar HeightWebcamEntered = false;\nvar finalcheck = false;\nvar webcamCentered = false;\nvar prolificID;\nvar screenWidth=0;\nvar screenHeight=0;\nvar screenWidthPX=window.screen.width;\nvar screenHeightPX=window.screen.height;\nvar webcamHeight=0;\nvar distance = 0;\nvar webcamInfo;\n\n\nfunction makeid(length) {\n var result = \'\';\n var characters = \'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\';\n var charactersLength = characters.length;\n for ( var i = 0; i < length; i++ ) {\n result += characters.charAt(Math.floor(Math.random() * \n charactersLength));\n }\n return result;\n}\n\n\nfunction openFullscreen() {\n if (desktop.requestFullscreen) {\n desktop.requestFullscreen();\n } else if (desktop.webkitRequestFullscreen) { /* Safari */\n desktop.webkitRequestFullscreen();\n } else if (desktop.msRequestFullscreen) { /* IE11 */\n desktop.msRequestFullscreen();\n }\n\n screenWidthPX = window.screen.width;\n screenHeightPX = window.screen.height;\n\n fullScreen = true\n cardFullscreen.style.backgroundColor = \'#bcf5bc\'\n\n checkAllComplete()\n}\n\nfunction getScreenSize(){\n RemoteCalibrator.screenSize({}, data => {\n console.log(`ScreenWidth: ${data.value.screenWidthCm}cm.`)\n console.log(`ScreenHeight: ${data.value.screenHeightCm}cm.`)\n\n screenWidth = data.value.screenWidthCm\n screenHeight = data.value.screenHeightCm\n\n if (screenWidth!=null && screenHeight!=null) {\n screenSizeCalibrated = true\n cardScreenSize.style.backgroundColor = \'#bcf5bc\'\n console.log(screenSizeCalibrated)\n }\n checkAllComplete()\n }) \n}\n\n\nfunction getwebcamCentered(){\n webcamCentered = true\n cardwebcamCenter.style.backgroundColor = \'#bcf5bc\'\n checkAllComplete()\n}\n\nfunction getHeightWebcam(){\n if (heightInput_textbox.value>0){\n HeightWebcamEntered = true\n webcamHeight = heightInput_textbox.value\n heightInput_textbox.disabled = true\n cardheightcamera.style.backgroundColor = \'#bcf5bc\'\n }\n checkAllComplete()\n}\n\nfunction finalCheckComplete(){\n let userConfirmed = true\n if (!audioDetected) {\n userConfirmed = confirm("We couldn\'t hear you, are you sure your microphone is working? Click OK to continue anyway, or Cancel to check your settings.");\n }\n if (userConfirmed) {\n finalcheck = true\n cardfinalcheck.style.backgroundColor = \'#bcf5bc\'\n checkAllComplete()\n }\n}\n\n\ndocument.querySelector("#start-camera").addEventListener(\'click\', async () => {\n const audioContext = new AudioContext();\n const canvas = document.getElementById(\'audio-visualization\');\n const ctx = canvas.getContext(\'2d\');\n\n // Now requesting both audio and video\n const cameraStream = await navigator.mediaDevices.getUserMedia({\n video: { width: { ideal: 1920 }, height: { ideal: 1080 }, frameRate: { ideal: 60, max: 60 } },\n audio: true // Enabled audio\n });\n\n if (cameraStream.getVideoTracks().length > 0) {\n const { width, height } = cameraStream.getVideoTracks()[0].getSettings();\n const videoTrack = cameraStream.getVideoTracks()[0];\n webcamInfo = videoTrack.getCapabilities\n ? videoTrack.getCapabilities()\n : {};\n\n webcamInfo[\'image_width\'] = width\n webcamInfo[\'image_height\'] = height\n\n console.log(`${width}x${height}`); // Log video resolution\n\n const video = document.querySelector(\'video\');\n video.srcObject = cameraStream;\n\n if (height > 0) {\n cardcamera.style.backgroundColor = \'#bcf5bc\';\n cameraStarted = true;\n video.style.backgroundColor = \'#bcf5bc\';\n finalCheckButton.disabled = false;\n checkAllComplete();\n } else {\n video.style.backgroundColor = \'#FA8072\';\n alert("Your webcam does not meet our resolution standards");\n }\n }\n\n // Set up audio analyser\n const micSource = audioContext.createMediaStreamSource(cameraStream);\n const analyser = audioContext.createAnalyser();\n analyser.fftSize = 2048;\n micSource.connect(analyser);\n const bufferLength = analyser.frequencyBinCount;\n const dataArray = new Uint8Array(bufferLength);\n\n function draw() {\n requestAnimationFrame(draw);\n analyser.getByteTimeDomainData(dataArray);\n\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n\n ctx.lineWidth = 2;\n ctx.strokeStyle = \'rgb(0, 0, 0)\';\n ctx.beginPath();\n\n const sliceWidth = canvas.width * 1.0 / bufferLength;\n let x = 0;\n let sum = 0;\n\n for (let i = 0; i < bufferLength; i++) {\n const v = dataArray[i] / 128.0;\n const y = v * canvas.height / 2;\n\n if (i === 0) {\n ctx.moveTo(x, y);\n } else {\n ctx.lineTo(x, y);\n }\n\n sum += (dataArray[i] - 128) * (dataArray[i] - 128); // Summing for RMS calculation\n x += sliceWidth;\n }\n\n ctx.lineTo(canvas.width, canvas.height / 2);\n ctx.stroke();\n let rms = Math.sqrt(sum / bufferLength);\n if (rms > 0.01) {\n audioDetected = true; // Update the audioDetected flag if audio is sufficiently loud\n }\n\n }\n\n draw(); // Start the drawing function\n\n});\n\n\nfunction checkAllComplete() {\n const hasCollapsedCards = Array.from(document.querySelectorAll(\'.card-title\')).some(card => \n card.closest(\'.card\').style.display === \'none\' || card.closest(\'.card\').offsetParent === null\n );\n\n const allConditionsMet = fullScreen && screenSizeCalibrated && cameraStarted && webcamCentered && HeightWebcamEntered && finalcheck;\n const minimalConditionsMet = cameraStarted && finalcheck;\n\n if ((hasCollapsedCards && minimalConditionsMet) || (!hasCollapsedCards && allConditionsMet)) {\n confirmButton.classList.remove(\'btn-secondary\')\n confirmButton.classList.add(\'btn-primary\')\n confirmButton.disabled = false;\n }\n}\n\nvar jsonUrl = "https://eyetrackingdata.blob.core.windows.net/public/config/devices.json";\nupdateDeviceConfigFromJSON(jsonUrl);\n\n\n// function continueToTest(){\n// video.remove()\n// prolificID = idInput_textbox.value.trim() ? idInput_textbox.value : makeid(10);\n\n// localStorage.prolificID = prolificID\n// localStorage.screenHeight = screenHeight\n// localStorage.screenWidth = screenWidth\n// localStorage.webcamHeight = webcamHeight\n// localStorage.distance = distance\n// window.location.href = "criticalSpacingMenu_six.html";\n\n// }\n\n<\/script>',document.body.appendChild(a),await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await Gc(a.src)}}(a),await async function(e){Object.keys(e).forEach((n=>{window[n]=e[n]}))}($c),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(a),function(e){"simple"===e.firekit.task.variantParams.viewType&&collapseCards(!0);""!==e.firekit.user.assessmentPid&&inputParticipantName(e.firekit.user.assessmentPid)}(e),await new Promise((t=>{const i=document.getElementById("confirmButton");i&&i.addEventListener("click",(async()=>{try{var i=o.session.get("config").firekit.user.assessmentUid+"_"+(idInput_textbox.value.trim()?idInput_textbox.value:makeid(10));i!==e.firekit.user.assessmentPid&&e.firekit.updateUser({assessmentPid:i}),o.session.set("id",i),o.session.set("deviceConfig",{screenWidth:parseFloat(screenWidth),screenHeight:parseFloat(screenHeight),screenWidthPX:parseFloat(screenWidthPX),screenHeightPX:parseFloat(screenHeightPX),webcamHeight:parseFloat(webcamHeight),deviceInfo:Kc(),webcamInfo:webcamInfo}),a.innerHTML=n;const s=await async function(e){var n="openfolder.txt",a="text/plain";try{const t=await fetch(`https://us-central1-webapp-af756.cloudfunctions.net/getUploadUrlFunction?fileName=${n}&mimeType=${a}&parentDir=${e}`);if(!t.ok)throw new Error("Failed to fetch upload URL");return await t.text()}catch(e){throw window.console.log("Error fetching upload URL:",e),e}}(o.session.get("id"));window.console.log("Folder Created:",s),function(e){!function(e){Object.keys(e).forEach((e=>{const n=Object.getOwnPropertyDescriptor(window,e);n&&n.configurable?delete window[e]:console.log(`Cannot remove ${e} from window; it may be non-configurable.`)}))}(e);document.querySelectorAll("script[data-dynamic]").forEach((e=>e.parentNode.removeChild(e)))}($c),a.remove(),t()}catch(e){window.console.log("Error:",e)}}))}))}function Gc(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;var Jc=[];async function Xc(){try{const e=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:60,max:60}},audio:!0});if(camera_stream=e,camera_stream&&camera_stream.active)return Jc=[],videoRecorder=new MediaRecorder(camera_stream),videoRecorder.ondataavailable=e=>{e.data.size>0&&Jc.push(e.data)},Promise.resolve(camera_stream);throw new Error("Camera stream is not active")}catch(e){return console.error("Error accessing media devices:",e),Promise.reject(e)}}async function Zc(e,n,a){try{const t=await fetch(`https://us-central1-webapp-af756.cloudfunctions.net/getUploadUrlFunction?fileName=${e}&mimeType=${n}&parentDir=${a}`);if(!t.ok)throw new Error("Failed to fetch upload URL");return(await t.json()).result}catch(e){throw console.error("Error fetching upload URL:",e),e}}async function Qc(e,n){try{const a=await fetch(n,{method:"PUT",headers:{"Content-Type":e.type,"Content-Length":e.size},body:e});if(!a.ok)throw new Error("Upload failed: "+a.statusText);console.log("Upload complete:",await a.text())}catch(e){console.error("Error:",e)}}var el=4;function nl(e){0===--el?(document.getElementById("instruction").style.display="none","function"==typeof e&&(e(),el=4)):(document.getElementById("instruction").innerHTML="<h1>"+el+"</h1>",setTimeout((function(){nl(e)}),1e3))}function al(){desktop.requestFullscreen?desktop.requestFullscreen():desktop.webkitRequestFullscreen?desktop.webkitRequestFullscreen():desktop.msRequestFullscreen&&desktop.msRequestFullscreen()}var tl=Object.freeze({__proto__:null,_pageCompleted:!1,get countdown(){return el},generateGridCoordinates:function(e){let n,a,t,i;if(console.log(e.screenWidth,e.screenHeight,e.screenWidthPX,e.screenHeightPX),e.screenWidth>0&&e.screenHeight>0){const t=3.25;n=2.75*(e.screenWidthPX/e.screenWidth),a=t*(e.screenHeightPX/e.screenHeight)}else{n=.8*e.screenWidthPX/9,a=.8*e.screenHeightPX/4}t=9*n,i=4*a;const o=(e.screenWidthPX-t)/2,s=(e.screenHeightPX-i)/2,r=[];for(let e=0;e<4;e++)for(let t=0;t<9;t++){const i=o+t*n+n/2,c=s+e*a+a/2;r.push({x:i,y:c,width:n,height:a})}for(let e=r.length-1;e>0;e--){const n=Math.floor(Math.random()*(e+1));[r[e],r[n]]=[r[n],r[e]]}return r},generateStimulusOrder:function(e){const n=e.stimulus.slice(),a=Math.ceil(36/n.length),t=[];for(let e=0;e<a;e++){const e=n.sort((()=>Math.random()-.5));t.push(...e)}for(let e=1;e<t.length;e++)if(t[e]===t[e-1]){const n=t[e];t[e]=t[e+1],t[e+1]=n,String.fromCharCode(t[e].charCodeAt(0)-1)}return t.slice(0,36)},getUploadUrl:Zc,giveAccess:Xc,gridHeightCM:13,gridWidthCM:24.75,numCols:9,numRows:4,openFullscreen:al,saveRecordings:async function(e,n,a="video/webm"){await new Promise((e=>{videoRecorder.onstop=e,videoRecorder.stop()}));const t=new Blob(Jc,{type:"video/webm"});if(t.size>0){console.log("Video recorded successfully. Size:",t.size,"bytes");try{Qc(t,await Zc(e,a,n))}catch(e){console.error("Error getting video upload URL:",e)}}else console.error("No video data recorded.")},startRecording:async function(){Jc=[],videoRecorder.start()},startTest:async function(e){await Xc(),al(),nl(e)},stopRecording:async function(){videoRecorder.stop()},updateCountdown:nl,uploadFile:Qc,get videoChunks(){return Jc}});async function il(e){const n=document.createElement("div");n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100%",await async function(e){Object.keys(e).forEach((n=>{window[n]=e[n]}))}(tl),n.innerHTML='<!DOCTYPE html>\n<html lang="en">\n<head>\n <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>Image and Audio Recording</title>\n\n \x3c!-- <script data-dynamic src="./voiceCalibration.js"><\/script> --\x3e\n</head>\n\n<style>\n \n body {\n margin: 0;\n min-height: 100vh; /* Ensure body takes the full viewport height */\n display: flex; /* Enable Flexbox */\n justify-content: center; /* Center content horizontally */\n align-items: center; /* Center content vertically */\n font-family: sans-serif;\n }\n\n stim {\n position: absolute;\n height: auto;\n cursor: pointer;\n }\n \n #instruction {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n \n #confirmContainer {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n</style>\n\n\n<body>\n\n \x3c!-- Center Instructions Panel --\x3e\n <div id="calibrationContentArea"> \n <div class="row gap-2" id="instruction">\n <div class="col">\n <div class="card" style="width: 45rem; height:39rem">\n <div class="card-body" style="text-align: center;">\n <h3 class="card-title" id="calibrationTitle"> <b> Calibration Phase </b> </h3>\n <h4 class="card-text"> Now, we need to calibrate the system. </h4>\n <h4 class="card-text" id="calibrationDescription"></h4>\n <div style="text-align: center; margin-bottom: 3vh;">\n <img id="calibrationImage" src="https://eyetrackingdata.blob.core.windows.net/public/Images/squareAddition_white.png" width="350px">\n </div>\n <div class="btn-group" role="group" aria-label="Basic example">\n \x3c!-- <button type="button" class="btn btn-primary" id="giveAccessButton" onclick="giveAccess()">Give Access to Mic/Camera</button> --\x3e\n \x3c!-- <br> --\x3e\n <button type="button" class="btn btn-primary" id="startTestButton" onclick="startTest(displayNextStim)">Start</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n \x3c!-- <center> <img src="./img/letter-calibration-explanation.gif" width="350vh" style="margin-bottom: 3vh;"> </center> --\x3e\n\n \x3c!-- Audio Playing --\x3e \n <audio autoplay id="voiceover"> </audio>\n\n \x3c!-- Confirm Button --\x3e\n <div class="row gap-2" id="confirmContainer" style="display: none;">\n <div class="card-body" style="text-align: center;">\n <h3> Calibration complete! </h3>\n <button type="button" class="btn btn-primary" id="confirmButton"> Continue </button>\n </div>\n </div>\n\n<script data-dynamic>\n\nvar deviceConfig = store.session.get(\'deviceConfig\')\n// var deviceConfig = {screenWidth: 29, screenHeight: 16.2, screenWidthPX: 960, screenHeightPX: 540, webcamHeight: 0.5}\nvar testConfig = store.session.get(\'testConfig\')\n// var testConfig = {dir: "https://eyetrackingdata.blob.core.windows.net/public/assets/Letter",\n// stimulus : ["C.svg", "D.svg", "H.svg", "K.svg", "N.svg", "O.svg", "R.svg", "S.svg", "V.svg", "Z.svg"],\n// sizecm: 2}\n\nif (testConfig[\'testname\'] === \'Letter\') {\n var subtestText = [\'Letter\', \'letter\']\n} else {\n var subtestText = [\'Number\', \'number\']\n}\n\nvar voiceover = document.getElementById(\'voiceover\');\nvoiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/${subtestText[1]}Calibration.mp3`;\n\ndocument.body.addEventListener(\'click\', function() {\n voiceover.pause();\n voiceover.currentTime = 0; // Stop the voiceover whenever a click is detected \n});\n \nvar desktop = document.documentElement;\nvar camera_stream;\nvar audioRecorder;\nvar videoRecorder;\nvar videoChunks = [];\n\ncounter = 0; \n\n// Getting the div element by its ID\n// const calibrationDiv = document.getElementById(\'calibrationContentArea\');\n\n// Text you want to edit with ${} variables \n// const calibrationDetails = `\n// <div class="row gap-2" id="instruction">\n// <div class="col">\n// <div class="card" style="width: 45rem; height:39rem">\n// <div class="card-body" style="text-align: center;">\n// <h3 class="card-title"> <b> ${subtestText[0]} Calibration Phase </b> </h3>\n// <h4 class="card-text"> Now, we need to recalibrate the navigation system. </h4>\n// <h4 class="card-text"> You will see ${subtestText[1]}s pop up on the screen. Say the ${subtestText[1]} out loud <b>first</b> and then click on the ${subtestText[1]} to go to the next one. </h4>\n// <center> <img src="./img/${subtestText[1]}-calibration-explanation.gif" width="350vh" style="margin-bottom: 3vh;"> </center>\n// <div class="btn-group" role="group" aria-label="Basic example">\n// <button type="button" class="btn btn-primary" id="giveAccessButton" onclick="giveAccess()">Give Access to Mic/Camera</button>\n// <br>\n// <button type="button" class="btn btn-primary" id="startTestButton" onclick="startTest(displayNextStim)" disabled>Start</button>\n// </div>\n// </div>\n// </div>\n// </div>\n// </div>\n// `;\n\n// // Inserting the HTML code into the div\n// calibrationDiv.innerHTML = calibrationDetails;\n\nvar gridCoordinates = generateGridCoordinates(deviceConfig)\nvar shuffledImages = generateStimulusOrder(testConfig)\n\nvar _gridCoordinates = [] \n// gridCoordinates;\nvar _shuffledImages = []\n// shuffledImages.map(filename => filename.split(\'.\')[0]).reverse();\nvar _parentDir = store.session.get("id")\nvar _videoURL = []\nvar _deviceConfig = deviceConfig\nvar _testConfig = testConfig\n\n\nasync function displayNextStim() {\n const position = gridCoordinates.pop();\n if (position) {\n await stopRecording();\n await startRecording();\n const cell = document.createElement(\'div\');\n cell.id = \'cell\'; \n cell.style.width = `${position.width}px`;\n cell.style.height = `${position.height}px`;\n cell.style.left = `${position.x}px`; // Adjust for half of the cell width\n cell.style.top = `${position.y}px`; // Adjust for half of the cell height\n cell.style.position = \'absolute\'; // Ensure the position is set to absolute\n cell.style.transform = \'translate(-50%, -50%)\'; // Center the content within the element\n cell.style.display = \'flex\'; // Set display to flex to use flexbox properties\n cell.style.justifyContent = \'center\'; // Center horizontally\n cell.style.alignItems = \'center\'; // Center vertically\n cell.setAttribute(\'draggable\', \'false\'); // Prevent the cell itself from being draggable\n\n const stim = document.createElement(\'img\');\n const randomStimulus = shuffledImages.pop();\n stim.id = \'stim\'; \n stim.src = `${testConfig[\'dir\']}/${randomStimulus}`;\n stim.style.width = \'50%\'; // Make the image fill the cell\n stim.setAttribute(\'draggable\', \'false\'); // Prevent the image from being draggable\n\n cell.appendChild(stim);\n\n // stim.style.width = `${0.50*position.width}px`;\n // stim.style.left = `${position.x}px`;\n // stim.style.top = `${position.y}px`;\n // stim.style.position = \'absolute\'; // Ensure the position is set to absolute\n // stim.style.transform = \'translate(-50%, -50%)\'; // Center the content within the element\n var clickRate = 0\n cell.addEventListener(\'click\', () => {\n clickRate++\n if (clickRate==1){\n handleStimClick(randomStimulus, cell, stim); \n }\n });\n document.body.appendChild(cell);\n } else {\n _pageCompleted = true\n }\n}\n\nasync function handleStimClick(randomStimulus,cell,stim) {\n console.log(\'Image clicked!\');\n const timestamp = new Date().getTime();\n\n document.getElementById(\'cell\').disabled = true\n\n setTimeout(async () => {\n await stopRecording(); // Stop recording when stimulus is clicked\n const stimPosition = stim.getBoundingClientRect();\n stimPosition.x = stimPosition.x+ (stimPosition.width)/2\n stimPosition.y = stimPosition.y+ (stimPosition.height)/2\n var filename = randomStimulus.slice(0, -4) + \'_\' + stimPosition.x + \'_\' + stimPosition.y + \'_\' + timestamp\n filename = filename.replace(/\\./g, \'deci\') + \'.webm\'\n saveRecordings(filename= filename ,parentDir=store.session.get("id")); // Save the recorded audio and video\n _videoURL.push(filename)\n\n const gridCoordinatesObject = {\n x: parseFloat(cell.style.left),\n y: parseFloat(cell.style.top),\n width: parseFloat(cell.style.width),\n height: parseFloat(cell.style.height),\n stim_x:stimPosition.x,\n stim_y:stimPosition.y,\n stim_width:stimPosition.width,\n stim_height:stimPosition.height,\n };\n\n _gridCoordinates.push(gridCoordinatesObject)\n _shuffledImages.push(randomStimulus.slice(0, -4))\n document.getElementById(\'cell\').remove();\n // Delay displayNextStim by an additional 100ms\n setTimeout(() => {\n displayNextStim(); // Display the next image\n }, 200);\n\n },750); // Delay everything here by 200ms\n}\n\n\n\n<\/script>\n\n</body>\n</html>\n',document.body.appendChild(n),await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await ol(a.src)}}(n),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(n),document.getElementById("calibrationTitle").innerHTML=`<b>${subtestText[0]} Calibration Phase</b>`,document.getElementById("calibrationDescription").innerHTML=`You will see ${subtestText[1]}s pop up on the screen. Say the ${subtestText[1]} out loud <b>first</b> and then click on the ${subtestText[1]} to go to the next one.`,document.getElementById("calibrationImage").src=`https://eyetrackingdata.blob.core.windows.net/public/Images/${subtestText[1]}-calibration-explanation.gif`,await new Promise((a=>{!function t(){if(_pageCompleted){const t={assessment_type:testConfig.testname,assessment_stage:"Calibration",stimulusPosition:_gridCoordinates,stimulus:_shuffledImages,recordedVideo:_videoURL,parentDir:_parentDir,correct:1,deviceConfig:_deviceConfig,testConfig:_testConfig};e.firekit.writeTrial(t),n.remove(),function(e){!function(e){Object.keys(e).forEach((e=>{const n=Object.getOwnPropertyDescriptor(window,e);n&&n.configurable?delete window[e]:console.log(`Cannot remove ${e} from window; it may be non-configurable.`)}))}(e);document.querySelectorAll("script[data-dynamic]").forEach((e=>e.parentNode.removeChild(e)))}(tl),a()}else setTimeout(t,2e3)}()}))}function ol(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;async function sl(e,n){const a=document.createElement("div");a.innerHTML='<!DOCTYPE html>\n<html lang="en">\n<head>\n <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n</head>\n\n<style>\n \n body {\n margin: 0;\n min-height: 100vh; /* Ensure body takes the full viewport height */\n display: flex; /* Enable Flexbox */\n justify-content: center; /* Center content horizontally */\n align-items: center; /* Center content vertically */\n font-family: sans-serif;\n overflow: hidden;\n }\n\n .character {\n position: absolute;\n top: 65%;\n left: 70%;\n margin-right: -50%;\n transform: translate(-50%, -50%);\n width: 45%;\n }\n\n .speechBubble {\n border-style: solid;\n border-width: 5px;\n border-color: rgb(255, 232, 128);\n border-radius: 10px;\n text-align: center;\n padding: 5vh;\n background-color: rgb(253 246 234);\n }\n\n stim {\n position: absolute;\n height: auto;\n cursor: pointer;\n }\n\n #instruction {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n \n #confirmContainer {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n \n </style>\n\n\n<body>\n\n \x3c!-- Center Instructions Panel --\x3e\n <div id="storyContentArea">\n <img id="bg" style="object-fit: contain; position: relative;">\n <img id="char" class="character">\n <div style="position: absolute; top: 40%; right: 50%;">\n <h4 class="speechBubble" id="text"> </h4>\n </div>\n </div>\n\n \x3c!-- Audio Playing --\x3e \n <audio id="voiceover"> </audio>\n \n </body>\n\n<script data-dynamic>\n\n var counter = 0;\n\n var testConfig = store.session.get(\'testConfig\');\n\n document.body.addEventListener(\'click\', function() {\n startNextView(); // Call startNextView function whenever a click is detected \n });\n\n document.getElementById(\'voiceover\').addEventListener(\'ended\', function() {\n voiceover.currentTime = 0; // Added this so the story will automatically progress once the audio ends, not only dependent on participant clicks\n startNextView();\n })\n\n if (testConfig[\'testname\'] === \'Letter\') {\n var calibrationText = "Ah! I think my navigation system broke <br> on the way here. Could you help me fix it? </br>"\n var practiceText = "Awesome! Thank you for calibrating my <br> navigation system. We can practice reading out the </br> letter directions to Rantopia now."\n var testText = "Perfect! Let\'s enter them for real. <br> Can you read me the letter directions </br> as fast as you can?"\n var testLower = "letter";\n } else {\n var calibrationText = "Darn, the radar is completely broken. <br> Let\'s fix it together! </br>"\n var practiceText = "You are an expert engineer! <br> We can practice reading out </br> the number coordinates to Rantopia now."\n var testText = "Amazing! Let\'s enter them for real. <br> Can you read me the number coordinates </br> as fast as you can?"\n var testLower = "number";\n }\n\n function startNextView() {\n counter++;\n var char = document.getElementById(\'char\');\n var bg = document.getElementById(\'bg\');\n var text = document.getElementById(\'text\');\n var voiceover = document.getElementById(\'voiceover\');\n\n if (stage === "Introduction"){\n console.log(stage, counter);\n switch (counter) {\n case 1:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-default.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/space-ship-control.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/intro.mp3`;\n text.innerHTML = `Hi! My name is Stella. <br> It\'s always great to meet a fellow astronaut. </br>`;\n break;\n case 2:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-panicked.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/space-ship-control.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/intro2.mp3`;\n text.innerHTML = `I was doing some errands for my mom, <br> but then I got lost. </br> She\'s probably so worried about me!`;\n break;\n case 3:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-unsure.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/space-ship-control.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/intro3.mp3`;\n text.innerHTML = `Could you help me calibrate my <br> navigation system so I can get to Rantopia? </br>`;\n break;\n default:\n // Reset or end\n counter = 0; \n pageCompleted()\n }\n } else if (stage === "Calibration") {\n console.log(stage, counter);\n switch (counter) {\n case 1:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-confused.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/space-ship-control.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/${testLower}StoryCalibration.mp3`;\n text.innerHTML = calibrationText;\n break;\n default:\n // Reset or end\n counter = 0; \n pageCompleted()\n }\n } else if (stage === "Practice"){\n console.log(stage, counter);\n switch (counter) {\n case 1:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-smile.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/space-ship-control.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/${testLower}StoryPractice.mp3`;\n text.innerHTML = practiceText;\n break;\n default:\n // Reset or end\n counter = 0; \n pageCompleted()\n }\n } else if (stage === "Test"){\n console.log(stage, counter);\n switch (counter) {\n case 1:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-smile.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/purple-planet.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/${testLower}StoryTest.mp3`;\n text.innerHTML = testText;\n break;\n default:\n // Reset or end\n counter = 0; \n pageCompleted()\n }\n } else if (stage === "Ending"){\n console.log(stage, counter);\n switch (counter) {\n case 1:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-happy.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/orange-planet.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/end.mp3`;\n text.innerHTML = `We made it to Rantopia! <br> I can finish grabbing all </br> the things I need for my mom.`;\n break;\n case 2:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-bye.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/orange-planet.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/end2.mp3`;\n text.innerHTML = `I couldn’t have done this <br> without your help. </br> Come visit me again sometime!`;\n break;\n default:\n // Reset or end\n counter = 0; \n pageCompleted()\n }\n }\n\n // playing the voiceover \n if (voiceover.src !== ""){\n voiceover.play(); \n }\n\n }\n\n function pageCompleted(){\n const event = new Event(\'pageComplete\');\n document.dispatchEvent(event);\n }\n \n <\/script>',document.body.appendChild(a),window.stage=e,await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await rl(a.src)}}(a),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(a),startNextView(),await new Promise((e=>{document.addEventListener("pageComplete",(()=>{a.remove(),function(){e=document.body,n=e.cloneNode(!0),e.parentNode.replaceChild(n,e);var e,n;document.querySelectorAll("script[data-dynamic]").forEach((e=>{(e.textContent||e.innerText).includes("voiceover.addEventListener('ended'")||e.parentNode.removeChild(e)}))}(),e()}),{once:!0})}))}function rl(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;async function cl(){const e=document.createElement("div");e.innerHTML="\x3c!-- Scripts --\x3e\n<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3\" crossorigin=\"anonymous\">\n\n\x3c!-- CSS --\x3e\n<style>\n\nbody {\n margin: 0;\n}\n\n .column {\n float: left;\n padding: 10px;\n}\n\n.left, .right {\n width: 33%;\n}\n\n.middle {\n width: 33%;\n}\n\n.row:after {\n content: \"\";\n display: table;\n clear: both;\n}\n\n</style>\n\n\x3c!-- HTML --\x3e\n<body id=\"body\">\n <div class=\"px-4 py-5 my-5 text-center\" style=\"display: block;\">\n <h1 class=\"display-5 fw-bold\" id=\"title\"> Activity Selection Menu </h1>\n <div class=\"col-lg-6 mx-auto\">\n <p class=\"lead mt-3 mb-5\"></p>\n <h4 class=\"card-text\"> Select an activity. Click on one of the options below to continue with the activity: </h4>\n <div class=\"row gap-2\" id=\"menuButtons\">\n </div>\n </div>\n </div>\n\n \x3c!-- Audio Playing --\x3e \n <audio autoplay src=\"https://eyetrackingdata.blob.core.windows.net/public/Audios/activityMenu.mp3\"> </audio>\n\n</body>\n\n<script data-dynamic>\n\ndocument.body.addEventListener('click', function() {\n voiceover.pause();\n voiceover.currentTime = 0;; // Stop the voiceover whenever a click is detected \n});\n\n var jsonUrl = 'https://eyetrackingdata.blob.core.windows.net/public/config/tests.json';\n\n fetch(jsonUrl)\n .then(response => response.json())\n .then(data => {\n // Extract test names from the JSON data\n const testNames = Object.keys(data);\n // Create buttons dynamically based on test names\n const menuButtonsContainer = document.getElementById('menuButtons');\n const clickedTests = store.session.get('clickedTests') || [];\n testNames.forEach(testName => {\n console.log(testName)\n console.log(data[testName])\n\n const button = document.createElement('button');\n button.type = 'button';\n button.id = `button_${testName}`; \n button.className = 'btn btn-primary';\n button.textContent = testName;\n\n if (clickedTests.includes(testName)) {\n button.classList.add('btn-secondary'); // Grayish color\n button.disabled = true\n }\n\n button.addEventListener('click', () => {\n console.log(`CLICKED ${testName}`)\n // Set the selected testType\n store.session.set('testConfig', data[testName]);\n console.log(`Stored testType: ${testName}`);\n \n // Highlight the clicked button and remove highlighting from others\n const buttons = menuButtonsContainer.getElementsByTagName('button');\n for (const otherButton of buttons) {\n otherButton.classList.remove('btn-success');\n }\n\n button.classList.add('btn-success');\n // Store the clicked test name in the array\n store.session.set('clickedTests', clickedTests);\n\n });\n menuButtonsContainer.appendChild(button);\n });\n\n if ((clickedTests.length+1) >= document.querySelectorAll('button').length){\n console.log((clickedTests.length+1),document.querySelectorAll('button').length)\n store.session.set('testComplete',true)\n }\n })\n .catch(error => console.error('Error fetching JSON:', error));\n\n<\/script>\n ",document.body.appendChild(e),await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await ll(a.src)}}(e),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(e),await new Promise((n=>{document.body.addEventListener("click",(function(a){a.target.id.startsWith("button_")&&(console.log("Button clicked:",a.target.id),document.querySelectorAll("script[data-dynamic]").forEach((e=>e.parentNode.removeChild(e))),e.remove(),n())}))}))}function ll(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;var pl=4,ul=9;function dl(e,n,a){const t=document.getElementById("grid-container"),i=pl*ul;for(let o=0;o<i;o++){if("Practice"===type&&(o<ul||o>=2*ul))continue;const i=document.createElement("div"),{x:s,y:r,width:c,height:l}=e[o];i.style.width=`${c}px`,i.style.height=`${l}px`,i.style.left=`${s}px`,i.style.top=`${r}px`,i.style.position="absolute",i.style.transform="translate(-50%, -50%)",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center";const p=n[o],u=document.createElement("img");u.src=`${a.dir}/${p}`,u.style.width="50%",u.style.height="auto",i.appendChild(u),t.appendChild(i);const d=u.getBoundingClientRect();d.x=d.x+d.width/2,d.y=d.y+d.height/2;const m={x:parseFloat(i.style.left),y:parseFloat(i.style.top),width:parseFloat(i.style.width),height:parseFloat(i.style.height),stim_x:d.x,stim_y:d.y,stim_width:d.width,stim_height:d.height};_gridCoordinates.push(m),_shuffledImages.push(p.slice(0,-4))}}async function ml(){try{const e=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:60,max:60}},audio:!0});if(camera_stream=e,camera_stream&&camera_stream.active)return videoChunks=[],videoRecorder=new MediaRecorder(camera_stream),videoRecorder.ondataavailable=e=>{e.data.size>0&&videoChunks.push(e.data)},Promise.resolve(camera_stream);throw new Error("Camera stream is not active")}catch(e){return console.error("Error accessing media devices:",e),Promise.reject(e)}}async function hl(){audioChunks=[],videoChunks=[],videoRecorder.start()}async function fl(e,n,a){try{const t=await fetch(`https://us-central1-webapp-af756.cloudfunctions.net/getUploadUrlFunction?fileName=${e}&mimeType=${n}&parentDir=${a}`);if(!t.ok)throw new Error("Failed to fetch upload URL");return(await t.json()).result}catch(e){throw console.error("Error fetching upload URL:",e),e}}async function vl(e,n){try{const a=await fetch(n,{method:"PUT",headers:{"Content-Type":e.type,"Content-Length":e.size},body:e});if(!a.ok)throw new Error("Upload failed: "+a.statusText);console.log("Upload complete:",await a.text())}catch(e){console.error("Error:",e)}}var gl=4;function bl(e){0==--gl?(document.getElementById("instruction").style.display="none",document.getElementById("grid-container").style.visibility="visible",gl=4):(document.getElementById("instruction").innerHTML="<h1>"+gl+"</h1>",setTimeout((function(){bl()}),1e3))}function xl(){desktop.requestFullscreen?desktop.requestFullscreen():desktop.webkitRequestFullscreen?desktop.webkitRequestFullscreen():desktop.msRequestFullscreen&&desktop.msRequestFullscreen()}var yl=Object.freeze({__proto__:null,get countdown(){return gl},generateGridCoordinates:function(e){let n,a,t,i;if(console.log(e.screenWidth,e.screenHeight,e.screenWidthPX,e.screenHeightPX),e.screenWidth>0&&e.screenHeight>0){const t=13/pl;n=24.75/ul*(e.screenWidthPX/e.screenWidth),a=t*(e.screenHeightPX/e.screenHeight)}else{const t=.8*e.screenWidthPX,i=.8*e.screenHeightPX;n=t/ul,a=i/pl}t=n*ul,i=a*pl;const o=(e.screenWidthPX-t)/2,s=(e.screenHeightPX-i)/2,r=[];for(let e=0;e<pl;e++)for(let t=0;t<ul;t++){const i=o+t*n+n/2,c=s+e*a+a/2;r.push({x:i,y:c,width:n,height:a})}return r},generateStimulusOrder:function(e){const n=pl*ul,a=e.stimulus.slice(),t=Math.ceil(n/a.length),i=[];for(let e=0;e<t;e++){const e=a.sort((()=>Math.random()-.5));i.push(...e)}for(let e=1;e<i.length;e++)if(i[e]===i[e-1]){const n=i[e];i[e]=i[e+1],i[e+1]=n}return i.slice(0,n)},getUploadUrl:fl,giveAccess:ml,gridHeightCM:13,gridWidthCM:24.75,numCols:ul,numRows:pl,openFullscreen:xl,populateGrid:dl,saveRecordings:async function(e,n,a="video/webm"){await new Promise((e=>{videoRecorder.onstop=e,videoRecorder.stop()}));const t=new Blob(videoChunks,{type:"video/webm"});if(t.size>0){console.log("Video recorded successfully. Size:",t.size,"bytes");try{const i=await fl(e,a,n);await vl(t,i)}catch(e){console.error("Error getting video upload URL:",e)}}else console.error("No video data recorded.")},startRecording:hl,startTest:async function(){await ml(),document.getElementById("finishButton").disabled=!1,xl(),hl(),dl(gridCoordinates,shuffledImages,testConfig),bl()},stopRecording:async function(){videoRecorder.stop()},updateCountdown:bl,uploadFile:vl});async function wl(e,n){const a=document.createElement("div");a.style.position="fixed",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",await async function(e){Object.keys(e).forEach((n=>{window[n]=e[n]}))}(yl),console.log("countdown",countdown),a.innerHTML='<!DOCTYPE html>\n<html lang="en">\n<head>\n <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>Image and Audio Recording</title>\n\n \x3c!-- <script data-dynamic src="./RAN.js"><\/script> --\x3e\n</head>\n\n<style>\n \n body {\n margin: 0;\n min-height: 100vh; /* Ensure body takes the full viewport height */\n display: flex; /* Enable Flexbox */\n justify-content: center; /* Center content horizontally */\n align-items: center; /* Center content vertically */\n font-family: sans-serif;\n }\n\n stim {\n position: absolute;\n height: auto;\n cursor: pointer;\n }\n\n #instruction {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n \n #confirmContainer {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n</style>\n\n\n<body>\n\n <div id="grid-container" style="position: absolute; width: 100%; height: 100%; visibility: hidden;"></div>\n\n \x3c!-- Center Instructions Panel --\x3e\n <div id="instructionsContentArea">\n <div class="row gap-2" id="instruction">\n <div class="col">\n <div class="card" style="width:45rem; height:39rem">\n <div class="card-body" id="cardthing" style="text-align: center;">\n <h3 class="card-title" id="instructionTitle"></h3>\n <h4 class="card-text" id="instructionSubtitle"></h4>\n <h4 class="card-text" id="instructionDescription"></h4>\n <div style="text-align: center; margin-bottom: 3vh;">\n <img id="explanationGif" src="https://eyetrackingdata.blob.core.windows.net/public/Images/squareAddition_white.png" width="350px">\n </div>\n \x3c!-- <div class="btn-group" role="group" aria-label="Basic example" style="margin-bottom: 2vh;"> --\x3e\n \x3c!-- <button type="button" class="btn btn-primary" id="giveAccessButton" onclick="giveAccess()">Give Access to Mic/Camera</button> --\x3e\n \x3c!-- <br> --\x3e\n <button type="button" class="btn btn-primary" id="startTestButton" onclick="startTest()">Start</button>\n </div>\n </div>\n </div>\n </div>\n </div> \n \n </div>\n \n \x3c!-- Audio Playing --\x3e \n <audio autoplay id="voiceover"> </audio>\n \n \x3c!-- Confirm Button --\x3e\n <div class="row gap-2" id="confirmContainer" style="display: none;">\n <div class="card-body" style="text-align: center;">\n <h3> <span id="capName"></span> Test Complete </h3>\n <button type="button" class="btn btn-primary" id="confirmButton">Back to Menu</button>\n </div>\n </div>\n\n \x3c!-- Finish Button --\x3e\n <div id="finishButtonContainer" style="position: fixed; bottom: 10px; right: 10px; z-index: 1;">\n <button type="button" class="btn btn-primary" id="finishButton" disabled>Finish</button>\n </div>\n\n<script data-dynamic>\n\nvar deviceConfig = store.session.get(\'deviceConfig\')\n// var deviceConfig = {screenWidth: 29, screenHeight: 16.2, screenWidthPX: 960, screenHeightPX: 540, webcamHeight: 0.5}\nvar testConfig = store.session.get(\'testConfig\')\n// var testConfig = {dir: "https://eyetrackingdata.blob.core.windows.net/public/assets/Letter",\n// stimulus : ["C.svg", "D.svg", "H.svg", "K.svg", "N.svg", "O.svg", "R.svg", "S.svg", "V.svg", "Z.svg"],\n// sizecm: 2}\n\nif (testConfig[\'testname\'] === \'Letter\') {\n var subtestText = [\'Letter\', \'letter\']\n} else {\n var subtestText = [\'Number\', \'number\']\n}\n\nvar voiceover = document.getElementById(\'voiceover\');\nvoiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/${subtestText[1]}Calibration.mp3`;\n\ndocument.body.addEventListener(\'click\', function() {\n voiceover.pause();\n voiceover.currentTime = 0;; // Stop the voiceover whenever a click is detected \n});\n\nvar desktop = document.documentElement;\nvar camera_stream;\nvar videoRecorder;\nvar audioChunks = [];\nvar videoChunks = [];\n\nvar clickedTests = store.session.get(\'clickedTests\') || [];\nif (type!==\'Practice\') {\nclickedTests.push(testConfig[\'testname\'])\n}\n\nstore.session.set(\'clickedTests\',clickedTests)\n\nvar gridCoordinates = generateGridCoordinates(deviceConfig)\nvar shuffledImages = generateStimulusOrder(testConfig)\n \nvar _gridCoordinates = []\n// gridCoordinates\nvar _shuffledImages = []\n// shuffledImages.map(filename => filename.split(\'.\')[0]);\nvar _parentDir = store.session.get("id")\nvar _videoURL = \'\'\nvar _deviceConfig = deviceConfig\nvar _testConfig = testConfig\n\n// async function finishTest() {\n// console.log(\'Test Finished\');\n// // Remove the clicked image\n// await stopRecording(); // Stop recording when stimulus is clicked\n// const timestamp = new Date().getTime();\n// document.getElementById("finishButton").disabled=true\n \n// var filename = \'RAN\' + \'_\' + testConfig[\'testname\'] + \'_\' + timestamp + \'.webm\'\n// _videoURL.push(filename)\n\n// document.getElementById("confirmContainer").style.display = "block"\n// document.getElementById("grid-container").style.display = "none"\n// document.getElementById("finishButtonContainer").style.display = "none"\n\n\n// if (type!==\'Practice\') {\n// try{\n// await saveRecordings(filename= filename ,parentDir=store.session.get("id")); // Save the recorded audio and video\n// } catch (error) {\n// console.error(\'Error in saveRecordings:\', error);\n// }\n// }\n\n// }\n\n\n<\/script>\n\n</body>\n</html>\n';const t=qc;document.body.appendChild(a),window.type=e,await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await kl(a.src)}}(a),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(a),function(e){document.getElementById("instructionTitle").innerHTML=`<b>${subtestText[0]} ${e} Phase</b>`,document.getElementById("explanationGif").src=`https://eyetrackingdata.blob.core.windows.net/public/Images/${subtestText[1]}-${e.toLowerCase()}-reading-order.gif`;var n=document.getElementById("voiceover");if("Practice"===e){document.getElementById("instructionSubtitle").innerHTML="Let's do some practice!",document.getElementById("instructionDescription").innerHTML=`You’re going to see a row of ${subtestText[1]}s. <span id="distance-span"> </span> </h4>\n Read them out loud as fast as you can without making mistakes. <span id="distance-span"> </span> </h4>\n Remember to read like you normally do by going from <b> left to right. </b> <span id="distance-span"> </span> </h4>\n Click the "Finish" button (bottom right) when you are done. <span id="distance-span"> </span> </h4>`,n.src=`https://eyetrackingdata.blob.core.windows.net/public/Audios/${subtestText[1]}${e}.mp3`}else{document.getElementById("instructionSubtitle").innerHTML="Let’s start for real now.",document.getElementById("instructionDescription").innerHTML=`Read the ${subtestText[1]}s as fast as you can without making mistakes. Remember to read in the right direction. <span id="distance-span"> </span> </h4>\n Click the "Finish" button (bottom right) when you are done.<span id="distance-span"> </span> </h4>`,n.src=`https://eyetrackingdata.blob.core.windows.net/public/Audios/${subtestText[1]}${e}.mp3`}}(e),await new Promise((e=>{document.body.addEventListener("click",(async function(i){if("finishButton"===i.target.id){console.log("Button clicked:",i.target.id),a.innerHTML=t,(s=a).style.position="",s.style.top="",s.style.left="",s.style.width="",s.style.height="",await async function(){console.log("Test Finished");const e=(new Date).getTime();await stopRecording();var n="RAN_"+testConfig.testname+"_"+e+".webm";_videoURL=n,console.log(o.session.get("id"));try{await saveRecordings(n,o.session.get("id"))}catch(e){console.error("Error in saveRecordings:",e)}}();const r={assessment_type:testConfig.testname,assessment_stage:"Test",stimulusPosition:_gridCoordinates,stimulus:_shuffledImages,recordedVideo:_videoURL,parentDir:_parentDir,correct:1,deviceConfig:_deviceConfig,testConfig:_testConfig};n.firekit.writeTrial(r),a.remove(),function(e){!function(e){Object.keys(e).forEach((e=>{const n=Object.getOwnPropertyDescriptor(window,e);n&&n.configurable?delete window[e]:console.log(`Cannot remove ${e} from window; it may be non-configurable.`)}))}(e);document.querySelectorAll("script[data-dynamic]").forEach((e=>e.parentNode.removeChild(e)))}(yl),e()}var s}))}))}function kl(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;class _l{constructor(e,n,a,t){this.gameParams=n,this.userParams=a,this.firekit=e,this.displayElement=t,this.jsPsych=null}async init(){}async run(){this.gameParams.consent&&await Mc(),await this.firekit.startRun();const e=await(async(e,n,a,t)=>{const i=yo(yo({...n,...a},wo),ko),{userMetadata:o={},audioFeedback:s,grade:r,language:c=Ds.language,skipInstructions:l,practiceCorpus:p,stimulusCorpus:u,sequentialPractice:d,sequentialStimulus:m,buttonLayout:h,numberOfTrials:f,storyCorpus:v,taskName:g,stimulusBlocks:b,numOfPracticeTrials:x,storyOption:y,keyHelpers:w}=i;"en"!==c&&Ds.changeLanguage(c);const k={userMetadata:{...o,grade:r},audioFeedback:s||"neutral",skipInstructions:l??!0,startTime:new Date,firekit:e,displayElement:t||null,practiceCorpus:p??"math-item-bank-practice-pz",stimulusCorpus:u??"math-item-bank-pz",sequentialPractice:d??!0,sequentialStimulus:m??!0,buttonLayout:h||"default",numberOfTrials:f??10,task:g??"egma-math",stimulusBlocks:b??3,numOfPracticeTrials:x??2,storyOption:y,story:zc(y,r),keyHelpers:w??!0};console.log("this is grade:",r),console.log("this is storyOption:",y);const _=Object.fromEntries(Object.entries(n).map((([e,n])=>[e,k[e]??n])));return await k.firekit.updateTaskParams(_),null!==k.pid&&await k.firekit.updateUser({assessmentPid:k.pid,...o}),k})(this.firekit,this.gameParams,this.userParams,this.displayElement);o.session.set("config",e),await Yc(e),e.story&&await sl("Introduction");let n=!1;do{await cl(),e.story&&await sl("Calibration"),await il(e),e.story&&await sl("Practice"),await wl("Practice",e),e.story&&await sl("Test"),await wl("Test",e),n="true"===sessionStorage.getItem("testComplete")}while(!n);e.story&&await sl("Ending")}}export{_l as default};
11
- //# sourceMappingURL=index.01b9d2b8.js.map
10
+ !function(n){var a,t,i,o=Us,s=e.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function l(e){if(!e||"string"!=typeof e)return!1;var n=r.exec(e),a=n&&o[n[1].toLowerCase()];return a&&a.charset?a.charset:!(!n||!c.test(n[1]))&&"UTF-8"}n.charset=l,n.charsets={lookup:l},n.contentType=function(e){if(!e||"string"!=typeof e)return!1;var a=-1===e.indexOf("/")?n.lookup(e):e;if(!a)return!1;if(-1===a.indexOf("charset")){var t=n.charset(a);t&&(a+="; charset="+t.toLowerCase())}return a},n.extension=function(e){if(!e||"string"!=typeof e)return!1;var a=r.exec(e),t=a&&n.extensions[a[1].toLowerCase()];if(!t||!t.length)return!1;return t[0]},n.extensions=Object.create(null),n.lookup=function(e){if(!e||"string"!=typeof e)return!1;var a=s("x."+e).toLowerCase().substr(1);if(!a)return!1;return n.types[a]||!1},n.types=Object.create(null),a=n.extensions,t=n.types,i=["nginx","apache",void 0,"iana"],Object.keys(o).forEach((function(e){var n=o[e],s=n.extensions;if(s&&s.length){a[e]=s;for(var r=0;r<s.length;r++){var c=s[r];if(t[c]){var l=i.indexOf(o[t[c]].source),p=i.indexOf(n.source);if("application/octet-stream"!==t[c]&&(l>p||l===p&&"application/"===t[c].substr(0,12)))continue}t[c]=e}}}))}(Bs);var Hs=a(Bs),Vs="undefined"!=typeof window?window:{screen:{},navigator:{}},Ws=(Vs.matchMedia||function(){return{matches:!1}}).bind(Vs),$s={get passive(){return!0}},Ks=function(){};Vs.addEventListener&&Vs.addEventListener("p",Ks,$s),Vs.removeEventListener&&Vs.removeEventListener("p",Ks,!1);var Ys="ontouchstart"in Vs,Gs=Ys||"TouchEvent"in Vs&&Ws("(any-pointer: coarse)").matches,Js=(Vs.navigator.maxTouchPoints||0)>0||Gs,Xs=Vs.navigator.userAgent||"",Zs=Ws("(pointer: coarse)").matches&&/iPad|Macintosh/.test(Xs)&&Math.min(Vs.screen.width||0,Vs.screen.height||0)>=768,Qs=(Ws("(pointer: coarse)").matches||!Ws("(pointer: fine)").matches&&Ys)&&!/Windows.*Firefox/.test(Xs),er=Ws("(any-pointer: fine)").matches||Ws("(any-hover: hover)").matches||Zs||!Ys,nr=!Js||!er&&Qs?Js?"touchOnly":"mouseOnly":"hybrid",ar="mouseOnly"===nr?"mouse":"touchOnly"===nr||Qs?"touch":"mouse";function tr(e){return e||(new URLSearchParams(window.location.search).get("lng")||"en")}function ir(){return"touchOnly"===nr||"hybrid"===nr&&"touch"===ar?"mobile":"desktop"}function or(e,n,a,t,i,o,s){return s&&o&&"device"===i||o&&"device"===i?"".concat(e,"/").concat(a,"/").concat(t,"/").concat(n):s&&o&&"shared"===i||o&&"shared"===i?"".concat(e,"/").concat(a,"/shared/").concat(n):"device"===i?"".concat(e,"/").concat(t,"/").concat(n):"shared/device"===i?"".concat(e,"/shared/").concat(t,"/").concat(n):"languageSpecific"===i?"".concat(e,"/").concat(a,"/").concat(n):"default"===i?"".concat(e,"/").concat(n):"".concat(e,"/shared/").concat(n)}function sr(e){var n=Hs.lookup(e);if(!n)throw new Error("Unrecognized file extension in path: ".concat(e));if(n.startsWith("image/"))return"images";if(n.startsWith("audio/"))return"audio";if(n.startsWith("video/"))return"video";throw new Error("Unsupported MIME type for file: ".concat(e,". Only image, audio, and video files are supported."))}function rr(e,n,a,t){return new(a||(a=Promise))((function(i,o){function s(e){try{c(t.next(e))}catch(e){o(e)}}function r(e){try{c(t.throw(e))}catch(e){o(e)}}function c(e){var n;e.done?i(e.value):(n=e.value,n instanceof a?n:new a((function(e){e(n)}))).then(s,r)}c((t=t.apply(e,n||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var cr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pr=lr(((e,{include:n,exclude:a}={})=>{const t=e=>{const t=n=>"string"==typeof n?e===n:n.test(e);return n?n.some(t):!a||!a.some(t)};for(const[n,a]of(e=>{const n=new Set;do{for(const a of Reflect.ownKeys(e))n.add([e,a])}while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return n})(e.constructor.prototype)){if("constructor"===a||!t(a))continue;const i=Reflect.getOwnPropertyDescriptor(n,a);i&&"function"==typeof i.value&&(e[a]=e[a].bind(e))}return e}));class ur 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 dr(e){return[...new Set(e)]}function mr(e){if(!e)return e;let n;if(Array.isArray(e)){n=[];for(const a of e)n.push(mr(a));return n}if("object"==typeof e&&null!==e){n={};for(const a in e)e.hasOwnProperty(a)&&(n[a]=mr(e[a]));return n}return e}window.jsPsych={get init(){throw new ur("`jsPsych.init()` was replaced by `initJsPsych()` in jsPsych v7.")},get data(){throw new ur},get randomization(){throw new ur},get turk(){throw new ur},get pluginAPI(){throw new ur},get ALL_KEYS(){throw new ur('jsPsych.ALL_KEYS was replaced by the "ALL_KEYS" string in jsPsych v7.')},get NO_KEYS(){throw new ur('jsPsych.NO_KEYS was replaced by the "NO_KEYS" string in jsPsych v7.')}};var hr,fr=Object.freeze({__proto__:null,deepCopy:mr,deepMerge:function e(n,a){let t={};for(const i in n)n.hasOwnProperty(i)&&("object"==typeof n[i]&&a.hasOwnProperty(i)?t[i]=e(n[i],a[i]):t[i]=n[i]);for(const n in a)a.hasOwnProperty(n)&&(t.hasOwnProperty(n)&&"object"==typeof a[n]?t[n]=e(t[n],a[n]):t[n]=a[n]);return t},unique:dr});class vr{constructor(e=[]){this.values=e}sum(){let e=0;for(const n of this.values)e+=n;return e}mean(){return this.sum()/this.count()}median(){if(0===this.values.length)return;const e=this.values.slice(0).sort((function(e,n){return e-n})),n=Math.floor(e.length/2);return e.length%2==0?(e[n]+e[n-1])/2:e[n]}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 n=0;for(const a of this.values)n+=Math.pow(a-e,2);return n/(this.values.length-1)}sd(){const e=this.variance();return Math.sqrt(e)}frequencies(){const e={};for(const n of this.values)void 0===e[n]?e[n]=1:e[n]++;return e}all(e){for(const n of this.values)if(!e(n))return!1;return!0}subset(e){const n=[];for(const a of this.values)e(a)&&n.push(a);return new vr(n)}}class gr{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 gr([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 gr:(e>this.trials.length&&(e=this.trials.length),new gr(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 gr:(e>this.trials.length&&(e=this.trials.length),new gr(this.trials.slice(this.trials.length-e,this.trials.length)))}values(){return this.trials}count(){return this.trials.length}readOnly(){return new gr(mr(this.trials))}addToAll(e){for(const n of this.trials)Object.assign(n,e);return this}addToLast(e){return 0!=this.trials.length&&Object.assign(this.trials[this.trials.length-1],e),this}filter(e){let n;n=Array.isArray(e)?mr(e):mr([e]);const a=[];for(const e of this.trials){let t=!1;for(const a of n){let n=!0;for(const t of Object.keys(a))void 0!==e[t]&&e[t]===a[t]||(n=!1);if(n){t=!0;break}}t&&a.push(e)}return new gr(a)}filterCustom(e){return new gr(this.trials.filter(e))}filterColumns(e){return new gr(this.trials.map((n=>Object.fromEntries(e.filter((e=>e in n)).map((e=>[e,n[e]]))))))}select(e){const n=[];for(const a of this.trials)void 0!==a[e]&&n.push(a[e]);return new vr(n)}ignore(e){Array.isArray(e)||(e=[e]);const n=mr(this.trials);for(const a of n)for(const n of e)delete a[n];return new gr(n)}uniqueNames(){const e=[];for(const n of this.trials)for(const a of Object.keys(n))e.includes(a)||e.push(a);return e}csv(){return function(e){const n="object"!=typeof e?JSON.parse(e):e;let a="",t="";const i=[];for(const e of n)for(const n in e){let e=n+"";e='"'+e.replace(/"/g,'""')+'",',i.includes(n)||(i.push(n),a+=e)}a=a.slice(0,-1),t+=a+"\r\n";for(const e of n){a="";for(const n of i){let t=void 0===e[n]?"":e[n];"object"==typeof t&&(t=JSON.stringify(t)),a+='"'+(t+"").replace(/"/g,'""')+'",'}a=a.slice(0,-1),t+=a+"\r\n"}return t}(this.trials)}json(e=!1){return e?JSON.stringify(this.trials,null,"\t"):JSON.stringify(this.trials)}localSave(e,n){let a;if("json"===(e=e.toLowerCase()))a=this.json();else{if("csv"!==e)throw new Error('Invalid format specified for localSave. Must be "json" or "csv".');a=this.csv()}!function(e,n){const a=new Blob([e],{type:"text/plain"});let t="";t=void 0!==window.webkitURL?window.webkitURL.createObjectURL(a):window.URL.createObjectURL(a);const i=document.createElement("a");i.id="jspsych-download-as-text-link",i.style.display="none",i.download=n,i.href=t,i.click()}(a,n)}}class br{constructor(e){this.jsPsych=e,this.dataProperties={},this.reset()}reset(){this.allData=new gr,this.interactionData=new gr}get(){return this.allData}getInteractionData(){return this.interactionData}write(e){const n=this.jsPsych.getProgress(),a=this.jsPsych.getCurrentTrial(),t={trial_type:a.type.info.name,trial_index:n.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),a.data),t),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((n=>n.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 gr;{const n=e.substr(0,e.lastIndexOf("-"));return this.getDataByTimelineNode(n)}}displayData(e="json"){"json"!=(e=e.toLowerCase())&&"csv"!=e&&(console.log("Invalid format declared for displayData function. Using json as default."),e="json");const n="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=n}urlVariables(){return void 0===this.query_string&&(this.query_string=function(){const e=window.location.search.substr(1).split("&"),n={};for(let a=0;a<e.length;++a){const t=e[a].split("=",2);1==t.length?n[t[0]]="":n[t[0]]=decodeURIComponent(t[1].replace(/\+/g," "))}return n}()),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 gr(e)}_fullreset(){this.reset(),this.dataProperties={}}}class xr{constructor(){this.hardwareConnected=!1,document.addEventListener("jspsych-activate",(e=>{this.hardwareConnected=!0}))}hardware(e){const n=new CustomEvent("jspsych",{detail:e});document.dispatchEvent(n)}}class yr{constructor(e,n=!1,a=0){this.getRootElement=e,this.areResponsesCaseSensitive=n,this.minimumValidRt=a,this.listeners=new Set,this.heldKeys=new Set,this.areRootListenersRegistered=!1,pr(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 n of Array.from(this.listeners))n(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,n,a){return!(!n&&this.heldKeys.has(a))&&("ALL_KEYS"===e||"NO_KEYS"!==e&&e.includes(a))}getKeyboardResponse({callback_function:e,valid_responses:n="ALL_KEYS",rt_method:a="performance",persist:t,audio_context:i,audio_context_start_time:o,allow_held_key:s=!1,minimum_valid_rt:r=this.minimumValidRt}){"performance"!==a&&"audio"!==a&&(console.log('Invalid RT method specified in getKeyboardResponse. Defaulting to "performance" method.'),a="performance");const c="performance"===a?performance.now():1e3*o;this.registerRootListeners(),this.areResponsesCaseSensitive||"string"==typeof n||(n=n.map((e=>e.toLowerCase())));const l=o=>{const p=Math.round(("performance"==a?performance.now():1e3*i.currentTime)-c);if(p<r)return;const u=this.toLowerCaseIfInsensitive(o.key);this.isResponseValid(n,s,u)&&(o.preventDefault(),t||this.cancelKeyboardResponse(l),e({key:u,rt:p}))};return this.listeners.add(l),l}cancelKeyboardResponse(e){this.listeners.delete(e)}cancelAllKeyboardResponses(){this.listeners.clear()}compareKeys(e,n){if(!("string"!=typeof e&&null!==e||"string"!=typeof n&&null!==n))return"string"==typeof e&&"string"==typeof n?this.areResponsesCaseSensitive?e===n:e.toLowerCase()===n.toLowerCase():null===e&&null===n;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"}(hr||(hr={}));const wr={data:{type:hr.OBJECT,pretty_name:"Data",default:{}},on_start:{type:hr.FUNCTION,pretty_name:"On start",default:function(){}},on_finish:{type:hr.FUNCTION,pretty_name:"On finish",default:function(){}},on_load:{type:hr.FUNCTION,pretty_name:"On load",default:function(){}},post_trial_gap:{type:hr.INT,pretty_name:"Post trial gap",default:null},css_classes:{type:hr.STRING,pretty_name:"Custom CSS classes",default:null},simulation_options:{type:hr.COMPLEX,default:null}},kr=[hr.AUDIO,hr.IMAGE,hr.VIDEO];class _r{constructor(e,n){this.useWebaudio=e,this.webaudioContext=n,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(((n,a)=>{void 0===this.audio_buffers[e]||"tmp"==this.audio_buffers[e]?this.preloadAudio([e],(()=>{n(this.audio_buffers[e])}),(()=>{}),(e=>{a(e.error)})):n(this.audio_buffers[e])}))}preloadAudio(e,n=(()=>{}),a=(e=>{}),t=(e=>{})){e=dr(e.flat());let i=0;if(0==e.length)return void n();const o=(o,s=1)=>{const r=new XMLHttpRequest;r.open("GET",o,!0),r.responseType="arraybuffer",r.onload=()=>{this.context.decodeAudioData(r.response,(t=>{this.audio_buffers[o]=t,i++,a(o),i==e.length&&n()}),(e=>{t({source:o,error:e})}))},r.onerror=e=>{let n=e;404==r.status&&(n="404"),t({source:o,error:n})},r.onloadend=e=>{404==r.status&&t({source:o,error:"404"})},r.send(),this.preload_requests.push(r)},s=(o,s=1)=>{const r=new Audio,c=()=>{this.audio_buffers[o]=r,i++,a(o),i==e.length&&n(),r.removeEventListener("canplaythrough",c)};r.addEventListener("canplaythrough",c),r.addEventListener("error",(function e(n){t({source:r.src,error:n}),r.removeEventListener("error",e)})),r.addEventListener("abort",(function e(n){t({source:r.src,error:n}),r.removeEventListener("abort",e)})),r.src=o,this.preload_requests.push(r)};for(const t of e)void 0!==this.audio_buffers[t]?(i++,a(t),i==e.length&&n()):(this.audio_buffers[t]="tmp",null!==this.audioContext()?o(t):s(t))}preloadImages(e,n=(()=>{}),a=(e=>{}),t=(e=>{})){e=dr(e.flat());var i=0;if(0!==e.length)for(let o=0;o<e.length;o++){const s=new Image,r=e[o];s.onload=()=>{i++,a(r),i===e.length&&n()},s.onerror=e=>{t({source:r,error:e})},s.src=r,this.img_cache[r]=s,this.preload_requests.push(s)}else n()}preloadVideo(e,n=(()=>{}),a=(e=>{}),t=(e=>{})){e=dr(e.flat());let i=0;if(0!==e.length)for(const o of e){const s=this.video_buffers,r=new XMLHttpRequest;r.open("GET",o,!0),r.responseType="blob",r.onload=()=>{if(200===r.status||0===r.status){const t=r.response;s[o]=URL.createObjectURL(t),i++,a(o),i===e.length&&n()}},r.onerror=e=>{let n=e;404==r.status&&(n="404"),t({source:o,error:n})},r.onloadend=e=>{404==r.status&&t({source:o,error:"404"})},r.send(),this.preload_requests.push(r)}else n()}getAutoPreloadList(e){const n=Object.fromEntries(kr.map((e=>[e,new Set]))),a=(e,t)=>{var i,o,s,r;if(void 0!==e.timeline)for(const n of e.timeline)a(n,null!==(i=e.type)&&void 0!==i?i:t);else if(null===(s=null!==(o=e.type)&&void 0!==o?o:t)||void 0===s?void 0:s.info){const{name:a,parameters:i}=(null!==(r=e.type)&&void 0!==r?r:t).info;this.preloadMap.has(a)||this.preloadMap.set(a,Object.fromEntries(Object.entries(i).filter((([e,{type:n,preload:a}])=>kr.includes(n)&&(null==a||a))).map((([e,{type:n}])=>[e,n]))));for(const[t,i]of Object.entries(this.preloadMap.get(a))){const a=e[t],o=n[i];if("string"==typeof a)o.add(a);else if(Array.isArray(a))for(const e of a.flat())"string"==typeof e&&o.add(e)}}};return a({timeline:e}),{images:[...n[hr.IMAGE]],audio:[...n[hr.AUDIO]],video:[...n[hr.VIDEO]]}}cancelPreloads(){for(const e of this.preload_requests)e.onload=()=>{},e.onerror=()=>{},e.oncanplaythrough=()=>{},e.onabort=()=>{};this.preload_requests=[]}initializeMicrophoneRecorder(e){const n=new MediaRecorder(e);this.microphone_recorder=n}getMicrophoneRecorder(){return this.microphone_recorder}initializeCameraRecorder(e,n){this.camera_stream=e;const a=new MediaRecorder(e,n);this.camera_recorder=a}getCameraStream(){return this.camera_stream}getCameraRecorder(){return this.camera_recorder}}class jr{constructor(e,n){this.getDisplayContainerElement=e,this.setJsPsychTimeout=n}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,n=0){n>0?this.setJsPsychTimeout((()=>{this.keyDown(e),this.keyUp(e)}),n):(this.keyDown(e),this.keyUp(e))}clickTarget(e,n=0){n>0?this.setJsPsychTimeout((()=>{e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0}))}),n):(e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0})))}fillTextInput(e,n,a=0){a>0?this.setJsPsychTimeout((()=>{e.value=n}),a):e.value=n}getValidKey(e){const n=["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 a;if("NO_KEYS"==e)a=null;else if("ALL_KEYS"==e)a=n[Math.floor(Math.random()*n.length)];else{const n=e.flat();a=n[Math.floor(Math.random()*n.length)]}return a}mergeSimulationData(e,n){return Object.assign(Object.assign({},e),null==n?void 0:n.data)}ensureSimulationDataConsistency(e,n){if(n.rt&&(n.rt=Math.round(n.rt)),e.trial_duration&&n.rt&&n.rt>e.trial_duration&&(n.rt=null,n.response&&(n.response=null),n.correct&&(n.correct=!1)),e.choices&&"NO_KEYS"==e.choices&&(n.rt&&(n.rt=null),n.response&&(n.response=null)),e.allow_response_before_complete&&e.sequence_reps&&e.frame_time){const a=e.sequence_reps*e.frame_time*e.stimuli.length;n.rt<a&&(n.rt=null,n.response=null)}}}class Or{constructor(){this.timeout_handlers=[]}setTimeout(e,n){const a=window.setTimeout(e,n);return this.timeout_handlers.push(a),a}clearAllTimeouts(){for(const e of this.timeout_handlers)clearTimeout(e);this.timeout_handlers=[]}}var Cr={exports:{}};!function(e,n,a){function t(e){var n=this,a=function(){var e=4022871197,n=function(n){n=String(n);for(var a=0;a<n.length;a++){var t=.02519603282416938*(e+=n.charCodeAt(a));t-=e=t>>>0,e=(t*=e)>>>0,e+=4294967296*(t-=e)}return 2.3283064365386963e-10*(e>>>0)};return n}();n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=a(" "),n.s1=a(" "),n.s2=a(" "),n.s0-=a(e),n.s0<0&&(n.s0+=1),n.s1-=a(e),n.s1<0&&(n.s1+=1),n.s2-=a(e),n.s2<0&&(n.s2+=1),a=null}function i(e,n){return n.c=e.c,n.s0=e.s0,n.s1=e.s1,n.s2=e.s2,n}function o(e,n){var a=new t(e),o=n&&n.state,s=a.next;return s.int32=function(){return 4294967296*a.next()|0},s.double=function(){return s()+11102230246251565e-32*(2097152*s()|0)},s.quick=s,o&&("object"==typeof o&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.alea=o}(0,Cr,!1);var Sr=Cr.exports,Tr=lr(Sr),Pr={exports:{}};!function(e,n,a){function t(e){var n=this,a="";n.x=0,n.y=0,n.z=0,n.w=0,n.next=function(){var e=n.x^n.x<<11;return n.x=n.y,n.y=n.z,n.z=n.w,n.w^=n.w>>>19^e^e>>>8},e===(0|e)?n.x=e:a+=e;for(var t=0;t<a.length+64;t++)n.x^=0|a.charCodeAt(t),n.next()}function i(e,n){return n.x=e.x,n.y=e.y,n.z=e.z,n.w=e.w,n}function o(e,n){var a=new t(e),o=n&&n.state,s=function(){return(a.next()>>>0)/4294967296};return s.double=function(){do{var e=((a.next()>>>11)+(a.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},s.int32=a.next,s.quick=s,o&&("object"==typeof o&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.xor128=o}(0,Pr,!1);var Er=Pr.exports,Ir={exports:{}};!function(e,n,a){function t(e){var n=this,a="";n.next=function(){var e=n.x^n.x>>>2;return n.x=n.y,n.y=n.z,n.z=n.w,n.w=n.v,(n.d=n.d+362437|0)+(n.v=n.v^n.v<<4^e^e<<1)|0},n.x=0,n.y=0,n.z=0,n.w=0,n.v=0,e===(0|e)?n.x=e:a+=e;for(var t=0;t<a.length+64;t++)n.x^=0|a.charCodeAt(t),t==a.length&&(n.d=n.x<<10^n.x>>>4),n.next()}function i(e,n){return n.x=e.x,n.y=e.y,n.z=e.z,n.w=e.w,n.v=e.v,n.d=e.d,n}function o(e,n){var a=new t(e),o=n&&n.state,s=function(){return(a.next()>>>0)/4294967296};return s.double=function(){do{var e=((a.next()>>>11)+(a.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},s.int32=a.next,s.quick=s,o&&("object"==typeof o&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.xorwow=o}(0,Ir,!1);var Lr=Ir.exports,Ar={exports:{}};!function(e,n,a){function t(e){var n=this;n.next=function(){var e,a,t=n.x,i=n.i;return e=t[i],a=(e^=e>>>7)^e<<24,a^=(e=t[i+1&7])^e>>>10,a^=(e=t[i+3&7])^e>>>3,a^=(e=t[i+4&7])^e<<7,e=t[i+7&7],a^=(e^=e<<13)^e<<9,t[i]=a,n.i=i+1&7,a},function(e,n){var a,t=[];if(n===(0|n))t[0]=n;else for(n=""+n,a=0;a<n.length;++a)t[7&a]=t[7&a]<<15^n.charCodeAt(a)+t[a+1&7]<<13;for(;t.length<8;)t.push(0);for(a=0;a<8&&0===t[a];++a);for(8==a?t[7]=-1:t[a],e.x=t,e.i=0,a=256;a>0;--a)e.next()}(n,e)}function i(e,n){return n.x=e.x.slice(),n.i=e.i,n}function o(e,n){null==e&&(e=+new Date);var a=new t(e),o=n&&n.state,s=function(){return(a.next()>>>0)/4294967296};return s.double=function(){do{var e=((a.next()>>>11)+(a.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},s.int32=a.next,s.quick=s,o&&(o.x&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.xorshift7=o}(0,Ar,!1);var Rr=Ar.exports,Nr={exports:{}};!function(e,n,a){function t(e){var n=this;n.next=function(){var e,a,t=n.w,i=n.X,o=n.i;return n.w=t=t+1640531527|0,a=i[o+34&127],e=i[o=o+1&127],a^=a<<13,e^=e<<17,a^=a>>>15,e^=e>>>12,a=i[o]=a^e,n.i=o,a+(t^t>>>16)|0},function(e,n){var a,t,i,o,s,r=[],c=128;for(n===(0|n)?(t=n,n=null):(n+="\0",t=0,c=Math.max(c,n.length)),i=0,o=-32;o<c;++o)n&&(t^=n.charCodeAt((o+32)%n.length)),0===o&&(s=t),t^=t<<10,t^=t>>>15,t^=t<<4,t^=t>>>13,o>=0&&(s=s+1640531527|0,i=0==(a=r[127&o]^=t+s)?i+1:0);for(i>=128&&(r[127&(n&&n.length||0)]=-1),i=127,o=512;o>0;--o)t=r[i+34&127],a=r[i=i+1&127],t^=t<<13,a^=a<<17,t^=t>>>15,a^=a>>>12,r[i]=t^a;e.w=s,e.X=r,e.i=i}(n,e)}function i(e,n){return n.i=e.i,n.w=e.w,n.X=e.X.slice(),n}function o(e,n){null==e&&(e=+new Date);var a=new t(e),o=n&&n.state,s=function(){return(a.next()>>>0)/4294967296};return s.double=function(){do{var e=((a.next()>>>11)+(a.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},s.int32=a.next,s.quick=s,o&&(o.X&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.xor4096=o}(0,Nr,!1);var Dr=Nr.exports,zr={exports:{}};!function(e,n,a){function t(e){var n=this,a="";n.next=function(){var e=n.b,a=n.c,t=n.d,i=n.a;return e=e<<25^e>>>7^a,a=a-t|0,t=t<<24^t>>>8^i,i=i-e|0,n.b=e=e<<20^e>>>12^a,n.c=a=a-t|0,n.d=t<<16^a>>>16^i,n.a=i-e|0},n.a=0,n.b=0,n.c=-1640531527,n.d=1367130551,e===Math.floor(e)?(n.a=e/4294967296|0,n.b=0|e):a+=e;for(var t=0;t<a.length+20;t++)n.b^=0|a.charCodeAt(t),n.next()}function i(e,n){return n.a=e.a,n.b=e.b,n.c=e.c,n.d=e.d,n}function o(e,n){var a=new t(e),o=n&&n.state,s=function(){return(a.next()>>>0)/4294967296};return s.double=function(){do{var e=((a.next()>>>11)+(a.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},s.int32=a.next,s.quick=s,o&&("object"==typeof o&&i(o,a),s.state=function(){return i(a,{})}),s}n&&n.exports?n.exports=o:a&&a.amd?a((function(){return o})):this.tychei=o}(0,zr,!1);var Mr=zr.exports,Fr={exports:{}};!function(e){!function(n,a,t){var i,o=256,s="random",r=t.pow(o,6),c=t.pow(2,52),l=2*c,p=o-1;function u(e,p,u){var g=[],b=f(h((p=1==p?{entropy:!0}:p||{}).entropy?[e,v(a)]:null==e?function(){try{var e;return i&&(e=i.randomBytes)?e=e(o):(e=new Uint8Array(o),(n.crypto||n.msCrypto).getRandomValues(e)),v(e)}catch(e){var t=n.navigator,s=t&&t.plugins;return[+new Date,n,s,n.screen,v(a)]}}():e,3),g),x=new d(g),y=function(){for(var e=x.g(6),n=r,a=0;e<c;)e=(e+a)*o,n*=o,a=x.g(1);for(;e>=l;)e/=2,n/=2,a>>>=1;return(e+a)/n};return y.int32=function(){return 0|x.g(4)},y.quick=function(){return x.g(4)/4294967296},y.double=y,f(v(x.S),a),(p.pass||u||function(e,n,a,i){return i&&(i.S&&m(i,x),e.state=function(){return m(x,{})}),a?(t[s]=e,n):e})(y,b,"global"in p?p.global:this==t,p.state)}function d(e){var n,a=e.length,t=this,i=0,s=t.i=t.j=0,r=t.S=[];for(a||(e=[a++]);i<o;)r[i]=i++;for(i=0;i<o;i++)r[i]=r[s=p&s+e[i%a]+(n=r[i])],r[s]=n;(t.g=function(e){for(var n,a=0,i=t.i,s=t.j,r=t.S;e--;)n=r[i=p&i+1],a=a*o+r[p&(r[i]=r[s=p&s+n])+(r[s]=n)];return t.i=i,t.j=s,a})(o)}function m(e,n){return n.i=e.i,n.j=e.j,n.S=e.S.slice(),n}function h(e,n){var a,t=[],i=typeof e;if(n&&"object"==i)for(a in e)try{t.push(h(e[a],n-1))}catch(e){}return t.length?t:"string"==i?e:e+"\0"}function f(e,n){for(var a,t=e+"",i=0;i<t.length;)n[p&i]=p&(a^=19*n[p&i])+t.charCodeAt(i++);return v(n)}function v(e){return String.fromCharCode.apply(0,e)}if(f(t.random(),a),e.exports){e.exports=u;try{i=require("crypto")}catch(e){}}else t["seed"+s]=u}("undefined"!=typeof self?self:cr,[],Math)}(Fr);var qr=Sr,Br=Er,Ur=Lr,Hr=Rr,Vr=Dr,Wr=Mr,$r=Fr.exports;$r.alea=qr,$r.xor128=Br,$r.xorwow=Ur,$r.xorshift7=Hr,$r.xor4096=Vr,$r.tychei=Wr;var Kr=$r,Yr=["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 Gr(e){const n=e?.seed?new Kr(e.seed):null;function a(){return e&&e.maxLength>1?function(){var n,a=!1;for(;!a;)(n=t()).length<=e.maxLength&&(a=!0);return n}():t()}function t(){return Yr[i(Yr.length)]}function i(e){const a=n?n():Math.random();return Math.floor(a*e)}if(void 0===e)return a();"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+i(e.max+1-e.min),s=[],r="",c=0,l=0;l<o*e.wordsPerString;l++)c===e.wordsPerString-1?r+=e.formatter(a(),c):r+=e.formatter(a(),c)+e.separator,c++,(l+1)%e.wordsPerString==0&&(s.push(r),r="",c=0);return"string"==typeof e.join&&(s=s.join(e.join)),s}var Jr=Gr;Gr.wordList=Yr;var Xr=lr(Jr);function Zr(e,n,a=!1){const t=Array.isArray(e),i=Array.isArray(n);if(t)if(i){if(e.length!=n.length)if(console.warn("Unclear parameters given to randomization.repeat. Items and repetitions are unequal lengths. Behavior may not be as expected."),n.length<e.length){let a=[];for(let t=0;t<e.length;t++)a.push(n);n=a}else n=n.slice(0,e.length)}else{let a=[];for(let t=0;t<e.length;t++)a.push(n);n=a}else i?(n=[n[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],n=[n]);let o=[];for(let a=0;a<e.length;a++)for(let t=0;t<n[a];t++)null==e[a]||"object"!=typeof e[a]?o.push(e[a]):o.push(Object.assign({},e[a]));let s=Qr(o);return a&&(s=function(e){const n={};for(const a of e)for(const e of Object.keys(a))void 0===n[e]&&(n[e]=[]),n[e].push(a[e]);return n}(s)),s}function Qr(e){Array.isArray(e)||console.error("Argument to shuffle() must be an array.");const n=e.slice(0);let a,t,i=n.length;for(;i;)t=Math.floor(Math.random()*i--),a=n[i],n[i]=n[t],n[t]=a;return n}function ec(e,n=!1){const a=e.length;if(1==a)return console.warn("shuffleAlternateGroups() was called with only one group. Defaulting to simple shuffle."),Qr(e[0]);let t=[];for(let e=0;e<a;e++)t.push(e);n&&(t=Qr(t));const i=[];let o=null;for(let n=0;n<a;n++)o=null===o?e[n].length:Math.min(o,e[n].length),i.push(Qr(e[n]));const s=[];for(let e=0;e<o;e++)for(let n=0;n<t.length;n++)s.push(i[t[n]][e]);return s}function nc(e,n){return Array.isArray(e)||console.error("First argument to sampleWithoutReplacement() must be an array"),n>e.length&&console.error("Cannot take a sample larger than the size of the set of items to sample."),Qr(e).slice(0,n)}function ac(e,n,a){Array.isArray(e)||console.error("First argument to sampleWithReplacement() must be an array");const t=[];if(void 0!==a){a.length!==e.length&&console.error("The length of the weights array must equal the length of the array to be sampled from.");let n=0;for(const e of a)n+=e;for(const e of a)t.push(e/n)}else for(let n=0;n<e.length;n++)t.push(1/e.length);const i=[t[0]];for(let e=1;e<t.length;e++)i.push(t[e]+i[e-1]);const o=[];for(let a=0;a<n;a++){const n=Math.random();let a=0;for(;n>i[a];)a++;o.push(e[a])}return o}function tc(e,n){return function(){var e=0,n=0;for(;0===e;)e=Math.random();for(;0===n;)n=Math.random();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*n)}()*n+e}function ic(e){return-Math.log(Math.random())/e}var oc=Object.freeze({__proto__:null,factorial:function(e,n=1,a=!1){let t=[{}];for(const[n,a]of Object.entries(e)){const e=[];for(const i of a)for(const a of t)e.push(Object.assign(Object.assign({},a),{[n]:i}));t=e}return Zr(t,n,a)},randomID:function(e=32){let n="";const a="0123456789abcdefghjklmnopqrstuvwxyz";for(let t=0;t<e;t++)n+=a[Math.floor(35*Math.random())];return n},randomInt:function(e,n){if(n<e)throw new Error("Upper boundary must be less than or equal to lower boundary");return e+Math.floor(Math.random()*(n-e+1))},randomWords:function(e){return Xr(e)},repeat:Zr,sampleBernoulli:function(e){return Math.random()<=e?1:0},sampleExGaussian:function(e,n,a,t=!1){let i=tc(e,n)+ic(a);if(t)for(;i<=0;)i=tc(e,n)+ic(a);return i},sampleExponential:ic,sampleNormal:tc,sampleWithReplacement:ac,sampleWithoutReplacement:nc,setSeed:function(e=Math.random().toString()){return Math.random=Tr(e),e},shuffle:Qr,shuffleAlternateGroups:ec,shuffleNoRepeats:function(e,n){Array.isArray(e)||console.error("First argument to shuffleNoRepeats() must be an array."),void 0!==n&&"function"!=typeof n&&console.error("Second argument to shuffleNoRepeats() must be a function."),void 0===n&&(n=function(e,n){return e===n});const a=Qr(e);for(let e=0;e<a.length-1;e++)if(n(a[e],a[e+1])){let t=Math.floor(Math.random()*(a.length-2))+1;for(;n(a[e+1],a[t])||n(a[e+1],a[t+1])||n(a[e+1],a[t-1])||n(a[e],a[t]);)t=Math.floor(Math.random()*(a.length-2))+1;const i=a[t];a[t]=a[e+1],a[e+1]=i}return a}});function sc(){const e={previewMode:!1,outsideTurk:!1,hitId:"INVALID_URL_PARAMETER",assignmentId:"INVALID_URL_PARAMETER",workerId:"INVALID_URL_PARAMETER",turkSubmitTo:"INVALID_URL_PARAMETER"},n=function(e,n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");const a=new RegExp("[\\?&]"+n+"=([^&#]*)").exec(e);return null==a?"":a[1]},a=n(window.location.href,"assignmentId")?window.location.href:document.referrer;return["assignmentId","hitId","workerId","turkSubmitTo"].map((function(t){e[t]=unescape(n(a,t))})),e.previewMode="ASSIGNMENT_ID_NOT_AVAILABLE"==e.assignmentId,e.outsideTurk=!e.previewMode&&""===e.hitId&&""==e.assignmentId&&""==e.workerId,e}var rc=Object.freeze({__proto__:null,submitToTurk:function(e){const n=sc(),a=n.assignmentId,t=n.turkSubmitTo;if(!a||!t)return;const i=document.createElement("form");i.method="POST",i.action=t+"/mturk/externalSubmit?assignmentId="+a;for(const n in e)if(e.hasOwnProperty(n)){const a=document.createElement("input");a.type="hidden",a.name=n,a.id=n,a.value=e[n],i.appendChild(a)}document.body.appendChild(i),i.submit()},turkInfo:sc});class cc{constructor(e,n,a,t){if(this.jsPsych=e,this.progress={current_location:-1,current_variable_set:0,current_repetition:0,current_iteration:0,done:!1},this.parent_node=a,this.relative_id=void 0===a?0:t,void 0!==n.timeline){this.timeline_parameters={timeline:[],loop_function:n.loop_function,conditional_function:n.conditional_function,sample:n.sample,randomize_order:void 0!==n.randomize_order&&n.randomize_order,repetitions:void 0===n.repetitions?1:n.repetitions,timeline_variables:void 0===n.timeline_variables?[{}]:n.timeline_variables,on_timeline_finish:n.on_timeline_finish,on_timeline_start:n.on_timeline_start},this.setTimelineVariablesOrder();var i=Object.assign({},n);delete i.timeline,delete i.conditional_function,delete i.loop_function,delete i.randomize_order,delete i.repetitions,delete i.timeline_variables,delete i.sample,delete i.on_timeline_start,delete i.on_timeline_finish,this.node_trial_data=i;for(var o=0;o<n.timeline.length;o++){var s=Object.assign({},i,n.timeline[o]);if("object"==typeof i.data&&"object"==typeof n.timeline[o].data){var r=Object.assign({},i.data,n.timeline[o].data);s.data=r}this.timeline_parameters.timeline.push(new cc(this.jsPsych,s,this,o))}}else void 0===n.type&&console.error('Trial level node is missing the "type" parameter. The parameters for the node are: '+JSON.stringify(n)),this.trial_parameters=Object.assign({},n)}trial(){return void 0===this.timeline_parameters?mr(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 n=[],a=0;a<e.timeline_variables.length;a++)n.push(a);void 0!==e.sample&&("custom"==e.sample.type?n=e.sample.fn(n):"with-replacement"==e.sample.type?n=ac(n,e.sample.size,e.sample.weights):"without-replacement"==e.sample.type?n=nc(n,e.sample.size):"fixed-repetitions"==e.sample.type?n=Zr(n,e.sample.size,!1):"alternate-groups"==e.sample.type?n=ec(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&&(n=Qr(n)),this.progress.order=n}}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,n=this.timeline_parameters,a=this.jsPsych.internal;if(e.done)return!0;if(-1==e.current_location){if(void 0!==n){if(void 0!==n.conditional_function&&0==e.current_repetition&&0==e.current_variable_set){a.call_immediate=!0;var t=n.conditional_function();if(a.call_immediate=!1,0==t)return e.done=!0,!0}void 0!==n.on_timeline_start&&0==e.current_variable_set&&n.on_timeline_start()}return e.current_location=0,this.advance()}if(void 0!==n){for(var i=!1;e.current_location<n.timeline.length&&0==i;){if(!n.timeline[e.current_location].advance())return i=!0,!1;e.current_location++}return e.current_variable_set<e.order.length-1?(this.nextSet(),this.advance()):e.current_repetition<n.repetitions-1?(this.nextRepetiton(),void 0!==n.on_timeline_finish&&n.on_timeline_finish(),this.advance()):(void 0!==n.on_timeline_finish&&n.on_timeline_finish(),void 0!==n.loop_function?(a.call_immediate=!0,n.loop_function(this.generatedData())?(this.reset(),a.call_immediate=!1,this.parent_node.advance()):(e.done=!0,a.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 n=this.getTimelineVariableValue(e);return void 0===n?void 0!==this.parent_node?this.parent_node.findTimelineVariable(e):void 0:n}timelineVariable(e){if(void 0===this.timeline_parameters){const n=this.findTimelineVariable(e);return void 0===n&&console.warn("Timeline variable "+e+" not found."),n}{var n=Math.max(0,this.progress.current_location);n==this.timeline_parameters.timeline.length&&(n-=1);const a=this.timeline_parameters.timeline[n].timelineVariable(e);return void 0===a&&console.warn("Timeline variable "+e+" not found."),a}}allTimelineVariables(){for(var e=this.allTimelineVariablesNames(),n={},a=0;a<e.length;a++)n[e[a]]=this.timelineVariable(e[a]);return n}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 n=Math.max(0,this.progress.current_location);return n==this.timeline_parameters.timeline.length&&(n-=1),this.timeline_parameters.timeline[n].allTimelineVariablesNames(e)}if(void 0===this.timeline_parameters)return e}length(){var e=0;if(void 0===this.timeline_parameters)return 1;for(var n=0;n<this.timeline_parameters.timeline.length;n++)e+=this.timeline_parameters.timeline[n].length();return e}percentComplete(){for(var e=this.length(),n=0,a=0;a<this.timeline_parameters.timeline.length;a++)this.timeline_parameters.timeline[a].isComplete()&&(n+=this.timeline_parameters.timeline[a].length());return n/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 n=[],a=0;a<this.timeline_parameters.timeline.length;a++){var t=this.timeline_parameters.timeline[a].trialsOfType(e);n=n.concat(t)}return n}insert(e){void 0===this.timeline_parameters?console.error("Cannot add new trials to a trial-level node."):this.timeline_parameters.timeline.push(new cc(this.jsPsych,Object.assign(Object.assign({},this.node_trial_data),e),this,this.timeline_parameters.timeline.length))}}function lc(e){return new Promise((n=>setTimeout(n,e)))}class pc{version(){return"7.3.4"}constructor(e){this.extensions={},this.turk=rc,this.randomization=oc,this.utils=fr,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,pr(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 br(this),this.pluginAPI=function(e){const n=e.getInitSettings(),a=pr(new yr(e.getDisplayContainerElement,n.case_sensitive_responses,n.minimum_valid_rt)),t=pr(new Or),i=pr(new _r(n.use_webaudio,e.webaudio_context)),o=pr(new xr),s=pr(new jr(e.getDisplayContainerElement,t.setTimeout));return Object.assign({},a,t,i,o,s)}(this);for(const n of e.extensions)this.extensions[n.type.info.name]=new n.type(this);this.pluginAPI.initAudio()}run(e){return rr(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 cc(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,n="data-only",a={}){return rr(this,void 0,void 0,(function*(){this.simulation_mode=n,this.simulation_options=a,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 n;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 a=this.data.getLastTrialData().values()[0],t=this.current_trial;if("object"==typeof t.save_trial_parameters)for(const e of Object.keys(t.save_trial_parameters)){const n=t.save_trial_parameters[e];!0===n&&(void 0===t[e]?console.warn(`Invalid parameter specified in save_trial_parameters. Trial has no property called "${e}".`):"function"==typeof t[e]?a[e]=t[e].toString():a[e]=t[e]),!1===n&&"internal_node_id"!==e&&"trial_index"!==e&&delete a[e]}const i=(null!==(n=t.extensions)&&void 0!==n?n:[]).map((e=>this.extensions[e.type.info.name].on_finish(e.params))),o=()=>{this.internal.call_immediate=!0,"function"==typeof t.on_finish&&t.on_finish(a),this.opts.on_trial_finish(a),this.opts.on_data_update(a),this.internal.call_immediate=!1,"data-only"===this.simulation_mode?this.nextTrial():null===typeof t.post_trial_gap||void 0===t.post_trial_gap?this.opts.default_iti>0?setTimeout(this.nextTrial,this.opts.default_iti):this.nextTrial():t.post_trial_gap>0?setTimeout(this.nextTrial,t.post_trial_gap):this.nextTrial()};if(i.some((e=>"function"==typeof e.then)))Promise.all(i.map((e=>Promise.resolve(e).then((e=>{Object.assign(a,e)}))))).then(o);else{for(const e of i)Object.assign(a,e);o()}}endExperiment(e="",n={}){this.timeline.end_message=e,this.timeline.end(),this.pluginAPI.cancelAllKeyboardResponses(),this.pluginAPI.clearAllTimeouts(),this.finishTrial(n)}endCurrentTimeline(){this.timeline.endActiveNode()}getCurrentTrial(){return this.current_trial}getInitSettings(){return this.opts}getCurrentTimelineNodeID(){return this.timeline.activeID()}timelineVariable(e,n=!1){return this.internal.call_immediate||!0===n?this.timeline.timelineVariable(e):{timelineVariablePlaceholder:!0,timelineVariableFunction:()=>this.timeline.timelineVariable(e)}}getAllTimelineVariables(){return this.timeline.allTimelineVariables()}addNodeToEndOfTimeline(e,n){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 rr(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 n=e.display_element instanceof Element?e.display_element:document.querySelector("#"+e.display_element);null===n?console.error("The display_element specified in initJsPsych() does not exist in the DOM."):e.display_element=n}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 rr(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()),n=()=>{void 0!==this.timeline.end_message&&(this.DOM_target.innerHTML=this.timeline.end_message),this.resolveFinishedPromise()};e?Promise.resolve(e).then(n):n()}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 ur("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({},pr(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 n of e.extensions)this.extensions[n.type.info.name].on_start(n.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 n=()=>{if("function"==typeof e.on_load&&e.on_load(),Array.isArray(e.extensions))for(const n of e.extensions)this.extensions[n.type.info.name].on_load(n.params)};let a,t,i;this.simulation_mode||(a=e.type.trial(this.DOM_target,e,n)),this.simulation_mode&&(e.type.simulate?(e.simulation_options||(t=this.simulation_options.default),e.simulation_options&&("string"==typeof e.simulation_options?this.simulation_options[e.simulation_options]?t=this.simulation_options[e.simulation_options]:this.simulation_options.default?(console.log(`No matching simulation options found for "${e.simulation_options}". Using "default" options.`),t=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.`),t={}):t=e.simulation_options),i=this.utils.deepMerge(this.simulation_options.default,t),i=this.utils.deepCopy(i),i=this.replaceFunctionsWithValues(i,null),a=!1===(null==i?void 0:i.simulate)?e.type.trial(this.DOM_target,e,n):e.type.simulate(e,(null==i?void 0:i.mode)||this.simulation_mode,i,n)):a=e.type.trial(this.DOM_target,e,n));a&&"function"==typeof a.then||this.simulation_mode&&(!this.simulation_mode||!1!==(null==i?void 0:i.simulate))||n(),this.internal.call_immediate=!1}evaluateTimelineVariables(e){for(const n of Object.keys(e))"object"==typeof e[n]&&null!==e[n]&&void 0!==e[n].timelineVariablePlaceholder&&(e[n]=e[n].timelineVariableFunction()),"object"==typeof e[n]&&null!==e[n]&&"timeline"!==n&&"timeline_variables"!==n&&this.evaluateTimelineVariables(e[n])}evaluateFunctionParameters(e){this.internal.call_immediate=!0;for(const n of Object.keys(e))"type"!==n&&(void 0!==wr[n]&&wr[n].type!==hr.FUNCTION&&(e[n]=this.replaceFunctionsWithValues(e[n],null)),void 0!==e.type.info.parameters[n]&&e.type.info.parameters[n].type!==hr.FUNCTION&&(e[n]=this.replaceFunctionsWithValues(e[n],e.type.info.parameters[n])));this.internal.call_immediate=!1}replaceFunctionsWithValues(e,n){if(null===e)return e;if(Array.isArray(e))for(let a=0;a<e.length;a++)e[a]=this.replaceFunctionsWithValues(e[a],n);else if("object"==typeof e)if(null!==n&&n.nested)for(const a of Object.keys(e))"object"==typeof n.nested[a]&&n.nested[a].type!==hr.FUNCTION&&(e[a]=this.replaceFunctionsWithValues(e[a],n.nested[a]));else for(const n of Object.keys(e))"type"!==n&&"timeline"!==n&&"timeline_variables"!==n&&(e[n]=this.replaceFunctionsWithValues(e[n],null));else if("function"==typeof e)return e();return e}setDefaultValues(e){for(const n in e.type.info.parameters)e.type.info.parameters[n].type===hr.COMPLEX?(void 0===e[n]&&e.type.info.parameters[n].default&&(e[n]=e.type.info.parameters[n].default),!0===e.type.info.parameters[n].array&&Array.isArray(e[n])&&e[n].forEach((function(a,t){for(const a in e.type.info.parameters[n].nested)void 0!==e[n][t][a]&&null!==e[n][t][a]||(void 0===e.type.info.parameters[n].nested[a].default?console.error(`You must specify a value for the ${a} parameter (nested in the ${n} parameter) in the ${e.type.info.name} plugin.`):e[n][t][a]=e.type.info.parameters[n].nested[a].default)}))):void 0!==e[n]&&null!==e[n]||(void 0===e.type.info.parameters[n].default?console.error(`You must specify a value for the ${n} parameter in the ${e.type.info.name} plugin.`):e[n]=e.type.info.parameters[n].default)}checkExclusions(e){return rr(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 n=e.min_width||0,a=e.min_height||0;if(window.innerWidth<n||window.innerHeight<a){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 "+n+"px. Your current width is "+window.innerWidth+"px.</p><p>The minimum height is "+a+"px. Your current height is "+window.innerHeight+"px.</p>";window.innerWidth<n||window.innerHeight<a;)yield lc(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 uc={name:"preload",parameters:{auto_preload:{type:hr.BOOL,pretty_name:"Auto-preload",default:!1},trials:{type:hr.TIMELINE,pretty_name:"Trials",default:[]},images:{type:hr.STRING,pretty_name:"Images",default:[],array:!0},audio:{type:hr.STRING,pretty_name:"Audio",default:[],array:!0},video:{type:hr.STRING,pretty_name:"Video",default:[],array:!0},message:{type:hr.HTML_STRING,pretty_name:"Message",default:null},show_progress_bar:{type:hr.BOOL,pretty_name:"Show progress bar",default:!0},continue_after_error:{type:hr.BOOL,pretty_name:"Continue after error",default:!1},error_message:{type:hr.HTML_STRING,pretty_name:"Error message",default:"The experiment failed to load."},show_detailed_errors:{type:hr.BOOL,pretty_name:"Show detailed errors",default:!1},max_load_time:{type:hr.INT,pretty_name:"Max load time",default:null},on_error:{type:hr.FUNCTION,pretty_name:"On error",default:null},on_success:{type:hr.FUNCTION,pretty_name:"On success",default:null}}};class dc{constructor(e){this.jsPsych=e}trial(e,n){var a=null,t=!1,i=[],o=[],s=[],r=[],c=this.jsPsych.getSafeModeStatus(),l=[],p=[],u=[];if(n.auto_preload){var d=this.jsPsych.getTimeline(),m=this.jsPsych.pluginAPI.getAutoPreloadList(d);l=l.concat(m.images),p=p.concat(m.audio),u=u.concat(m.video)}if(n.trials.length>0){var h=this.jsPsych.pluginAPI.getAutoPreloadList(n.trials);l=l.concat(h.images),p=p.concat(h.audio),u=u.concat(h.video)}l=l.concat(n.images),p=p.concat(n.audio),u=u.concat(n.video),l=this.jsPsych.utils.unique(l.flat()),p=this.jsPsych.utils.unique(p.flat()),u=this.jsPsych.utils.unique(u.flat()),c&&(u=[]);var f="";null!==n.message&&(f+=n.message),n.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 v=()=>{if(k++,n.show_progress_bar){var a=k/w*100,t=e.querySelector("#jspsych-loading-progress-bar");null!==t&&(t.style.width=a+"%")}},g=()=>{void 0!==t&&!1===t&&(this.jsPsych.pluginAPI.clearAllTimeouts(),this.jsPsych.pluginAPI.cancelPreloads(),a=!0,y())},b=()=>{this.jsPsych.pluginAPI.cancelPreloads(),void 0===a||!1!==a&&null!==a||(t=!0,_<w&&(a=!1),C("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>"),n.continue_after_error?y():x())},x=()=>{this.jsPsych.pluginAPI.clearAllTimeouts(),this.jsPsych.pluginAPI.cancelPreloads(),e.innerHTML=n.error_message,n.show_detailed_errors&&(e.innerHTML+="<p><strong>Error details:</strong></p>",r.forEach((n=>{e.innerHTML+=n})))},y=()=>{this.jsPsych.pluginAPI.clearAllTimeouts();var n={success:a,timeout:t,failed_images:i,failed_audio:o,failed_video:s};e.innerHTML="",this.jsPsych.finishTrial(n)};null!==n.max_load_time&&this.jsPsych.pluginAPI.setTimeout(b,n.max_load_time);var w=l.length+p.length+u.length,k=0,_=0;if(0==w)g();else{const e=e=>{this.jsPsych.pluginAPI.preloadVideo(u,e,O,j)},n=e=>{this.jsPsych.pluginAPI.preloadAudio(p,e,O,j)},a=e=>{this.jsPsych.pluginAPI.preloadImages(l,e,O,j)};u.length>0&&e((()=>{})),p.length>0&&n((()=>{})),l.length>0&&a((()=>{}))}function j(e){v(),null==a&&(a=!1);var t="unknown file";e.source&&(t=e.source),e.error&&e.error.path&&e.error.path.length>0&&("img"==e.error.path[0].localName?i.push(t):"audio"==e.error.path[0].localName?o.push(t):"video"==e.error.path[0].localName&&s.push(t));var c="<p><strong>Error loading file: "+t+"</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),C(t),k==w&&(n.continue_after_error?y():x())}function O(e){v(),function(e){null!==n.on_success&&n.on_success(e)}(e),++_==w?g():k==w&&(n.continue_after_error?y():x())}function C(e){null!==n.on_error&&n.on_error(e)}}simulate(e,n,a,t){"data-only"==n&&(t(),this.simulate_data_only(e,a)),"visual"==n&&this.simulate_visual(e,a,t)}create_simulation_data(e,n){return this.jsPsych.pluginAPI.mergeSimulationData({success:!0,timeout:!1,failed_images:[],failed_audio:[],failed_video:[]},n)}simulate_data_only(e,n){const a=this.create_simulation_data(e,n);this.jsPsych.finishTrial(a)}simulate_visual(e,n,a){const t=this.jsPsych.getDisplayElement();this.trial(t,e),a()}}function mc(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var t,i,o,s,r=[],c=!0,l=!1;try{if(o=(a=a.call(e)).next,0===n){if(Object(a)!==a)return;c=!1}else for(;!(c=(t=o.call(a)).done)&&(r.push(t.value),r.length!==n);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=a.return&&(s=a.return(),Object(s)!==s))return}finally{if(l)throw i}}return r}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return hc(e,n);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return hc(e,n)}(e,n)||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 hc(e,n){(null==n||n>e.length)&&(n=e.length);for(var a=0,t=new Array(n);a<n;a++)t[a]=e[a];return t}dc.info=uc,hr.BOOL,hr.HTML_STRING,hr.STRING,hr.INT;var fc=[],vc=fc.forEach,gc=fc.slice;var bc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,xc=function(e,n,a,t){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};a&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*a*1e3)),t&&(i.domain=t),document.cookie=function(e,n,a){var t=a||{};t.path=t.path||"/";var i=encodeURIComponent(n),o="".concat(e,"=").concat(i);if(t.maxAge>0){var s=t.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(s))}if(t.domain){if(!bc.test(t.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(t.domain)}if(t.path){if(!bc.test(t.path))throw new TypeError("option path is invalid");o+="; Path=".concat(t.path)}if(t.expires){if("function"!=typeof t.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires=".concat(t.expires.toUTCString())}if(t.httpOnly&&(o+="; HttpOnly"),t.secure&&(o+="; Secure"),t.sameSite)switch("string"==typeof t.sameSite?t.sameSite.toLowerCase():t.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(n),i)},yc=function(e){for(var n="".concat(e,"="),a=document.cookie.split(";"),t=0;t<a.length;t++){for(var i=a[t];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(n))return i.substring(n.length,i.length)}return null},wc={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&"undefined"!=typeof document){var a=yc(e.lookupCookie);a&&(n=a)}return n},cacheUserLanguage:function(e,n){n.lookupCookie&&"undefined"!=typeof document&&xc(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},kc={name:"querystring",lookup:function(e){var n;if("undefined"!=typeof window){var a=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(a=window.location.hash.substring(window.location.hash.indexOf("?")));for(var t=a.substring(1).split("&"),i=0;i<t.length;i++){var o=t[i].indexOf("=");if(o>0)t[i].substring(0,o)===e.lookupQuerystring&&(n=t[i].substring(o+1))}}return n}},_c=null,jc=function(){if(null!==_c)return _c;try{_c="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){_c=!1}return _c},Oc={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&jc()){var a=window.localStorage.getItem(e.lookupLocalStorage);a&&(n=a)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&jc()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},Cc=null,Sc=function(){if(null!==Cc)return Cc;try{Cc="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Cc=!1}return Cc},Tc={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&Sc()){var a=window.sessionStorage.getItem(e.lookupSessionStorage);a&&(n=a)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&Sc()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},Pc={name:"navigator",lookup:function(e){var n=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var a=0;a<navigator.languages.length;a++)n.push(navigator.languages[a]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},Ec={name:"htmlTag",lookup:function(e){var n,a=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return a&&"function"==typeof a.getAttribute&&(n=a.getAttribute("lang")),n}},Ic={name:"path",lookup:function(e){var n;if("undefined"!=typeof window){var a=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(a instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof a[e.lookupFromPathIndex])return;n=a[e.lookupFromPathIndex].replace("/","")}else n=a[0].replace("/","")}return n}},Lc={name:"subdomain",lookup:function(e){var n="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,a="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(a)return a[n]}};var Ac=function(){function e(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};jo(this,e),this.type="languageDetector",this.detectors={},this.init(n,a)}return So(e,[{key:"init",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=function(e){return vc.call(gc.call(arguments,1),(function(n){if(n)for(var a in n)void 0===e[a]&&(e[a]=n[a])})),e}(n,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],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=a,this.addDetector(wc),this.addDetector(kc),this.addDetector(Oc),this.addDetector(Tc),this.addDetector(Pc),this.addDetector(Ec),this.addDetector(Ic),this.addDetector(Lc)}},{key:"addDetector",value:function(e){return this.detectors[e.name]=e,this}},{key:"detect",value:function(e){var n=this;e||(e=this.options.order);var a=[];return e.forEach((function(e){if(n.detectors[e]){var t=n.detectors[e].lookup(n.options);t&&"string"==typeof t&&(t=[t]),t&&(a=a.concat(t))}})),a=a.map((function(e){return n.options.convertDetectedLanguage(e)})),this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}},{key:"cacheUserLanguage",value:function(e,n){var a=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach((function(n){a.detectors[n]&&a.detectors[n].cacheUserLanguage(e,a.options)})))}}]),e}();Ac.type="languageDetector";var Rc={progressBar:"Progress Complete",fullScreenTrial:{prompt:"Switching to full screen mode.",buttonText:"Go"},instructions:{intro:{header:"Welcome to ROAR Multichoice!",topText:"In this activity, you're going to help me complete some sentences.",bottomText:""},instructions:{header:"What word completes the sentence?",topText:"Choose the best option to fill in the blank.",bottomText:""},practice:{header:"Let's practice!",topText:"Remember, your job is to choose the right word that fills in the blank.",bottomText:""},postPractice:{header:"Great job!",topText:"Now you're ready to try on your own. Try your best to choose the word that completes the sentence.",bottomText:""},practiceCorrect:{header:"That's right!",topText:"",bottomText:""},break1:{header:"Keep up the good work!",topText:"",bottomText:""},break2:{header:"You are doing great!",topText:"",bottomText:""},break3:{header:"Let's keep going.",topText:"",bottomText:""},break4:{header:"You are an expert at this!",topText:"",bottomText:""},break5:{header:"You can do it!",topText:"",bottomText:""},ending:{header:"You're all done! Thank you for helping me find those words!",topText:"",bottomText:""}}};(new Ac).addDetector({name:"defaultToEnglish",lookup:e=>"en"}),Ds.use(Ac).init({debug:!1,load:"languageOnly",fallbackLng:"en",detection:{order:["defaultToEnglish","querystring"]},resources:{en:{translation:Rc}}}),function(e){const n=new pc(e);Object.defineProperties(n,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,n])=>[e,{get(){throw new ur(n)}}]))))}({show_progress_bar:!1,auto_update_progress_bar:!1,message_progress_bar:`${Ds.t("progressBar")}`});var Nc={default:{languageSpecific:{device:[],shared:["tryAgain.mp3","thatsRight.mp3","clickButton.jpg","intro.mp3","ins.mp3","surveyPractice.mp3","surveyPostPractice.mp3","great-job-click.mp3","break1.mp3","break2.mp3","break3.mp3","break4.mp3","break5.mp3","ending.mp3"]},shared:["nullAudio.mp3","select.mp3","goButton.png","coin.mp3","countdown0.mp3","countdown1.mp3","countdown2.mp3","countdown3.mp3","fail.mp3","fairyCoin.mp3","coin_bag.gif","ROARLion.gif"]}};const Dc="https://storage.googleapis.com/egma-math";!function(e,n,a){var t={images:{},video:{},audio:{}},i=tr(a),o=ir(),s=function(e,a){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.forEach((function(e){var c=sr(e),l=qs.parse(e).name,p=l.replace(/^([A-Z])|[\s-_](\w)/g,(function(e,n,a,t){return a?a.toUpperCase():n.toLowerCase()})),u=or(n,e,i,o,a,s,r);t[c][p]=u}))},r=function(e){var n,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Array.isArray(e)?s(e,"default"):(e.languageSpecific&&(Array.isArray(e.languageSpecific)?s(e.languageSpecific,"languageSpecific"):function(e,n){Object.entries(e).forEach((function(e){var a=mc(e,2),t=a[0],i=a[1];s(i,t,!0,n)}))}(e.languageSpecific,a)),e.device&&s(e.device,"device"),e.shared&&(n=e.shared,Array.isArray(n)?s(n,"shared"):Object.entries(n).forEach((function(e){var n=mc(e,2),a=n[0],t=n[1];s(t,"device"===a?"shared/device":"shared")}))))};e.preload&&Object.entries(e.preload).forEach((function(e){var n=mc(e,2)[1];r(n)})),e.default&&r(e.default,!0)}(Nc,Dc),function(e,n,a){var t={},i=tr(a),o=ir();function s(e,a,s){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=arguments.length>4&&void 0!==arguments[4]&&arguments[4];e.forEach((function(e){var l=sr(e),p=or(n,e,i,o,s,r,c);t[a]||(t[a]={type:dc,message:"The experiment is loading",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:[]}),t[a][l].push(p)}))}function r(e,n,a){Array.isArray(n)?s(n,e,"languageSpecific"):function(e,n,a){Object.entries(n).forEach((function(n){var t=mc(n,2),i=t[0];s(t[1],e,i,!0,a)}))}(e,n,a)}function c(e,n){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Array.isArray(n)?s(n,e,"default"):(n.languageSpecific&&r(e,n.languageSpecific,a),n.device&&s(n.device,e,"device"),n.shared&&function(e,n){Array.isArray(n)?s(n,e,"shared"):Object.entries(n).forEach((function(n){var a=mc(n,2),t=a[0];s(a[1],e,"device"===t?"shared/device":"shared")}))}(e,n.shared))}return e.preload&&Object.entries(e.preload).forEach((function(e){var n=mc(e,2);c(n[0],n[1])})),e.default&&c("default",e.default,!0),t}(Nc,Dc).default;const zc=(e,n)=>{let a;return a=["true","false"].includes(e?.toLocaleLowerCase())?function(e,n=!1){return null==e?n:"true"===e.trim().toLowerCase()}(e?.toLocaleLowerCase()):!(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:13,t=Number(e);if(null!=e){if(Number.isNaN(t)){var i={k:0,tk:0,pk:0,preschool:0,prekindergarten:0,transitionalkindergarten: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,postgraduate:13,university:13,graduate:13,master:13,doctorate:13,masters:13}[e.toLowerCase().replace(/\s/g,"").replace(/-/g,"")];if(void 0===i)return;return i<n?n:i>a?a:i}return t<n?n:t>a?a:t}}(n)>=6),a};async function Mc(){const e=document.createElement("div");e.innerHTML='<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">\n\n\x3c!-- <h5 style="text-align:left;">\n Stanford University Research Consent Form\n <span style="float:right;">\n For IRB Use Only\n </span>\n</h5>\n\n<h5 style="text-align:left;">\n Protocol Director: Jason D. Yeatman, Ph.D.\n <span style="float:right;">\n Approval Date: October 31, 2023\n </span>\n</h5>\n\n<h5 style="text-align:left;">\n Protocol Title: Plasticity and Reading\n <span style="float:right;">\n Expiration Date: October 31, 2024\n </span>\n</h5> --\x3e\n\n<style>\n body {\n margin: 20px; /* Adjust the margin size as needed */\n }\n</style>\n\n<body>\n<h3 style="text-align: center;"> STANFORD UNIVERSITY CONSENT FORM </h3>\n\n<h4 style="text-align: center;"> Stanford University Reading &amp; Dyslexia Research Program: Behavioral Testing </h4>\n\n<blockquote>\n<h4 id="principal-investigator-">Principal Investigator:</h4>\n<p>Jason D. Yeatman </p>\n<p>Associate Professor</p>\n<p>Graduate School of Education</p>\n<p>School of Medicine, Division of Developmental Behavioral Pediatrics</p>\n<h4 id="contact-">Contact:</h4>\n<p>readingresearch@stanford.edu</p>\n<p><a href="https://dyslexia.stanford.edu/">https://dyslexia.stanford.edu/</a> </p>\n</blockquote>\n<h4 id="purpose-of-the-study">PURPOSE OF THE STUDY</h4>\n<p>Data collected through games in the web-browser will help researchers understand relationships between academic skills, reading proficiency, cognition, perception, and/or attitudes towards reading and school in individuals with a broad range of reading skills.</p>\n<h4 id="study-procedures">STUDY PROCEDURES</h4>\n<p>In this study, you or your child will be asked to complete computer tasks via a computer screen. An eye-tracking software will request access to your webcam and will be used to measure eye movements. You will be asked to provide verbal responses in which case the web browser will request access to your computer microphone. You or your child may be asked to complete multiple activities in one session depending on the study. </p>\n<h4 id="privacy-or-data-collection">PRIVACY OR DATA COLLECTION</h4>\n<p>We will do our best to ensure your privacy. Data that is collected through this online experiment is stored separately from identifying information such as your name. For the sake of payment, sometimes we store an email address you provide, but this is stored separately from the responses that are recorded in the online experiment. Each participant is assigned a code and that is used rather than names. This is called “coded data” and we try to ensure that the identity of our research participants is kept confidential. Data collected as part of this study may be used for many years to help discover trends in the population and explore changes due to development and education. In addition, coded data may be shared online or with collaborators to allow for new and unforeseen discoveries. Researchers may choose to include coded data in publications to support findings, or they may choose to release coded data alongside findings for replicability.</p>\n<p>We will collect mouse and click data, scrolling behavior, scores earned, button presses and their timestamps, time spent on each page, audio recordings, or other data that may be derived from your behavior on our page. This data will be stored on servers. The eye-tracking software will use your webcam to track your eyes. This software will record and save video data for future analysis. Once analysis has been completed, the video data will be deleted. Incomplete data may be logged if you quit out of the experiment early. If you would like to void your data, you may request it through our contact email.</p>\n<h4 id="compensation">COMPENSATION</h4>\n<p>We value [your/your child’s] participation. A Tango gift card will be sent through email upon completion of this study. Specific reward amounts will be indicated on the task card and/or study invitation, which you can view before launching the task or scheduling the appointment. If you or your child is completing these activities as part of another study, the compensation rate will remain consistent with the rate of the study you or your child is enrolled in. </p>\n<p>Please note that the gift card system we use to pay participants is not affiliated with Stanford and we will need to input your name and email into this system to send you the electronic gift card payment. If you feel uncomfortable with this process, please let us know before signing the consent form. Depending on the study, we may be able to look into other forms of payment for you.</p>\n<h4 id="risks-stress-or-discomfort">RISKS, STRESS, OR DISCOMFORT</h4>\n<p>If there is any reason to believe you are/your child is not safe to participate in any of the tasks, please contact us at readingresearch@stanford.edu. Some people may experience some physical discomfort or boredom due to being asked to sit for long periods. For computer tasks, some people may also experience dry eyes or eye fatigue. For some tasks that are untimed, breaks can be taken as needed during the session.</p>\n<h4 id="contact-information">CONTACT INFORMATION</h4>\n<p>If you have any additional questions or concerns about our research, feel free to email us at readingresearch@stanford.edu. We will be more than happy to help!</p>\n<p>For general information regarding questions or concerns about [your/your child’s] rights as a research participant, please call 1-866-680-2906 to reach the Administrative Panel on Human Subjects in Medical Research, Stanford University.</p>\n<form id="consentForm">\n <p>\n <input type="checkbox" id="webcamConsent" name="consent">\n I confirm that I have a webcam, and I agree to have my webcam track my eyes. I understand that the webcam will record or save video data and that it will be deleted once analysis is complete.\n </p>\n <p>\n <input type="checkbox" id="voiceConsent" name="consent">\n I agree to have my voice recorded. This data will only be used for data scoring purposes, will be stored securely, and will not be shared with others outside the lab.\n </p>\n <p>\n <input type="checkbox" id="participationConsent" name="consent">\n I agree to participate in this research. Participation in this research is voluntary, and I can stop at any time without penalty. I feel that I understand what I am getting into, and I know I am free to leave the experiment at any time by simply closing the web browser.\n </p>\n <button id="confirmButton" disabled>Continue to test</button>\n</form>\n</body>\n\n<h5 class="card-title" style="display: none;"></h5>\n\n<script>\n document.getElementById(\'consentForm\').addEventListener(\'change\', function() {\n var checkboxes = document.querySelectorAll(\'input[type="checkbox"][name="consent"]\');\n var allChecked = Array.from(checkboxes).every(checkbox => checkbox.checked);\n document.getElementById(\'confirmButton\').disabled = !allChecked;\n });\n<\/script>\n\n',document.body.appendChild(e),await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await Fc(a.src)}}(e),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(e),await new Promise((n=>{const a=document.getElementById("confirmButton");a&&a.addEventListener("click",(()=>{document.querySelectorAll("script[data-dynamic]").forEach((e=>e.parentNode.removeChild(e))),e.remove(),n()}))}))}function Fc(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;var qc='<!DOCTYPE html>\n<html lang="en">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">\n <style>\n body {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100vh;\n margin: 0;\n background-color: #ffffff; /* White background */\n color: #000000; /* Black text */\n }\n\n .loading-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 20px;\n border-radius: 10px;\n background: rgba(0, 0, 0, 0.05); /* Slight gray tint to differentiate from the white background */\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */\n }\n\n .loading-spinner {\n border: 8px solid rgba(0, 0, 0, 0.1); /* Lighter border for the spinner */\n border-top: 8px solid #0d6efd; /* Blue color for active part of the spinner */\n border-radius: 50%;\n width: 80px;\n height: 80px;\n animation: spin 1s linear infinite;\n margin-bottom: 20px;\n }\n\n h2 {\n font-weight: 400;\n letter-spacing: 1px;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n </style>\n</head>\n<body>\n <div class="loading-container">\n <div class="loading-spinner"></div>\n <h2>Loading...</h2>\n </div>\n</body>\n</html>\n',Bc={};function Uc(){const e=document.getElementById("deviceList");e.innerHTML="",Object.keys(Bc).forEach((n=>{const a=document.createElement("option");a.value=n,a.text=n.charAt(0).toUpperCase()+n.slice(1),e.add(a)}))}function Hc(e){console.log("You selected a "+e.deviceName),screenHeight=e.screenHeight,screenWidth=e.screenWidth,webcamHeight=e.webcamHeight,screenSizeCalibrated=e.screenSizeCalibrated,webcamCentered=e.webcamCentered,HeightWebcamEntered=e.HeightWebcamEntered,heightInput_textbox.value=webcamHeight,heightInput_textbox.disabled=HeightWebcamEntered,Wc("Custom"!==e.deviceName)}function Vc(){var e=document.querySelectorAll(".card-title"),n=1;e.forEach((function(e){"none"!==e.parentElement.parentElement.style.display&&null!==e.parentElement.parentElement.offsetParent&&(e.textContent=e.textContent.replace(/\(\d+\)/,"("+n+")"),n++)}))}function Wc(e=!0){const n=document.querySelectorAll('[id*="-collapsableCards"]');console.log(n),n.forEach((n=>{n.style.display=e?"none":""})),Vc()}var $c=Object.freeze({__proto__:null,collapseCards:Wc,get deviceConfig(){return Bc},handleDevice:Hc,inputParticipantName:function(e){var n=document.getElementById("idInput");n.value=e,n.disabled=!0},selectDevice:function(){const e=document.getElementById("deviceList"),n=e.options[e.selectedIndex].value;Hc(Bc[n]||Bc.custom)},updateCardNumbers:Vc,updateDeviceConfigFromJSON:async function(e){try{const n=await fetch(e),a=await n.json();console.log(a),Bc=a,Uc()}catch(e){console.error("Error fetching or parsing JSON:",e)}},updateDropdownOptions:Uc});function Kc(){const e=window.navigator,n=window.screen,a={userAgent:e.userAgent,platform:e.platform,language:e.language,deviceMemory:e.deviceMemory||"Not available",hardwareConcurrency:e.hardwareConcurrency,maxTouchPoints:e.maxTouchPoints,cookiesEnabled:e.cookieEnabled,webDriver:e.webdriver,onlineStatus:e.onLine,gpu:"Not available"},t={width:n.width,height:n.height,colorDepth:n.colorDepth,pixelDepth:n.pixelDepth,retinaDisplay:window.matchMedia("(-webkit-min-device-pixel-ratio: 2)").matches,landscapeOrientation:window.matchMedia("(orientation: landscape)").matches},i=document.createElement("canvas"),o=i.getContext("webgl")||i.getContext("experimental-webgl");if(o){const e=o.getExtension("WEBGL_debug_renderer_info");a.gpu=e?o.getParameter(e.UNMASKED_RENDERER_WEBGL):"Not available"}return{device:a,screen:t}}async function Yc(e){o.session.set("clickedTests",[]),o.session.set("testComplete",!1);const n=qc,a=document.createElement("div");a.innerHTML='\x3c!-- Scripts --\x3e\n<script data-dynamic src="https://cdn.jsdelivr.net/npm/remote-calibrator@latest"><\/script>\n<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">\n\n\x3c!-- CSS --\x3e\n<style>\n\nbody {\n margin: 0;\n}\n\n .column {\n float: left;\n padding: 10px;\n}\n\n.left, .right {\n width: 33%;\n}\n\n.middle {\n width: 33%;\n}\n\n.row:after {\n content: "";\n display: table;\n clear: both;\n}\n\n.container {\n width: 75%; /* Set the width for the container */\n margin: auto; /* Center the container if needed */\n}\n\n #audio-visualization {\n width: 100%; /* Both elements fill the container */\n /* display: block; Ensure they are not inline */\n}\n\n#audio-visualization {\n height: 100px; /* Set a fixed height for the canvas */\n}\n\n</style>\n\n\x3c!-- HTML --\x3e\n<body id="body">\n\n <div class="px-4 py-5 my-5 text-center" style="display: block;">\n <h1 class="display-5 fw-bold" id="title">Configure Device</h1>\n <h5> To get started, we will need to set up a few things. </h5>\n <h5> If you’re not sure what to do, ask an adult to help you with this part. </h5>\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/parent-help-icon.png" width="10%">\n <div class="col-lg-6 mx-auto" style="margin-top: -8vh;">\n <p class="lead mt-3 mb-5"></p>\n\n\n \x3c!-- Preconfigured Devices --\x3e\n <div id="findDevice-collapsableCards">\n <form>\n <b>First, check for your device in this preconfigured dropdown list:</b>\n <select id="deviceList" onchange="selectDevice()">\n </select>\n <br> If your device is <b></b>not in this list, please provide the following information: </br>\n </form>\n </div>\n </br>\n\n\n <div class="d-grid gap-2 justify-content-center">\n\n\n \x3c!-- ROW 1: Full Screen | Get Screen Size --\x3e\n <div class="row gap-2" id="screenSize-collapsableCards">\n <div class="col" >\n <div class="card" style="width:20rem; height:11rem" id="card-fullscreen">\n <div class="card-body">\n <h5 class="card-title">(1) Full Screen</h5>\n <p class="card-text">Do not exit out of \'Full Screen\' mode for the remainder of this study.</p>\n <button type="button" class="btn btn-primary" id="fullscreen" onclick="openFullscreen()">Make Fullscreen</button>\n </div>\n </div>\n </div>\n <div class="col">\n <div class="card" style="width:20rem;height:11rem" id="card-screen-size">\n <div class="card-body">\n <h5 class="card-title">(2) Screen Size</h5>\n <p class="card-text">We need this to calibrate your device\'s screen size.</p>\n <button type="button" class="btn btn-primary" id="measureScreen" onclick="getScreenSize()">Measure Screen Size</button>\n </div>\n </div>\n </div>\n </div>\n\n\n \x3c!-- ROW 2: Webcam Centered | Height of Webcam --\x3e\n <div class="row gap-2" id="webcam-collapsableCards">\n <div class="col">\n <div class="card" style="width: 20rem;" id="card-webcam-center">\n <div class="card-body">\n <h5 class="card-title">(3) Is your webcam centred?</h5>\n <h6 class="card-subtitle mb-2 text-muted">It is expected that for laptops the webcam is already centred.</h6>\n <p class="card-text">If you are using a separate webcam, please centre this in the middle (as seen in the image below).</p>\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/webcamCentered.jpg" alt="center webcam" width="100%" style="padding-bottom:10px;">\n <button type="button" class="btn btn-primary" id="measureDistanceFromScreeen" onclick="getwebcamCentered()">My Webcam is Centred</button>\n </div>\n </div>\n </div>\n <div class="col">\n <div class="card" style="width: 20rem;" id="card-height-camera">\n <div class="card-body">\n <h5 class="card-title">(4) Height of Webcam</h5>\n <p class="card-text">This is the distance between the centre of your webcam\'s lens and the top bezel of your screen (image provided for example)</p>\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/webcamPosition.PNG" alt="center webcam" width="100%" style="padding-bottom:10px;">\n <label for="heightInput">Height in cm:</label>\n <input type="number" id="heightInput" name="heightInput" required\n minlength="1" maxlength="8" size="10" value="2">\n </br></br>\n <button type="button" class="btn btn-primary" id="getHeightbutton" onclick="getHeightWebcam()">Done</button>\n </div>\n </div>\n </div>\n </div>\n\n\n \x3c!-- ROW 3: Camera Access --\x3e\n <div class="row gap-2">\n <div class="col">\n <div class="card" style="width: 42rem;height:11rem" id="card-camera">\n <div class="card-body">\n <h5 class="card-title">(5) Camera Access</h5>\n <p class="card-text">Please provide access to your camera to record your eye movements.</p>\n <button type="button" class="btn btn-primary" id="start-camera">Provide Access</button>\n </div>\n </div>\n </div>\n </div>\n\n\n \x3c!-- ROW 4: Check Recording --\x3e\n <div class="row gap-2" style="padding-top:1rem;">\n <div class="col">\n <div class="card" style="width:42rem" id="card-final-check">\n <div class="card-body">\n <h5 class="card-title">(6) Final Checks</h5>\n <p>Please ensure your video is well-lit and centered. Speak at a normal volume to check the audio level below.</p>\n\n <div class="column left">\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/badlighting.jpg" alt="center webcam" width="100%" style="padding-bottom:10px;">\n <b>Bad Lighting</b> &#10060 </br>\n (Make sure eyes and face are clearly visible)\n </div>\n <div class="column middle">\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/glassesReflection.jpg" alt="center webcam" width="100%" style="padding-bottom:10px;">\n <b>Glasses On</b> &#10060 </br>\n (Remove Glasses)\n </div>\n <div class="column middle">\n <img src="https://eyetrackingdata.blob.core.windows.net/public/Images/goodPosition.jpg" alt="center webcam" width="100%" style="padding-bottom:10px;">\n <b>Ideal View</b>&#10004 &#65039 </br>\n (Face close to camera and centered with clear view of eyes)\n </div>\n <div class="container">\n <video autoplay="true" id="videoElement" style="width:100%; background-color: darkgray;"></video>\n <canvas id="audio-visualization" width="640" height="100"></canvas>\n </div>\n\n <button type="button" class="btn btn-primary" id="Final-Check" onclick="finalCheckComplete()" disabled >I\'m Looking and Sounding Great</button>\n </div>\n </div>\n </div> \n </div>\n \n\n \x3c!-- ROW 5: User Details --\x3e\n <div class="row gap-2" style="padding-top:1rem;">\n <div class="col">\n <div class="card" style="width:42rem" id="card-camera">\n <div class="card-body">\n <h5 class="card-title">(8) Ready to Start?</h5>\n <label for="idInput">Participant ID:</label>\n <input type="text" id="idInput" name="idInput" required\n minlength="1" maxlength="100" size="10">\n </br></br>\n <button type="button" class="btn btn-primary" id="confirmButton" disabled>Continue</button>\n </div>\n </div>\n </div> \n </div>\n </div>\n </div>\n </div>\n\n \x3c!-- Audio Playing --\x3e \n <audio autoplay id="voiceover"> </audio>\n\n </body>\n\n<script data-dynamic>\n\nvar voiceover = document.getElementById(\'voiceover\'); // TO DO: Doesn\'t have enough time to load? Only plays if the consent screen shows up first\nvoiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/deviceConfig.mp3`;\n\nRemoteCalibrator.init();\n\nvar desktop = document.documentElement;\nvar finalCheckButton = document.getElementById("Final-Check")\nvar confirmButton = document.getElementById("confirmButton");\nvar cardFullscreen = document.getElementById("card-fullscreen");\nvar cardScreenSize = document.getElementById("card-screen-size");\nvar cardDistanceScreen = document.getElementById("card-distance-screen");\nvar cardcamera = document.getElementById("card-camera");\nvar cardwebcamCenter = document.getElementById("card-webcam-center");\nvar cardheightcamera = document.getElementById("card-height-camera")\nvar cardfinalcheck = document.getElementById("card-final-check");\nvar heightInput_textbox = document.getElementById("heightInput")\nvar idInput_textbox = document.getElementById("idInput")\nvar video = document.querySelector("#videoElement");\n\nvar audioDetected = false;\nvar fullScreen = false;\nvar screenSizeCalibrated = false;\nvar cameraStarted = false;\nvar HeightWebcamEntered = false;\nvar finalcheck = false;\nvar webcamCentered = false;\nvar prolificID;\nvar screenWidth=0;\nvar screenHeight=0;\nvar screenWidthPX=window.screen.width;\nvar screenHeightPX=window.screen.height;\nvar webcamHeight=0;\nvar distance = 0;\nvar webcamInfo;\n\n\nfunction makeid(length) {\n var result = \'\';\n var characters = \'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\';\n var charactersLength = characters.length;\n for ( var i = 0; i < length; i++ ) {\n result += characters.charAt(Math.floor(Math.random() * \n charactersLength));\n }\n return result;\n}\n\n\nfunction openFullscreen() {\n if (desktop.requestFullscreen) {\n desktop.requestFullscreen();\n } else if (desktop.webkitRequestFullscreen) { /* Safari */\n desktop.webkitRequestFullscreen();\n } else if (desktop.msRequestFullscreen) { /* IE11 */\n desktop.msRequestFullscreen();\n }\n\n screenWidthPX = window.screen.width;\n screenHeightPX = window.screen.height;\n\n fullScreen = true\n cardFullscreen.style.backgroundColor = \'#bcf5bc\'\n\n checkAllComplete()\n}\n\nfunction getScreenSize(){\n RemoteCalibrator.screenSize({}, data => {\n console.log(`ScreenWidth: ${data.value.screenWidthCm}cm.`)\n console.log(`ScreenHeight: ${data.value.screenHeightCm}cm.`)\n\n screenWidth = data.value.screenWidthCm\n screenHeight = data.value.screenHeightCm\n\n if (screenWidth!=null && screenHeight!=null) {\n screenSizeCalibrated = true\n cardScreenSize.style.backgroundColor = \'#bcf5bc\'\n console.log(screenSizeCalibrated)\n }\n checkAllComplete()\n }) \n}\n\n\nfunction getwebcamCentered(){\n webcamCentered = true\n cardwebcamCenter.style.backgroundColor = \'#bcf5bc\'\n checkAllComplete()\n}\n\nfunction getHeightWebcam(){\n if (heightInput_textbox.value>0){\n HeightWebcamEntered = true\n webcamHeight = heightInput_textbox.value\n heightInput_textbox.disabled = true\n cardheightcamera.style.backgroundColor = \'#bcf5bc\'\n }\n checkAllComplete()\n}\n\nfunction finalCheckComplete(){\n let userConfirmed = true\n if (!audioDetected) {\n userConfirmed = confirm("We couldn\'t hear you, are you sure your microphone is working? Click OK to continue anyway, or Cancel to check your settings.");\n }\n if (userConfirmed) {\n finalcheck = true\n cardfinalcheck.style.backgroundColor = \'#bcf5bc\'\n checkAllComplete()\n }\n}\n\n\ndocument.querySelector("#start-camera").addEventListener(\'click\', async () => {\n const audioContext = new AudioContext();\n const canvas = document.getElementById(\'audio-visualization\');\n const ctx = canvas.getContext(\'2d\');\n\n // Now requesting both audio and video\n const cameraStream = await navigator.mediaDevices.getUserMedia({\n video: { width: { ideal: 1920 }, height: { ideal: 1080 }, frameRate: { ideal: 60, max: 60 } },\n audio: true // Enabled audio\n });\n\n if (cameraStream.getVideoTracks().length > 0) {\n const { width, height } = cameraStream.getVideoTracks()[0].getSettings();\n const videoTrack = cameraStream.getVideoTracks()[0];\n webcamInfo = videoTrack.getCapabilities\n ? videoTrack.getCapabilities()\n : {};\n\n webcamInfo[\'image_width\'] = width\n webcamInfo[\'image_height\'] = height\n\n console.log(`${width}x${height}`); // Log video resolution\n\n const video = document.querySelector(\'video\');\n video.srcObject = cameraStream;\n\n if (height > 0) {\n cardcamera.style.backgroundColor = \'#bcf5bc\';\n cameraStarted = true;\n video.style.backgroundColor = \'#bcf5bc\';\n finalCheckButton.disabled = false;\n checkAllComplete();\n } else {\n video.style.backgroundColor = \'#FA8072\';\n alert("Your webcam does not meet our resolution standards");\n }\n }\n\n // Set up audio analyser\n const micSource = audioContext.createMediaStreamSource(cameraStream);\n const analyser = audioContext.createAnalyser();\n analyser.fftSize = 2048;\n micSource.connect(analyser);\n const bufferLength = analyser.frequencyBinCount;\n const dataArray = new Uint8Array(bufferLength);\n\n function draw() {\n requestAnimationFrame(draw);\n analyser.getByteTimeDomainData(dataArray);\n\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n\n ctx.lineWidth = 2;\n ctx.strokeStyle = \'rgb(0, 0, 0)\';\n ctx.beginPath();\n\n const sliceWidth = canvas.width * 1.0 / bufferLength;\n let x = 0;\n let sum = 0;\n\n for (let i = 0; i < bufferLength; i++) {\n const v = dataArray[i] / 128.0;\n const y = v * canvas.height / 2;\n\n if (i === 0) {\n ctx.moveTo(x, y);\n } else {\n ctx.lineTo(x, y);\n }\n\n sum += (dataArray[i] - 128) * (dataArray[i] - 128); // Summing for RMS calculation\n x += sliceWidth;\n }\n\n ctx.lineTo(canvas.width, canvas.height / 2);\n ctx.stroke();\n let rms = Math.sqrt(sum / bufferLength);\n if (rms > 0.01) {\n audioDetected = true; // Update the audioDetected flag if audio is sufficiently loud\n }\n\n }\n\n draw(); // Start the drawing function\n\n});\n\n\nfunction checkAllComplete() {\n const hasCollapsedCards = Array.from(document.querySelectorAll(\'.card-title\')).some(card => \n card.closest(\'.card\').style.display === \'none\' || card.closest(\'.card\').offsetParent === null\n );\n\n const allConditionsMet = fullScreen && screenSizeCalibrated && cameraStarted && webcamCentered && HeightWebcamEntered && finalcheck;\n const minimalConditionsMet = cameraStarted && finalcheck;\n\n if ((hasCollapsedCards && minimalConditionsMet) || (!hasCollapsedCards && allConditionsMet)) {\n confirmButton.classList.remove(\'btn-secondary\')\n confirmButton.classList.add(\'btn-primary\')\n confirmButton.disabled = false;\n }\n}\n\nvar jsonUrl = "https://eyetrackingdata.blob.core.windows.net/public/config/devices.json";\nupdateDeviceConfigFromJSON(jsonUrl);\n\n\n// function continueToTest(){\n// video.remove()\n// prolificID = idInput_textbox.value.trim() ? idInput_textbox.value : makeid(10);\n\n// localStorage.prolificID = prolificID\n// localStorage.screenHeight = screenHeight\n// localStorage.screenWidth = screenWidth\n// localStorage.webcamHeight = webcamHeight\n// localStorage.distance = distance\n// window.location.href = "criticalSpacingMenu_six.html";\n\n// }\n\n<\/script>',document.body.appendChild(a),await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await Gc(a.src)}}(a),await async function(e){Object.keys(e).forEach((n=>{window[n]=e[n]}))}($c),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(a),function(e){"simple"===e.firekit.task.variantParams.viewType&&collapseCards(!0);""!==e.firekit.user.assessmentPid&&inputParticipantName(e.firekit.user.assessmentPid)}(e),await new Promise((t=>{const i=document.getElementById("confirmButton");i&&i.addEventListener("click",(async()=>{try{var i=o.session.get("config").firekit.user.assessmentUid+"_"+(idInput_textbox.value.trim()?idInput_textbox.value:makeid(10));i!==e.firekit.user.assessmentPid&&e.firekit.updateUser({assessmentPid:i}),o.session.set("id",i),o.session.set("deviceConfig",{screenWidth:parseFloat(screenWidth),screenHeight:parseFloat(screenHeight),screenWidthPX:parseFloat(screenWidthPX),screenHeightPX:parseFloat(screenHeightPX),webcamHeight:parseFloat(webcamHeight),deviceInfo:Kc(),webcamInfo:webcamInfo}),a.innerHTML=n;const s=await async function(e){var n="openfolder.txt",a="text/plain";try{const t=await fetch(`https://us-central1-webapp-af756.cloudfunctions.net/getUploadUrlFunction?fileName=${n}&mimeType=${a}&parentDir=${e}`);if(!t.ok)throw new Error("Failed to fetch upload URL");return await t.text()}catch(e){throw window.console.log("Error fetching upload URL:",e),e}}(o.session.get("id"));window.console.log("Folder Created:",s),function(e){!function(e){Object.keys(e).forEach((e=>{const n=Object.getOwnPropertyDescriptor(window,e);n&&n.configurable?delete window[e]:console.log(`Cannot remove ${e} from window; it may be non-configurable.`)}))}(e);document.querySelectorAll("script[data-dynamic]").forEach((e=>e.parentNode.removeChild(e)))}($c),a.remove(),t()}catch(e){window.console.log("Error:",e)}}))}))}function Gc(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;var Jc=[];async function Xc(){try{const e=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:60,max:60}},audio:!0});if(camera_stream=e,camera_stream&&camera_stream.active)return Jc=[],videoRecorder=new MediaRecorder(camera_stream),videoRecorder.ondataavailable=e=>{e.data.size>0&&Jc.push(e.data)},Promise.resolve(camera_stream);throw new Error("Camera stream is not active")}catch(e){return console.error("Error accessing media devices:",e),Promise.reject(e)}}async function Zc(e,n,a){try{const t=await fetch(`https://us-central1-webapp-af756.cloudfunctions.net/getUploadUrlFunction?fileName=${e}&mimeType=${n}&parentDir=${a}`);if(!t.ok)throw new Error("Failed to fetch upload URL");return(await t.json()).result}catch(e){throw console.error("Error fetching upload URL:",e),e}}async function Qc(e,n){try{const a=await fetch(n,{method:"PUT",headers:{"Content-Type":e.type,"Content-Length":e.size},body:e});if(!a.ok)throw new Error("Upload failed: "+a.statusText);console.log("Upload complete:",await a.text())}catch(e){console.error("Error:",e)}}var el=4;function nl(e){0===--el?(document.getElementById("instruction").style.display="none","function"==typeof e&&(e(),el=4)):(document.getElementById("instruction").innerHTML="<h1>"+el+"</h1>",setTimeout((function(){nl(e)}),1e3))}function al(){desktop.requestFullscreen?desktop.requestFullscreen():desktop.webkitRequestFullscreen?desktop.webkitRequestFullscreen():desktop.msRequestFullscreen&&desktop.msRequestFullscreen()}var tl=Object.freeze({__proto__:null,_pageCompleted:!1,get countdown(){return el},generateGridCoordinates:function(e){let n,a,t,i;if(console.log(e.screenWidth,e.screenHeight,e.screenWidthPX,e.screenHeightPX),e.screenWidth>0&&e.screenHeight>0){const t=3.25;n=2.75*(e.screenWidthPX/e.screenWidth),a=t*(e.screenHeightPX/e.screenHeight)}else{n=.8*e.screenWidthPX/9,a=.8*e.screenHeightPX/4}t=9*n,i=4*a;const o=(e.screenWidthPX-t)/2,s=(e.screenHeightPX-i)/2,r=[];for(let e=0;e<4;e++)for(let t=0;t<9;t++){const i=o+t*n+n/2,c=s+e*a+a/2;r.push({x:i,y:c,width:n,height:a})}for(let e=r.length-1;e>0;e--){const n=Math.floor(Math.random()*(e+1));[r[e],r[n]]=[r[n],r[e]]}return r},generateStimulusOrder:function(e){const n=e.stimulus.slice(),a=Math.ceil(36/n.length),t=[];for(let e=0;e<a;e++){const e=n.sort((()=>Math.random()-.5));t.push(...e)}for(let e=1;e<t.length;e++)if(t[e]===t[e-1]){const n=t[e];t[e]=t[e+1],t[e+1]=n,String.fromCharCode(t[e].charCodeAt(0)-1)}return t.slice(0,36)},getUploadUrl:Zc,giveAccess:Xc,gridHeightCM:13,gridWidthCM:24.75,numCols:9,numRows:4,openFullscreen:al,saveRecordings:async function(e,n,a="video/webm"){await new Promise((e=>{videoRecorder.onstop=e,videoRecorder.stop()}));const t=new Blob(Jc,{type:"video/webm"});if(t.size>0){console.log("Video recorded successfully. Size:",t.size,"bytes");try{Qc(t,await Zc(e,a,n))}catch(e){console.error("Error getting video upload URL:",e)}}else console.error("No video data recorded.")},startRecording:async function(){Jc=[],videoRecorder.start()},startTest:async function(e){await Xc(),al(),nl(e)},stopRecording:async function(){videoRecorder.stop()},updateCountdown:nl,uploadFile:Qc,get videoChunks(){return Jc}});async function il(e){const n=document.createElement("div");n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100%",await async function(e){Object.keys(e).forEach((n=>{window[n]=e[n]}))}(tl),n.innerHTML='<!DOCTYPE html>\n<html lang="en">\n<head>\n <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>Image and Audio Recording</title>\n\n \x3c!-- <script data-dynamic src="./voiceCalibration.js"><\/script> --\x3e\n</head>\n\n<style>\n \n body {\n margin: 0;\n min-height: 100vh; /* Ensure body takes the full viewport height */\n display: flex; /* Enable Flexbox */\n justify-content: center; /* Center content horizontally */\n align-items: center; /* Center content vertically */\n font-family: sans-serif;\n }\n\n stim {\n position: absolute;\n height: auto;\n cursor: pointer;\n }\n \n #instruction {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n \n #confirmContainer {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n</style>\n\n\n<body>\n\n \x3c!-- Center Instructions Panel --\x3e\n <div id="calibrationContentArea"> \n <div class="row gap-2" id="instruction">\n <div class="col">\n <div class="card" style="width: 45rem; height:39rem">\n <div class="card-body" style="text-align: center;">\n <h3 class="card-title" id="calibrationTitle"> <b> Calibration Phase </b> </h3>\n <h4 class="card-text"> Now, we need to calibrate the system. </h4>\n <h4 class="card-text" id="calibrationDescription"></h4>\n <div style="text-align: center; margin-bottom: 3vh;">\n <img id="calibrationImage" src="https://eyetrackingdata.blob.core.windows.net/public/Images/squareAddition_white.png" width="350px">\n </div>\n <div class="btn-group" role="group" aria-label="Basic example">\n \x3c!-- <button type="button" class="btn btn-primary" id="giveAccessButton" onclick="giveAccess()">Give Access to Mic/Camera</button> --\x3e\n \x3c!-- <br> --\x3e\n <button type="button" class="btn btn-primary" id="startTestButton" onclick="startTest(displayNextStim)">Start</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n \x3c!-- <center> <img src="./img/letter-calibration-explanation.gif" width="350vh" style="margin-bottom: 3vh;"> </center> --\x3e\n\n \x3c!-- Audio Playing --\x3e \n <audio autoplay id="voiceover"> </audio>\n\n \x3c!-- Confirm Button --\x3e\n <div class="row gap-2" id="confirmContainer" style="display: none;">\n <div class="card-body" style="text-align: center;">\n <h3> Calibration complete! </h3>\n <button type="button" class="btn btn-primary" id="confirmButton"> Continue </button>\n </div>\n </div>\n\n<script data-dynamic>\n\nvar deviceConfig = store.session.get(\'deviceConfig\')\n// var deviceConfig = {screenWidth: 29, screenHeight: 16.2, screenWidthPX: 960, screenHeightPX: 540, webcamHeight: 0.5}\nvar testConfig = store.session.get(\'testConfig\')\n// var testConfig = {dir: "https://eyetrackingdata.blob.core.windows.net/public/assets/Letter",\n// stimulus : ["C.svg", "D.svg", "H.svg", "K.svg", "N.svg", "O.svg", "R.svg", "S.svg", "V.svg", "Z.svg"],\n// sizecm: 2}\n\nif (testConfig[\'testname\'] === \'Letter\') {\n var subtestText = [\'Letter\', \'letter\']\n} else {\n var subtestText = [\'Number\', \'number\']\n}\n\nvar voiceover = document.getElementById(\'voiceover\');\nvoiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/${subtestText[1]}Calibration.mp3`;\n\ndocument.body.addEventListener(\'click\', function() {\n voiceover.pause();\n voiceover.currentTime = 0; // Stop the voiceover whenever a click is detected \n});\n \nvar desktop = document.documentElement;\nvar camera_stream;\nvar audioRecorder;\nvar videoRecorder;\nvar videoChunks = [];\n\ncounter = 0; \n\n// Getting the div element by its ID\n// const calibrationDiv = document.getElementById(\'calibrationContentArea\');\n\n// Text you want to edit with ${} variables \n// const calibrationDetails = `\n// <div class="row gap-2" id="instruction">\n// <div class="col">\n// <div class="card" style="width: 45rem; height:39rem">\n// <div class="card-body" style="text-align: center;">\n// <h3 class="card-title"> <b> ${subtestText[0]} Calibration Phase </b> </h3>\n// <h4 class="card-text"> Now, we need to recalibrate the navigation system. </h4>\n// <h4 class="card-text"> You will see ${subtestText[1]}s pop up on the screen. Say the ${subtestText[1]} out loud <b>first</b> and then click on the ${subtestText[1]} to go to the next one. </h4>\n// <center> <img src="./img/${subtestText[1]}-calibration-explanation.gif" width="350vh" style="margin-bottom: 3vh;"> </center>\n// <div class="btn-group" role="group" aria-label="Basic example">\n// <button type="button" class="btn btn-primary" id="giveAccessButton" onclick="giveAccess()">Give Access to Mic/Camera</button>\n// <br>\n// <button type="button" class="btn btn-primary" id="startTestButton" onclick="startTest(displayNextStim)" disabled>Start</button>\n// </div>\n// </div>\n// </div>\n// </div>\n// </div>\n// `;\n\n// // Inserting the HTML code into the div\n// calibrationDiv.innerHTML = calibrationDetails;\n\nvar gridCoordinates = generateGridCoordinates(deviceConfig)\nvar shuffledImages = generateStimulusOrder(testConfig)\n\nvar _gridCoordinates = [] \n// gridCoordinates;\nvar _shuffledImages = []\n// shuffledImages.map(filename => filename.split(\'.\')[0]).reverse();\nvar _parentDir = store.session.get("id")\nvar _videoURL = []\nvar _deviceConfig = deviceConfig\nvar _testConfig = testConfig\n\n\nasync function displayNextStim() {\n const position = gridCoordinates.pop();\n if (position) {\n await stopRecording();\n await startRecording();\n const cell = document.createElement(\'div\');\n cell.id = \'cell\'; \n cell.style.width = `${position.width}px`;\n cell.style.height = `${position.height}px`;\n cell.style.left = `${position.x}px`; // Adjust for half of the cell width\n cell.style.top = `${position.y}px`; // Adjust for half of the cell height\n cell.style.position = \'absolute\'; // Ensure the position is set to absolute\n cell.style.transform = \'translate(-50%, -50%)\'; // Center the content within the element\n cell.style.display = \'flex\'; // Set display to flex to use flexbox properties\n cell.style.justifyContent = \'center\'; // Center horizontally\n cell.style.alignItems = \'center\'; // Center vertically\n cell.setAttribute(\'draggable\', \'false\'); // Prevent the cell itself from being draggable\n\n const stim = document.createElement(\'img\');\n const randomStimulus = shuffledImages.pop();\n stim.id = \'stim\'; \n stim.src = `${testConfig[\'dir\']}/${randomStimulus}`;\n stim.style.width = \'50%\'; // Make the image fill the cell\n stim.setAttribute(\'draggable\', \'false\'); // Prevent the image from being draggable\n\n cell.appendChild(stim);\n\n // stim.style.width = `${0.50*position.width}px`;\n // stim.style.left = `${position.x}px`;\n // stim.style.top = `${position.y}px`;\n // stim.style.position = \'absolute\'; // Ensure the position is set to absolute\n // stim.style.transform = \'translate(-50%, -50%)\'; // Center the content within the element\n var clickRate = 0\n cell.addEventListener(\'click\', () => {\n clickRate++\n if (clickRate==1){\n handleStimClick(randomStimulus, cell, stim); \n }\n });\n document.body.appendChild(cell);\n } else {\n _pageCompleted = true\n }\n}\n\nasync function handleStimClick(randomStimulus,cell,stim) {\n console.log(\'Image clicked!\');\n const timestamp = new Date().getTime();\n\n document.getElementById(\'cell\').disabled = true\n\n setTimeout(async () => {\n await stopRecording(); // Stop recording when stimulus is clicked\n const stimPosition = stim.getBoundingClientRect();\n stimPosition.x = stimPosition.x+ (stimPosition.width)/2\n stimPosition.y = stimPosition.y+ (stimPosition.height)/2\n var filename = randomStimulus.slice(0, -4) + \'_\' + stimPosition.x + \'_\' + stimPosition.y + \'_\' + timestamp\n filename = filename.replace(/\\./g, \'deci\') + \'.webm\'\n saveRecordings(filename= filename ,parentDir=store.session.get("id")); // Save the recorded audio and video\n _videoURL.push(filename)\n\n const gridCoordinatesObject = {\n x: parseFloat(cell.style.left),\n y: parseFloat(cell.style.top),\n width: parseFloat(cell.style.width),\n height: parseFloat(cell.style.height),\n stim_x:stimPosition.x,\n stim_y:stimPosition.y,\n stim_width:stimPosition.width,\n stim_height:stimPosition.height,\n };\n\n _gridCoordinates.push(gridCoordinatesObject)\n _shuffledImages.push(randomStimulus.slice(0, -4))\n document.getElementById(\'cell\').remove();\n // Delay displayNextStim by an additional 100ms\n setTimeout(() => {\n displayNextStim(); // Display the next image\n }, 200);\n\n },750); // Delay everything here by 200ms\n}\n\n\n\n<\/script>\n\n</body>\n</html>\n',document.body.appendChild(n),await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await ol(a.src)}}(n),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(n),document.getElementById("calibrationTitle").innerHTML=`<b>${subtestText[0]} Calibration Phase</b>`,document.getElementById("calibrationDescription").innerHTML=`You will see ${subtestText[1]}s pop up on the screen. Say the ${subtestText[1]} out loud <b>first</b> and then click on the ${subtestText[1]} to go to the next one.`,document.getElementById("calibrationImage").src=`https://eyetrackingdata.blob.core.windows.net/public/Images/${subtestText[1]}-calibration-explanation.gif`,await new Promise((a=>{!function t(){if(_pageCompleted){const t={assessment_type:testConfig.testname,assessment_stage:"Calibration",stimulusPosition:_gridCoordinates,stimulus:_shuffledImages,recordedVideo:_videoURL,parentDir:_parentDir,correct:1,deviceConfig:_deviceConfig,testConfig:_testConfig};e.firekit.writeTrial(t),n.remove(),function(e){!function(e){Object.keys(e).forEach((e=>{const n=Object.getOwnPropertyDescriptor(window,e);n&&n.configurable?delete window[e]:console.log(`Cannot remove ${e} from window; it may be non-configurable.`)}))}(e);document.querySelectorAll("script[data-dynamic]").forEach((e=>e.parentNode.removeChild(e)))}(tl),a()}else setTimeout(t,2e3)}()}))}function ol(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;async function sl(e,n){const a=document.createElement("div");a.innerHTML='<!DOCTYPE html>\n<html lang="en">\n<head>\n <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n</head>\n\n<style>\n \n body {\n margin: 0;\n min-height: 100vh; /* Ensure body takes the full viewport height */\n display: flex; /* Enable Flexbox */\n justify-content: center; /* Center content horizontally */\n align-items: center; /* Center content vertically */\n font-family: sans-serif;\n overflow: hidden;\n }\n\n .character {\n position: absolute;\n top: 65%;\n left: 70%;\n margin-right: -50%;\n transform: translate(-50%, -50%);\n width: 45%;\n }\n\n .speechBubble {\n border-style: solid;\n border-width: 5px;\n border-color: rgb(255, 232, 128);\n border-radius: 10px;\n text-align: center;\n padding: 5vh;\n background-color: rgb(253 246 234);\n }\n\n stim {\n position: absolute;\n height: auto;\n cursor: pointer;\n }\n\n #instruction {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n \n #confirmContainer {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n \n </style>\n\n\n<body>\n\n \x3c!-- Center Instructions Panel --\x3e\n <div id="storyContentArea">\n <img id="bg" style="object-fit: contain; position: relative;">\n <img id="char" class="character">\n <div style="position: absolute; top: 40%; right: 50%;">\n <h4 class="speechBubble" id="text"> </h4>\n </div>\n </div>\n\n \x3c!-- Audio Playing --\x3e \n <audio id="voiceover"> </audio>\n \n </body>\n\n<script data-dynamic>\n\n var counter = 0;\n\n var testConfig = store.session.get(\'testConfig\');\n\n document.body.addEventListener(\'click\', function() {\n startNextView(); // Call startNextView function whenever a click is detected \n });\n\n document.getElementById(\'voiceover\').addEventListener(\'ended\', function() {\n voiceover.currentTime = 0; // Added this so the story will automatically progress once the audio ends, not only dependent on participant clicks\n startNextView();\n })\n\n if (testConfig[\'testname\'] === \'Letter\') {\n var calibrationText = "Ah! I think my navigation system broke <br> on the way here. Could you help me fix it? </br>"\n var practiceText = "Awesome! Thank you for calibrating my <br> navigation system. We can practice reading out the </br> letter directions to Rantopia now."\n var testText = "Perfect! Let\'s enter them for real. <br> Can you read me the letter directions </br> as fast as you can?"\n var testLower = "letter";\n } else {\n var calibrationText = "Darn, the radar is completely broken. <br> Let\'s fix it together! </br>"\n var practiceText = "You are an expert engineer! <br> We can practice reading out </br> the number coordinates to Rantopia now."\n var testText = "Amazing! Let\'s enter them for real. <br> Can you read me the number coordinates </br> as fast as you can?"\n var testLower = "number";\n }\n\n function startNextView() {\n counter++;\n var char = document.getElementById(\'char\');\n var bg = document.getElementById(\'bg\');\n var text = document.getElementById(\'text\');\n var voiceover = document.getElementById(\'voiceover\');\n\n if (stage === "Introduction"){\n console.log(stage, counter);\n switch (counter) {\n case 1:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-default.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/space-ship-control.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/intro.mp3`;\n text.innerHTML = `Hi! My name is Stella. <br> It\'s always great to meet a fellow astronaut. </br>`;\n break;\n case 2:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-panicked.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/space-ship-control.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/intro2.mp3`;\n text.innerHTML = `I was doing some errands for my mom, <br> but then I got lost. </br> She\'s probably so worried about me!`;\n break;\n case 3:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-unsure.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/space-ship-control.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/intro3.mp3`;\n text.innerHTML = `Could you help me calibrate my <br> navigation system so I can get to Rantopia? </br>`;\n break;\n default:\n // Reset or end\n counter = 0; \n pageCompleted()\n }\n } else if (stage === "Calibration") {\n console.log(stage, counter);\n switch (counter) {\n case 1:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-confused.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/space-ship-control.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/${testLower}StoryCalibration.mp3`;\n text.innerHTML = calibrationText;\n break;\n default:\n // Reset or end\n counter = 0; \n pageCompleted()\n }\n } else if (stage === "Practice"){\n console.log(stage, counter);\n switch (counter) {\n case 1:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-smile.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/space-ship-control.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/${testLower}StoryPractice.mp3`;\n text.innerHTML = practiceText;\n break;\n default:\n // Reset or end\n counter = 0; \n pageCompleted()\n }\n } else if (stage === "Test"){\n console.log(stage, counter);\n switch (counter) {\n case 1:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-smile.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/purple-planet.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/${testLower}StoryTest.mp3`;\n text.innerHTML = testText;\n break;\n default:\n // Reset or end\n counter = 0; \n pageCompleted()\n }\n } else if (stage === "Ending"){\n console.log(stage, counter);\n switch (counter) {\n case 1:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-happy.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/orange-planet.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/end.mp3`;\n text.innerHTML = `We made it to Rantopia! <br> I can finish grabbing all </br> the things I need for my mom.`;\n break;\n case 2:\n char.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/astronaut-girl-bye.png`;\n bg.src = `https://eyetrackingdata.blob.core.windows.net/public/Images/orange-planet.png`;\n voiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/end2.mp3`;\n text.innerHTML = `I couldn’t have done this <br> without your help. </br> Come visit me again sometime!`;\n break;\n default:\n // Reset or end\n counter = 0; \n pageCompleted()\n }\n }\n\n // playing the voiceover \n if (voiceover.src !== ""){\n voiceover.play(); \n }\n\n }\n\n function pageCompleted(){\n const event = new Event(\'pageComplete\');\n document.dispatchEvent(event);\n }\n \n <\/script>',document.body.appendChild(a),window.stage=e,await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await rl(a.src)}}(a),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(a),startNextView(),await new Promise((e=>{document.addEventListener("pageComplete",(()=>{a.remove(),function(){e=document.body,n=e.cloneNode(!0),e.parentNode.replaceChild(n,e);var e,n;document.querySelectorAll("script[data-dynamic]").forEach((e=>{(e.textContent||e.innerText).includes("voiceover.addEventListener('ended'")||e.parentNode.removeChild(e)}))}(),e()}),{once:!0})}))}function rl(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;async function cl(){const e=document.createElement("div");e.innerHTML="\x3c!-- Scripts --\x3e\n<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3\" crossorigin=\"anonymous\">\n\n\x3c!-- CSS --\x3e\n<style>\n\nbody {\n margin: 0;\n}\n\n .column {\n float: left;\n padding: 10px;\n}\n\n.left, .right {\n width: 33%;\n}\n\n.middle {\n width: 33%;\n}\n\n.row:after {\n content: \"\";\n display: table;\n clear: both;\n}\n\n</style>\n\n\x3c!-- HTML --\x3e\n<body id=\"body\">\n <div class=\"px-4 py-5 my-5 text-center\" style=\"display: block;\">\n <h1 class=\"display-5 fw-bold\" id=\"title\"> Activity Selection Menu </h1>\n <div class=\"col-lg-6 mx-auto\">\n <p class=\"lead mt-3 mb-5\"></p>\n <h4 class=\"card-text\"> Select an activity. Click on one of the options below to continue with the activity: </h4>\n <div class=\"row gap-2\" id=\"menuButtons\">\n </div>\n </div>\n </div>\n\n \x3c!-- Audio Playing --\x3e \n <audio autoplay src=\"https://eyetrackingdata.blob.core.windows.net/public/Audios/activityMenu.mp3\"> </audio>\n\n</body>\n\n<script data-dynamic>\n\ndocument.body.addEventListener('click', function() {\n voiceover.pause();\n voiceover.currentTime = 0;; // Stop the voiceover whenever a click is detected \n});\n\n var jsonUrl = 'https://eyetrackingdata.blob.core.windows.net/public/config/tests.json';\n\n fetch(jsonUrl)\n .then(response => response.json())\n .then(data => {\n // Extract test names from the JSON data\n const testNames = Object.keys(data);\n // Create buttons dynamically based on test names\n const menuButtonsContainer = document.getElementById('menuButtons');\n const clickedTests = store.session.get('clickedTests') || [];\n testNames.forEach(testName => {\n console.log(testName)\n console.log(data[testName])\n\n const button = document.createElement('button');\n button.type = 'button';\n button.id = `button_${testName}`; \n button.className = 'btn btn-primary';\n button.textContent = testName;\n\n if (clickedTests.includes(testName)) {\n button.classList.add('btn-secondary'); // Grayish color\n button.disabled = true\n }\n\n button.addEventListener('click', () => {\n console.log(`CLICKED ${testName}`)\n // Set the selected testType\n store.session.set('testConfig', data[testName]);\n console.log(`Stored testType: ${testName}`);\n \n // Highlight the clicked button and remove highlighting from others\n const buttons = menuButtonsContainer.getElementsByTagName('button');\n for (const otherButton of buttons) {\n otherButton.classList.remove('btn-success');\n }\n\n button.classList.add('btn-success');\n // Store the clicked test name in the array\n store.session.set('clickedTests', clickedTests);\n\n });\n menuButtonsContainer.appendChild(button);\n });\n\n if ((clickedTests.length+1) >= document.querySelectorAll('button').length){\n console.log((clickedTests.length+1),document.querySelectorAll('button').length)\n store.session.set('testComplete',true)\n }\n })\n .catch(error => console.error('Error fetching JSON:', error));\n\n<\/script>\n ",document.body.appendChild(e),await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await ll(a.src)}}(e),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(e),await new Promise((n=>{document.body.addEventListener("click",(function(a){a.target.id.startsWith("button_")&&(console.log("Button clicked:",a.target.id),document.querySelectorAll("script[data-dynamic]").forEach((e=>e.parentNode.removeChild(e))),e.remove(),n())}))}))}function ll(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;var pl=4,ul=9;function dl(e,n,a){const t=document.getElementById("grid-container"),i=pl*ul;for(let o=0;o<i;o++){if("Practice"===type&&(o<ul||o>=2*ul))continue;const i=document.createElement("div"),{x:s,y:r,width:c,height:l}=e[o];i.style.width=`${c}px`,i.style.height=`${l}px`,i.style.left=`${s}px`,i.style.top=`${r}px`,i.style.position="absolute",i.style.transform="translate(-50%, -50%)",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center";const p=n[o],u=document.createElement("img");u.src=`${a.dir}/${p}`,u.style.width="50%",u.style.height="auto",i.appendChild(u),t.appendChild(i);const d=u.getBoundingClientRect();d.x=d.x+d.width/2,d.y=d.y+d.height/2;const m={x:parseFloat(i.style.left),y:parseFloat(i.style.top),width:parseFloat(i.style.width),height:parseFloat(i.style.height),stim_x:d.x,stim_y:d.y,stim_width:d.width,stim_height:d.height};_gridCoordinates.push(m),_shuffledImages.push(p.slice(0,-4))}}async function ml(){try{const e=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:60,max:60}},audio:!0});if(camera_stream=e,camera_stream&&camera_stream.active)return videoChunks=[],videoRecorder=new MediaRecorder(camera_stream),videoRecorder.ondataavailable=e=>{e.data.size>0&&videoChunks.push(e.data)},Promise.resolve(camera_stream);throw new Error("Camera stream is not active")}catch(e){return console.error("Error accessing media devices:",e),Promise.reject(e)}}async function hl(){audioChunks=[],videoChunks=[],videoRecorder.start()}async function fl(e,n,a){try{const t=await fetch(`https://us-central1-webapp-af756.cloudfunctions.net/getUploadUrlFunction?fileName=${e}&mimeType=${n}&parentDir=${a}`);if(!t.ok)throw new Error("Failed to fetch upload URL");return(await t.json()).result}catch(e){throw console.error("Error fetching upload URL:",e),e}}async function vl(e,n){try{const a=await fetch(n,{method:"PUT",headers:{"Content-Type":e.type,"Content-Length":e.size},body:e});if(!a.ok)throw new Error("Upload failed: "+a.statusText);console.log("Upload complete:",await a.text())}catch(e){console.error("Error:",e)}}var gl=4;function bl(e){0==--gl?(document.getElementById("instruction").style.display="none",document.getElementById("grid-container").style.visibility="visible",gl=4):(document.getElementById("instruction").innerHTML="<h1>"+gl+"</h1>",setTimeout((function(){bl()}),1e3))}function xl(){desktop.requestFullscreen?desktop.requestFullscreen():desktop.webkitRequestFullscreen?desktop.webkitRequestFullscreen():desktop.msRequestFullscreen&&desktop.msRequestFullscreen()}var yl=Object.freeze({__proto__:null,get countdown(){return gl},generateGridCoordinates:function(e){let n,a,t,i;if(console.log(e.screenWidth,e.screenHeight,e.screenWidthPX,e.screenHeightPX),e.screenWidth>0&&e.screenHeight>0){const t=13/pl;n=24.75/ul*(e.screenWidthPX/e.screenWidth),a=t*(e.screenHeightPX/e.screenHeight)}else{const t=.8*e.screenWidthPX,i=.8*e.screenHeightPX;n=t/ul,a=i/pl}t=n*ul,i=a*pl;const o=(e.screenWidthPX-t)/2,s=(e.screenHeightPX-i)/2,r=[];for(let e=0;e<pl;e++)for(let t=0;t<ul;t++){const i=o+t*n+n/2,c=s+e*a+a/2;r.push({x:i,y:c,width:n,height:a})}return r},generateStimulusOrder:function(e){const n=pl*ul,a=e.stimulus.slice(),t=Math.ceil(n/a.length),i=[];for(let e=0;e<t;e++){const e=a.sort((()=>Math.random()-.5));i.push(...e)}for(let e=1;e<i.length;e++)if(i[e]===i[e-1]){const n=i[e];i[e]=i[e+1],i[e+1]=n}return i.slice(0,n)},getUploadUrl:fl,giveAccess:ml,gridHeightCM:13,gridWidthCM:24.75,numCols:ul,numRows:pl,openFullscreen:xl,populateGrid:dl,saveRecordings:async function(e,n,a="video/webm"){await new Promise((e=>{videoRecorder.onstop=e,videoRecorder.stop()}));const t=new Blob(videoChunks,{type:"video/webm"});if(t.size>0){console.log("Video recorded successfully. Size:",t.size,"bytes");try{const i=await fl(e,a,n);await vl(t,i)}catch(e){console.error("Error getting video upload URL:",e)}}else console.error("No video data recorded.")},startRecording:hl,startTest:async function(){await ml(),document.getElementById("finishButton").disabled=!1,xl(),hl(),dl(gridCoordinates,shuffledImages,testConfig),bl()},stopRecording:async function(){videoRecorder.stop()},updateCountdown:bl,uploadFile:vl});async function wl(e,n){const a=document.createElement("div");a.style.position="fixed",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",await async function(e){Object.keys(e).forEach((n=>{window[n]=e[n]}))}(yl),console.log("countdown",countdown),a.innerHTML='<!DOCTYPE html>\n<html lang="en">\n<head>\n <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>Image and Audio Recording</title>\n\n \x3c!-- <script data-dynamic src="./RAN.js"><\/script> --\x3e\n</head>\n\n<style>\n \n body {\n margin: 0;\n min-height: 100vh; /* Ensure body takes the full viewport height */\n display: flex; /* Enable Flexbox */\n justify-content: center; /* Center content horizontally */\n align-items: center; /* Center content vertically */\n font-family: sans-serif;\n }\n\n stim {\n position: absolute;\n height: auto;\n cursor: pointer;\n }\n\n #instruction {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n \n #confirmContainer {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n</style>\n\n\n<body>\n\n <div id="grid-container" style="position: absolute; width: 100%; height: 100%; visibility: hidden;"></div>\n\n \x3c!-- Center Instructions Panel --\x3e\n <div id="instructionsContentArea">\n <div class="row gap-2" id="instruction">\n <div class="col">\n <div class="card" style="width:45rem; height:39rem">\n <div class="card-body" id="cardthing" style="text-align: center;">\n <h3 class="card-title" id="instructionTitle"></h3>\n <h4 class="card-text" id="instructionSubtitle"></h4>\n <h4 class="card-text" id="instructionDescription"></h4>\n <div style="text-align: center; margin-bottom: 3vh;">\n <img id="explanationGif" src="https://eyetrackingdata.blob.core.windows.net/public/Images/squareAddition_white.png" width="350px">\n </div>\n \x3c!-- <div class="btn-group" role="group" aria-label="Basic example" style="margin-bottom: 2vh;"> --\x3e\n \x3c!-- <button type="button" class="btn btn-primary" id="giveAccessButton" onclick="giveAccess()">Give Access to Mic/Camera</button> --\x3e\n \x3c!-- <br> --\x3e\n <button type="button" class="btn btn-primary" id="startTestButton" onclick="startTest()">Start</button>\n </div>\n </div>\n </div>\n </div>\n </div> \n \n </div>\n \n \x3c!-- Audio Playing --\x3e \n <audio autoplay id="voiceover"> </audio>\n \n \x3c!-- Confirm Button --\x3e\n <div class="row gap-2" id="confirmContainer" style="display: none;">\n <div class="card-body" style="text-align: center;">\n <h3> <span id="capName"></span> Test Complete </h3>\n <button type="button" class="btn btn-primary" id="confirmButton">Back to Menu</button>\n </div>\n </div>\n\n \x3c!-- Finish Button --\x3e\n <div id="finishButtonContainer" style="position: fixed; bottom: 10px; right: 10px; z-index: 1;">\n <button type="button" class="btn btn-primary" id="finishButton" disabled>Finish</button>\n </div>\n\n<script data-dynamic>\n\nvar deviceConfig = store.session.get(\'deviceConfig\')\n// var deviceConfig = {screenWidth: 29, screenHeight: 16.2, screenWidthPX: 960, screenHeightPX: 540, webcamHeight: 0.5}\nvar testConfig = store.session.get(\'testConfig\')\n// var testConfig = {dir: "https://eyetrackingdata.blob.core.windows.net/public/assets/Letter",\n// stimulus : ["C.svg", "D.svg", "H.svg", "K.svg", "N.svg", "O.svg", "R.svg", "S.svg", "V.svg", "Z.svg"],\n// sizecm: 2}\n\nif (testConfig[\'testname\'] === \'Letter\') {\n var subtestText = [\'Letter\', \'letter\']\n} else {\n var subtestText = [\'Number\', \'number\']\n}\n\nvar voiceover = document.getElementById(\'voiceover\');\nvoiceover.src = `https://eyetrackingdata.blob.core.windows.net/public/Audios/${subtestText[1]}Calibration.mp3`;\n\ndocument.body.addEventListener(\'click\', function() {\n voiceover.pause();\n voiceover.currentTime = 0;; // Stop the voiceover whenever a click is detected \n});\n\nvar desktop = document.documentElement;\nvar camera_stream;\nvar videoRecorder;\nvar audioChunks = [];\nvar videoChunks = [];\n\nvar clickedTests = store.session.get(\'clickedTests\') || [];\nif (type!==\'Practice\') {\nclickedTests.push(testConfig[\'testname\'])\n}\n\nstore.session.set(\'clickedTests\',clickedTests)\n\nvar gridCoordinates = generateGridCoordinates(deviceConfig)\nvar shuffledImages = generateStimulusOrder(testConfig)\n \nvar _gridCoordinates = []\n// gridCoordinates\nvar _shuffledImages = []\n// shuffledImages.map(filename => filename.split(\'.\')[0]);\nvar _parentDir = store.session.get("id")\nvar _videoURL = \'\'\nvar _deviceConfig = deviceConfig\nvar _testConfig = testConfig\n\n// async function finishTest() {\n// console.log(\'Test Finished\');\n// // Remove the clicked image\n// await stopRecording(); // Stop recording when stimulus is clicked\n// const timestamp = new Date().getTime();\n// document.getElementById("finishButton").disabled=true\n \n// var filename = \'RAN\' + \'_\' + testConfig[\'testname\'] + \'_\' + timestamp + \'.webm\'\n// _videoURL.push(filename)\n\n// document.getElementById("confirmContainer").style.display = "block"\n// document.getElementById("grid-container").style.display = "none"\n// document.getElementById("finishButtonContainer").style.display = "none"\n\n\n// if (type!==\'Practice\') {\n// try{\n// await saveRecordings(filename= filename ,parentDir=store.session.get("id")); // Save the recorded audio and video\n// } catch (error) {\n// console.error(\'Error in saveRecordings:\', error);\n// }\n// }\n\n// }\n\n\n<\/script>\n\n</body>\n</html>\n';const t=qc;document.body.appendChild(a),window.type=e,await async function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=n[e];a.src&&await kl(a.src)}}(a),function(e){const n=e.getElementsByTagName("script");for(let e=0;e<n.length;e++){const a=document.createElement("script");a.text=n[e].text,document.head.appendChild(a).parentNode.removeChild(a)}}(a),function(e){document.getElementById("instructionTitle").innerHTML=`<b>${subtestText[0]} ${e} Phase</b>`,document.getElementById("explanationGif").src=`https://eyetrackingdata.blob.core.windows.net/public/Images/${subtestText[1]}-${e.toLowerCase()}-reading-order.gif`;var n=document.getElementById("voiceover");if("Practice"===e){document.getElementById("instructionSubtitle").innerHTML="Let's do some practice!",document.getElementById("instructionDescription").innerHTML=`You’re going to see a row of ${subtestText[1]}s. <span id="distance-span"> </span> </h4>\n Read them out loud as fast as you can without making mistakes. <span id="distance-span"> </span> </h4>\n Remember to read like you normally do by going from <b> left to right. </b> <span id="distance-span"> </span> </h4>\n Click the "Finish" button (bottom right) when you are done. <span id="distance-span"> </span> </h4>`,n.src=`https://eyetrackingdata.blob.core.windows.net/public/Audios/${subtestText[1]}${e}.mp3`}else{document.getElementById("instructionSubtitle").innerHTML="Let’s start for real now.",document.getElementById("instructionDescription").innerHTML=`Read the ${subtestText[1]}s as fast as you can without making mistakes. Remember to read in the right direction. <span id="distance-span"> </span> </h4>\n Click the "Finish" button (bottom right) when you are done.<span id="distance-span"> </span> </h4>`,n.src=`https://eyetrackingdata.blob.core.windows.net/public/Audios/${subtestText[1]}${e}.mp3`}}(e),await new Promise((e=>{document.body.addEventListener("click",(async function(i){if("finishButton"===i.target.id){console.log("Button clicked:",i.target.id),a.innerHTML=t,(s=a).style.position="",s.style.top="",s.style.left="",s.style.width="",s.style.height="",await async function(){console.log("Test Finished");const e=(new Date).getTime();await stopRecording();var n="RAN_"+testConfig.testname+"_"+e+".webm";_videoURL=n,console.log(o.session.get("id"));try{await saveRecordings(n,o.session.get("id"))}catch(e){console.error("Error in saveRecordings:",e)}}();const r={assessment_type:testConfig.testname,assessment_stage:"Test",stimulusPosition:_gridCoordinates,stimulus:_shuffledImages,recordedVideo:_videoURL,parentDir:_parentDir,correct:1,deviceConfig:_deviceConfig,testConfig:_testConfig};n.firekit.writeTrial(r),a.remove(),function(e){!function(e){Object.keys(e).forEach((e=>{const n=Object.getOwnPropertyDescriptor(window,e);n&&n.configurable?delete window[e]:console.log(`Cannot remove ${e} from window; it may be non-configurable.`)}))}(e);document.querySelectorAll("script[data-dynamic]").forEach((e=>e.parentNode.removeChild(e)))}(yl),e()}var s}))}))}function kl(e){return new Promise(((n,a)=>{const t=document.createElement("script");t.src=e,t.onload=n,t.onerror=a,document.head.appendChild(t)}))}window.store=o;class _l{constructor(e,n,a,t){this.gameParams=n,this.userParams=a,this.firekit=e,this.displayElement=t,this.jsPsych=null}async init(){}async run(){this.gameParams.consent&&await Mc(),await this.firekit.startRun();const e=await(async(e,n,a,t)=>{const i=yo(yo({...n,...a},wo),ko),{userMetadata:o={},audioFeedback:s,grade:r,language:c=Ds.language,skipInstructions:l,practiceCorpus:p,stimulusCorpus:u,sequentialPractice:d,sequentialStimulus:m,buttonLayout:h,numberOfTrials:f,storyCorpus:v,taskName:g,stimulusBlocks:b,numOfPracticeTrials:x,storyOption:y,keyHelpers:w}=i;"en"!==c&&Ds.changeLanguage(c);const k={userMetadata:{...o,grade:r},audioFeedback:s||"neutral",skipInstructions:l??!0,startTime:new Date,firekit:e,displayElement:t||null,practiceCorpus:p??"math-item-bank-practice-pz",stimulusCorpus:u??"math-item-bank-pz",sequentialPractice:d??!0,sequentialStimulus:m??!0,buttonLayout:h||"default",numberOfTrials:f??10,task:g??"egma-math",stimulusBlocks:b??3,numOfPracticeTrials:x??2,storyOption:y,story:zc(y,r),keyHelpers:w??!0};console.log("this is grade:",r),console.log("this is storyOption:",y);const _=Object.fromEntries(Object.entries(n).map((([e,n])=>[e,k[e]??n])));return await k.firekit.updateTaskParams(_),null!==k.pid&&await k.firekit.updateUser({assessmentPid:k.pid,...o}),k})(this.firekit,this.gameParams,this.userParams,this.displayElement);o.session.set("config",e),await Yc(e),e.story&&await sl("Introduction");let n=!1;do{await cl(),e.story&&await sl("Calibration"),await il(e),e.story&&await sl("Practice"),await wl("Practice",e),e.story&&await sl("Test"),await wl("Test",e),n="true"===sessionStorage.getItem("testComplete")}while(!n);e.story&&await sl("Ending")}}export{_l as default};
11
+ //# sourceMappingURL=index.2ac3e6e4.js.map