UNPKG

jspsych

Version:

Behavioral experiments in a browser

1 lines 85.1 kB
var jsPsychModule=function(e){"use strict";function t(e){return t="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},t(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function l(){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}}function u(e,t,r){return u=l()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&s(i,r.prototype),i},u.apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return u(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)},c(e)}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw i}}return a}(e,t)||p(e,t)||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 f(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function v(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))}!function(e){var r=function(e){var r,n=Object.prototype,i=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),o=new L(n||[]);return a._invoke=function(e,t,r){var n=d;return function(i,a){if(n===p)throw new Error("Generator is already running");if(n===m){if("throw"===i)throw a;return I()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=P(o,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var l=h(e,t,r);if("normal"===l.type){if(n=r.done?m:f,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=m,r.method="throw",r.arg=l.arg)}}}(e,r,o),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",f="suspendedYield",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,o,(function(){return this}));var _=Object.getPrototypeOf,k=_&&_(_(A([])));k&&k!==n&&i.call(k,o)&&(w=k);var x=b.prototype=v.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,r){function n(a,o,s,l){var u=h(e[a],e,o);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"===t(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):r.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,l)}))}l(u.arg)}var a;this._invoke=function(e,t){function i(){return new r((function(r,i){n(e,t,r,i)}))}return a=a?a.then(i,i):i()}}function P(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,P(e,t),"throw"===t.method))return y;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var i=h(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,y;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,y):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function A(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}return{next:I}}function I(){return{value:r,done:!0}}return g.prototype=b,u(x,"constructor",b),u(b,"constructor",g),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},T(j.prototype),u(j.prototype,s,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,i,a){void 0===a&&(a=Promise);var o=new j(c(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},T(x),u(x,l,"Generator"),u(x,o,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=A,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return s.type="throw",s.arg=e,t.next=n,i&&(t.method="next",t.arg=r),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),y}},e}(e.exports);try{regeneratorRuntime=r}catch(e){"object"===("undefined"==typeof globalThis?"undefined":t(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}({exports:{}});var g=function(e){var t=new Set;do{var r,n=y(Reflect.ownKeys(e));try{for(n.s();!(r=n.n()).done;){var i=r.value;t.add([e,i])}}catch(e){n.e(e)}finally{n.f()}}while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return t},b=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.include,i=r.exclude,a=function(e){var t=function(t){return"string"==typeof t?e===t:t.test(e)};return n?n.some(t):!i||!i.some(t)},o=y(g(e.constructor.prototype));try{for(o.s();!(t=o.n()).done;){var s=d(t.value,2),l=s[0],u=s[1];if("constructor"!==u&&a(u)){var c=Reflect.getOwnPropertyDescriptor(l,u);c&&"function"==typeof c.value&&(e[u]=e[u].bind(e))}}}catch(e){o.e(e)}finally{o.f()}return e},w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(u,e);var t,n,a=(t=u,n=l(),function(){var e,r=o(t);if(n){var i=o(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return h(this,e)});function u(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"The global `jsPsych` variable is no longer available in jsPsych v7.";return r(this,u),(e=a.call(this,"".concat(t," Please follow the migration guide at https://www.jspsych.org/7.0/support/migration-v7/ to update your experiment."))).name="MigrationError",e}return i(u)}(c(Error));function _(e){return f(new Set(e))}function k(e){if(!e)return e;var r;if(Array.isArray(e)){r=[];var n,i=y(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;r.push(k(a))}}catch(e){i.e(e)}finally{i.f()}return r}if("object"===t(e)&&null!==e){for(var o in r={},e)e.hasOwnProperty(o)&&(r[o]=k(e[o]));return r}return e}window.jsPsych={get init(){throw new w("`jsPsych.init()` was replaced by `initJsPsych()` in jsPsych v7.")},get data(){throw new w},get randomization(){throw new w},get turk(){throw new w},get pluginAPI(){throw new w},get ALL_KEYS(){throw new w('jsPsych.ALL_KEYS was replaced by the "ALL_KEYS" string in jsPsych v7.')},get NO_KEYS(){throw new w('jsPsych.NO_KEYS was replaced by the "NO_KEYS" string in jsPsych v7.')}};var x=Object.freeze({__proto__:null,unique:_,deepCopy:k,deepMerge:function e(r,n){var i={};for(var a in r)r.hasOwnProperty(a)&&("object"===t(r[a])&&n.hasOwnProperty(a)?i[a]=e(r[a],n[a]):i[a]=r[a]);for(var o in n)n.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&"object"===t(n[o])?i[o]=e(i[o],n[o]):i[o]=n[o]);return i}}),T=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r(this,e),this.values=t}return i(e,[{key:"sum",value:function(){var e,t=0,r=y(this.values);try{for(r.s();!(e=r.n()).done;){t+=e.value}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"mean",value:function(){return this.sum()/this.count()}},{key:"median",value:function(){if(0!==this.values.length){var e=this.values.slice(0).sort((function(e,t){return e-t})),t=Math.floor(e.length/2);return e.length%2==0?(e[t]+e[t-1])/2:e[t]}}},{key:"min",value:function(){return Math.min.apply(null,this.values)}},{key:"max",value:function(){return Math.max.apply(null,this.values)}},{key:"count",value:function(){return this.values.length}},{key:"variance",value:function(){var e,t=this.mean(),r=0,n=y(this.values);try{for(n.s();!(e=n.n()).done;){var i=e.value;r+=Math.pow(i-t,2)}}catch(e){n.e(e)}finally{n.f()}return r/(this.values.length-1)}},{key:"sd",value:function(){var e=this.variance();return Math.sqrt(e)}},{key:"frequencies",value:function(){var e,t={},r=y(this.values);try{for(r.s();!(e=r.n()).done;){var n=e.value;void 0===t[n]?t[n]=1:t[n]++}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"all",value:function(e){var t,r=y(this.values);try{for(r.s();!(t=r.n()).done;){if(!e(t.value))return!1}}catch(e){r.e(e)}finally{r.f()}return!0}},{key:"subset",value:function(t){var r,n=[],i=y(this.values);try{for(i.s();!(r=i.n()).done;){var a=r.value;t(a)&&n.push(a)}}catch(e){i.e(e)}finally{i.f()}return new e(n)}}]),e}();var j,P=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r(this,e),this.trials=t}return i(e,[{key:"push",value:function(e){return this.trials.push(e),this}},{key:"join",value:function(e){return this.trials=this.trials.concat(e.values()),this}},{key:"top",value:function(){return this.trials.length<=1?this:new e([this.trials[this.trials.length-1]])}},{key:"first",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(t<1)throw"You must query with a positive nonzero integer. Please use a\n different value for n.";return 0===this.trials.length?new e:(t>this.trials.length&&(t=this.trials.length),new e(this.trials.slice(0,t)))}},{key:"last",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(t<1)throw"You must query with a positive nonzero integer. Please use a\n different value for n.";return 0===this.trials.length?new e:(t>this.trials.length&&(t=this.trials.length),new e(this.trials.slice(this.trials.length-t,this.trials.length)))}},{key:"values",value:function(){return this.trials}},{key:"count",value:function(){return this.trials.length}},{key:"readOnly",value:function(){return new e(k(this.trials))}},{key:"addToAll",value:function(e){var t,r=y(this.trials);try{for(r.s();!(t=r.n()).done;){var n=t.value;Object.assign(n,e)}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"addToLast",value:function(e){return 0!=this.trials.length&&Object.assign(this.trials[this.trials.length-1],e),this}},{key:"filter",value:function(t){var r;r=Array.isArray(t)?k(t):k([t]);var n,i=[],a=y(this.trials);try{for(a.s();!(n=a.n()).done;){var o,s=n.value,l=!1,u=y(r);try{for(u.s();!(o=u.n()).done;){for(var c=o.value,h=!0,d=0,f=Object.keys(c);d<f.length;d++){var p=f[d];void 0!==s[p]&&s[p]===c[p]||(h=!1)}if(h){l=!0;break}}}catch(e){u.e(e)}finally{u.f()}l&&i.push(s)}}catch(e){a.e(e)}finally{a.f()}return new e(i)}},{key:"filterCustom",value:function(t){return new e(this.trials.filter(t))}},{key:"filterColumns",value:function(t){return new e(this.trials.map((function(e){return Object.fromEntries(t.filter((function(t){return t in e})).map((function(t){return[t,e[t]]})))})))}},{key:"select",value:function(e){var t,r=[],n=y(this.trials);try{for(n.s();!(t=n.n()).done;){var i=t.value;void 0!==i[e]&&r.push(i[e])}}catch(e){n.e(e)}finally{n.f()}return new T(r)}},{key:"ignore",value:function(t){Array.isArray(t)||(t=[t]);var r,n=k(this.trials),i=y(n);try{for(i.s();!(r=i.n()).done;){var a,o=r.value,s=y(t);try{for(s.s();!(a=s.n()).done;){delete o[a.value]}}catch(e){s.e(e)}finally{s.f()}}}catch(e){i.e(e)}finally{i.f()}return new e(n)}},{key:"uniqueNames",value:function(){var e,t=[],r=y(this.trials);try{for(r.s();!(e=r.n()).done;)for(var n=e.value,i=0,a=Object.keys(n);i<a.length;i++){var o=a[i];t.includes(o)||t.push(o)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"csv",value:function(){return function(e){var r,n="object"!=t(e)?JSON.parse(e):e,i="",a="",o=[],s=y(n);try{for(s.s();!(r=s.n()).done;){var l=r.value;for(var u in l){var c=u+"";c='"'+c.replace(/"/g,'""')+'",',o.includes(u)||(o.push(u),i+=c)}}}catch(e){s.e(e)}finally{s.f()}a+=(i=i.slice(0,-1))+"\r\n";var h,d=y(n);try{for(d.s();!(h=d.n()).done;){var f=h.value;i="";var p,m=y(o);try{for(m.s();!(p=m.n()).done;){var v=p.value,g=void 0===f[v]?"":f[v];"object"==t(g)&&(g=JSON.stringify(g)),i+='"'+(g+"").replace(/"/g,'""')+'",'}}catch(e){m.e(e)}finally{m.f()}a+=(i=i.slice(0,-1))+"\r\n"}}catch(e){d.e(e)}finally{d.f()}return a}(this.trials)}},{key:"json",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?JSON.stringify(this.trials,null,"\t"):JSON.stringify(this.trials)}},{key:"localSave",value:function(e,t){var r;if("json"===(e=e.toLowerCase()))r=this.json();else{if("csv"!==e)throw new Error('Invalid format specified for localSave. Must be "json" or "csv".');r=this.csv()}!function(e,t){var r=new Blob([e],{type:"text/plain"}),n="";n=void 0!==window.webkitURL?window.webkitURL.createObjectURL(r):window.URL.createObjectURL(r);var i=document.createElement("a");i.id="jspsych-download-as-text-link",i.style.display="none",i.download=t,i.href=n,i.click()}(r,t)}}]),e}(),E=function(){function e(t){r(this,e),this.jsPsych=t,this.dataProperties={},this.reset()}return i(e,[{key:"reset",value:function(){this.allData=new P,this.interactionData=new P}},{key:"get",value:function(){return this.allData}},{key:"getInteractionData",value:function(){return this.interactionData}},{key:"write",value:function(e){var t=this.jsPsych.getProgress(),r=this.jsPsych.getCurrentTrial(),n={trial_type:r.type.info.name,trial_index:t.current_trial_global,time_elapsed:this.jsPsych.getTotalTime(),internal_node_id:this.jsPsych.getCurrentTimelineNodeID()};this.allData.push(Object.assign(Object.assign(Object.assign(Object.assign({},e),r.data),n),this.dataProperties))}},{key:"addProperties",value:function(e){this.allData.addToAll(e),this.dataProperties=Object.assign({},this.dataProperties,e)}},{key:"addDataToLastTrial",value:function(e){this.allData.addToLast(e)}},{key:"getDataByTimelineNode",value:function(e){return this.allData.filterCustom((function(t){return t.internal_node_id.slice(0,e.length)===e}))}},{key:"getLastTrialData",value:function(){return this.allData.top()}},{key:"getLastTimelineData",value:function(){var e=this.getLastTrialData().select("internal_node_id").values[0];if(void 0===e)return new P;var t=e.substr(0,e.lastIndexOf("-"));return this.getDataByTimelineNode(t)}},{key:"displayData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"json";"json"!=(e=e.toLowerCase())&&"csv"!=e&&(console.log("Invalid format declared for displayData function. Using json as default."),e="json");var t="json"===e?this.allData.json(!0):this.allData.csv(),r=this.jsPsych.getDisplayElement();r.innerHTML='<pre id="jspsych-data-display"></pre>',document.getElementById("jspsych-data-display").textContent=t}},{key:"urlVariables",value:function(){return void 0===this.query_string&&(this.query_string=function(){for(var e=window.location.search.substr(1).split("&"),t={},r=0;r<e.length;++r){var n=e[r].split("=",2);1==n.length?t[n[0]]="":t[n[0]]=decodeURIComponent(n[1].replace(/\+/g," "))}return t}()),this.query_string}},{key:"getURLVariable",value:function(e){return this.urlVariables()[e]}},{key:"createInteractionListeners",value:function(){var e=this;window.addEventListener("blur",(function(){var t={event:"blur",trial:e.jsPsych.getProgress().current_trial_global,time:e.jsPsych.getTotalTime()};e.interactionData.push(t),e.jsPsych.getInitSettings().on_interaction_data_update(t)})),window.addEventListener("focus",(function(){var t={event:"focus",trial:e.jsPsych.getProgress().current_trial_global,time:e.jsPsych.getTotalTime()};e.interactionData.push(t),e.jsPsych.getInitSettings().on_interaction_data_update(t)}));var t=function(){var t={event:document.isFullScreen||document.webkitIsFullScreen||document.mozIsFullScreen||document.fullscreenElement?"fullscreenenter":"fullscreenexit",trial:e.jsPsych.getProgress().current_trial_global,time:e.jsPsych.getTotalTime()};e.interactionData.push(t),e.jsPsych.getInitSettings().on_interaction_data_update(t)};document.addEventListener("fullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("webkitfullscreenchange",t)}},{key:"_customInsert",value:function(e){this.allData=new P(e)}},{key:"_fullreset",value:function(){this.reset(),this.dataProperties={}}}]),e}(),O=function(){function e(){var t=this;r(this,e),this.hardwareConnected=!1,document.addEventListener("jspsych-activate",(function(e){t.hardwareConnected=!0}))}return i(e,[{key:"hardware",value:function(e){var t=new CustomEvent("jspsych",{detail:e});document.dispatchEvent(t)}}]),e}(),L=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;r(this,e),this.getRootElement=t,this.areResponsesCaseSensitive=n,this.minimumValidRt=i,this.listeners=new Set,this.heldKeys=new Set,this.areRootListenersRegistered=!1,b(this),this.registerRootListeners()}return i(e,[{key:"registerRootListeners",value:function(){if(!this.areRootListenersRegistered){var e=this.getRootElement();e&&(e.addEventListener("keydown",this.rootKeydownListener),e.addEventListener("keyup",this.rootKeyupListener),this.areRootListenersRegistered=!0)}}},{key:"rootKeydownListener",value:function(e){for(var t=0,r=Array.from(this.listeners);t<r.length;t++){(0,r[t])(e)}this.heldKeys.add(this.toLowerCaseIfInsensitive(e.key))}},{key:"toLowerCaseIfInsensitive",value:function(e){return this.areResponsesCaseSensitive?e:e.toLowerCase()}},{key:"rootKeyupListener",value:function(e){this.heldKeys.delete(this.toLowerCaseIfInsensitive(e.key))}},{key:"isResponseValid",value:function(e,t,r){return!(!t&&this.heldKeys.has(r))&&("ALL_KEYS"===e||"NO_KEYS"!==e&&e.includes(r))}},{key:"getKeyboardResponse",value:function(e){var t=this,r=e.callback_function,n=e.valid_responses,i=void 0===n?"ALL_KEYS":n,a=e.rt_method,o=void 0===a?"performance":a,s=e.persist,l=e.audio_context,u=e.audio_context_start_time,c=e.allow_held_key,h=void 0!==c&&c,d=e.minimum_valid_rt,f=void 0===d?this.minimumValidRt:d;"performance"!==o&&"audio"!==o&&(console.log('Invalid RT method specified in getKeyboardResponse. Defaulting to "performance" method.'),o="performance");var p="performance"===o?performance.now():1e3*u;this.registerRootListeners(),this.areResponsesCaseSensitive||"string"==typeof i||(i=i.map((function(e){return e.toLowerCase()})));var m=function e(n){var a=Math.round(("performance"==o?performance.now():1e3*l.currentTime)-p);if(!(a<f)){var u=t.toLowerCaseIfInsensitive(n.key);t.isResponseValid(i,h,u)&&(n.preventDefault(),s||t.cancelKeyboardResponse(e),r({key:u,rt:a}))}};return this.listeners.add(m),m}},{key:"cancelKeyboardResponse",value:function(e){this.listeners.delete(e)}},{key:"cancelAllKeyboardResponses",value:function(){this.listeners.clear()}},{key:"compareKeys",value:function(e,t){if(!("string"!=typeof e&&null!==e||"string"!=typeof t&&null!==t))return"string"==typeof e&&"string"==typeof t?this.areResponsesCaseSensitive?e===t:e.toLowerCase()===t.toLowerCase():null===e&&null===t;console.error("Error in jsPsych.pluginAPI.compareKeys: arguments must be key strings or null.")}}]),e}();e.ParameterType=void 0,(j=e.ParameterType||(e.ParameterType={}))[j.BOOL=0]="BOOL",j[j.STRING=1]="STRING",j[j.INT=2]="INT",j[j.FLOAT=3]="FLOAT",j[j.FUNCTION=4]="FUNCTION",j[j.KEY=5]="KEY",j[j.KEYS=6]="KEYS",j[j.SELECT=7]="SELECT",j[j.HTML_STRING=8]="HTML_STRING",j[j.IMAGE=9]="IMAGE",j[j.AUDIO=10]="AUDIO",j[j.VIDEO=11]="VIDEO",j[j.OBJECT=12]="OBJECT",j[j.COMPLEX=13]="COMPLEX",j[j.TIMELINE=14]="TIMELINE";var A={data:{type:e.ParameterType.OBJECT,pretty_name:"Data",default:{}},on_start:{type:e.ParameterType.FUNCTION,pretty_name:"On start",default:function(){}},on_finish:{type:e.ParameterType.FUNCTION,pretty_name:"On finish",default:function(){}},on_load:{type:e.ParameterType.FUNCTION,pretty_name:"On load",default:function(){}},post_trial_gap:{type:e.ParameterType.INT,pretty_name:"Post trial gap",default:null},css_classes:{type:e.ParameterType.STRING,pretty_name:"Custom CSS classes",default:null},simulation_options:{type:e.ParameterType.COMPLEX,default:null}},I=[e.ParameterType.AUDIO,e.ParameterType.IMAGE,e.ParameterType.VIDEO],S=function(){function t(e,n){r(this,t),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}return i(t,[{key:"getVideoBuffer",value:function(e){return e.startsWith("blob:")&&(this.video_buffers[e]=e),this.video_buffers[e]}},{key:"initAudio",value:function(){this.context=this.useWebaudio?this.webaudioContext:null}},{key:"audioContext",value:function(){return null!==this.context&&"running"!==this.context.state&&this.context.resume(),this.context}},{key:"getAudioBuffer",value:function(e){var t=this;return new Promise((function(r,n){void 0===t.audio_buffers[e]||"tmp"==t.audio_buffers[e]?t.preloadAudio([e],(function(){r(t.audio_buffers[e])}),(function(){}),(function(e){n(e.error)})):r(t.audio_buffers[e])}))}},{key:"preloadAudio",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(e){};e=_(e.flat());var a=0;if(0!=e.length){var o,s=function(o){var s=new XMLHttpRequest;s.open("GET",o,!0),s.responseType="arraybuffer",s.onload=function(){t.context.decodeAudioData(s.response,(function(i){t.audio_buffers[o]=i,a++,n(o),a==e.length&&r()}),(function(e){i({source:o,error:e})}))},s.onerror=function(e){var t=e;404==s.status&&(t="404"),i({source:o,error:t})},s.onloadend=function(e){404==s.status&&i({source:o,error:"404"})},s.send(),t.preload_requests.push(s)},l=function(o){var s=new Audio;s.addEventListener("canplaythrough",(function i(){t.audio_buffers[o]=s,a++,n(o),a==e.length&&r(),s.removeEventListener("canplaythrough",i)})),s.addEventListener("error",(function e(t){i({source:s.src,error:t}),s.removeEventListener("error",e)})),s.addEventListener("abort",(function e(t){i({source:s.src,error:t}),s.removeEventListener("abort",e)})),s.src=o,t.preload_requests.push(s)},u=y(e);try{for(u.s();!(o=u.n()).done;){var c=o.value;void 0!==this.audio_buffers[c]?(a++,n(c),a==e.length&&r()):(this.audio_buffers[c]="tmp",null!==this.audioContext()?s(c):l(c))}}catch(e){u.e(e)}finally{u.f()}}else r()}},{key:"preloadImages",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(e){};e=_(e.flat());var a=0;if(0!==e.length)for(var o=function(o){var s=new Image,l=e[o];s.onload=function(){a++,n(l),a===e.length&&r()},s.onerror=function(e){i({source:l,error:e})},s.src=l,t.img_cache[l]=s,t.preload_requests.push(s)},s=0;s<e.length;s++)o(s);else r()}},{key:"preloadVideo",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(e){};e=_(e.flat());var a=0;if(0!==e.length){var o,s=y(e);try{var l=function(){var s=o.value,l=t.video_buffers,u=new XMLHttpRequest;u.open("GET",s,!0),u.responseType="blob",u.onload=function(){if(200===u.status||0===u.status){var t=u.response;l[s]=URL.createObjectURL(t),a++,n(s),a===e.length&&r()}},u.onerror=function(e){var t=e;404==u.status&&(t="404"),i({source:s,error:t})},u.onloadend=function(e){404==u.status&&i({source:s,error:"404"})},u.send(),t.preload_requests.push(u)};for(s.s();!(o=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}}else r()}},{key:"getAutoPreloadList",value:function(t){var r=this,n=Object.fromEntries(I.map((function(e){return[e,new Set]})));return function e(t,i){var a,o,s,l;if(void 0!==t.timeline){var u,c=y(t.timeline);try{for(c.s();!(u=c.n()).done;){e(u.value,null!==(a=t.type)&&void 0!==a?a:i)}}catch(e){c.e(e)}finally{c.f()}}else if(null===(s=null!==(o=t.type)&&void 0!==o?o:i)||void 0===s?void 0:s.info){var h=(null!==(l=t.type)&&void 0!==l?l:i).info,f=h.name,p=h.parameters;r.preloadMap.has(f)||r.preloadMap.set(f,Object.fromEntries(Object.entries(p).filter((function(e){var t=d(e,2);t[0];var r=t[1],n=r.type,i=r.preload;return I.includes(n)&&(null==i||i)})).map((function(e){var t=d(e,2);return[t[0],t[1].type]}))));for(var m=0,v=Object.entries(r.preloadMap.get(f));m<v.length;m++){var g=d(v[m],2),b=g[0],w=g[1],_=t[b],k=n[w];if("string"==typeof _)k.add(_);else if(Array.isArray(_)){var x,T=y(_.flat());try{for(T.s();!(x=T.n()).done;){var j=x.value;"string"==typeof j&&k.add(j)}}catch(e){T.e(e)}finally{T.f()}}}}}({timeline:t}),{images:f(n[e.ParameterType.IMAGE]),audio:f(n[e.ParameterType.AUDIO]),video:f(n[e.ParameterType.VIDEO])}}},{key:"cancelPreloads",value:function(){var e,t=y(this.preload_requests);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.onload=function(){},r.onerror=function(){},r.oncanplaythrough=function(){},r.onabort=function(){}}}catch(e){t.e(e)}finally{t.f()}this.preload_requests=[]}},{key:"initializeMicrophoneRecorder",value:function(e){var t=new MediaRecorder(e);this.microphone_recorder=t}},{key:"getMicrophoneRecorder",value:function(){return this.microphone_recorder}},{key:"initializeCameraRecorder",value:function(e,t){this.camera_stream=e;var r=new MediaRecorder(e,t);this.camera_recorder=r}},{key:"getCameraStream",value:function(){return this.camera_stream}},{key:"getCameraRecorder",value:function(){return this.camera_recorder}}]),t}(),M=function(){function e(t,n){r(this,e),this.getDisplayContainerElement=t,this.setJsPsychTimeout=n}return i(e,[{key:"dispatchEvent",value:function(e){this.getDisplayContainerElement().dispatchEvent(e)}},{key:"keyDown",value:function(e){this.dispatchEvent(new KeyboardEvent("keydown",{key:e}))}},{key:"keyUp",value:function(e){this.dispatchEvent(new KeyboardEvent("keyup",{key:e}))}},{key:"pressKey",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r>0?this.setJsPsychTimeout((function(){t.keyDown(e),t.keyUp(e)}),r):(this.keyDown(e),this.keyUp(e))}},{key:"clickTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t>0?this.setJsPsychTimeout((function(){e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0}))}),t):(e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0})))}},{key:"fillTextInput",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;r>0?this.setJsPsychTimeout((function(){e.value=t}),r):e.value=t}},{key:"getValidKey",value:function(e){var t,r=["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"," "];if("NO_KEYS"==e)t=null;else if("ALL_KEYS"==e)t=r[Math.floor(Math.random()*r.length)];else{var n=e.flat();t=n[Math.floor(Math.random()*n.length)]}return t}},{key:"mergeSimulationData",value:function(e,t){return Object.assign(Object.assign({},e),null==t?void 0:t.data)}},{key:"ensureSimulationDataConsistency",value:function(e,t){if(t.rt&&(t.rt=Math.round(t.rt)),e.trial_duration&&t.rt&&t.rt>e.trial_duration&&(t.rt=null,t.response&&(t.response=null),t.correct&&(t.correct=!1)),e.choices&&"NO_KEYS"==e.choices&&(t.rt&&(t.rt=null),t.response&&(t.response=null)),e.allow_response_before_complete&&e.sequence_reps&&e.frame_time){var r=e.sequence_reps*e.frame_time*e.stimuli.length;t.rt<r&&(t.rt=null,t.response=null)}}}]),e}(),D=function(){function e(){r(this,e),this.timeout_handlers=[]}return i(e,[{key:"setTimeout",value:function(e,t){var r=window.setTimeout(e,t);return this.timeout_handlers.push(r),r}},{key:"clearAllTimeouts",value:function(){var e,t=y(this.timeout_handlers);try{for(t.s();!(e=t.n()).done;){var r=e.value;clearTimeout(r)}}catch(e){t.e(e)}finally{t.f()}this.timeout_handlers=[]}}]),e}();var C=["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","tria