From 945bef952c89d4d7e1ba812febc8796bc6d379d4 Mon Sep 17 00:00:00 2001
From: HGGshiwo <3190102788@zju.edu.cn>
Date: Mon, 13 Jan 2025 19:45:22 +0800
Subject: [PATCH] fix example
---
example/dist/assets/{index-B4-KZKvZ.js => index-DuMKNnvg.js} | 2 +-
example/dist/index.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename example/dist/assets/{index-B4-KZKvZ.js => index-DuMKNnvg.js} (76%)
diff --git a/example/dist/assets/index-B4-KZKvZ.js b/example/dist/assets/index-DuMKNnvg.js
similarity index 76%
rename from example/dist/assets/index-B4-KZKvZ.js
rename to example/dist/assets/index-DuMKNnvg.js
index 8e71641..cf78d0f 100644
--- a/example/dist/assets/index-B4-KZKvZ.js
+++ b/example/dist/assets/index-DuMKNnvg.js
@@ -14,7 +14,7 @@ var po=Object.defineProperty;var mo=(t,e,s)=>e in t?po(t,e,{enumerable:!0,config
* @vue/runtime-dom v3.4.33
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
-**/const ba="http://www.w3.org/2000/svg",_a="http://www.w3.org/1998/Math/MathML",ke=typeof document<"u"?document:null,Er=ke&&ke.createElement("template"),va={insert:(t,e,s)=>{e.insertBefore(t,s||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,s,n)=>{const r=e==="svg"?ke.createElementNS(ba,t):e==="mathml"?ke.createElementNS(_a,t):s?ke.createElement(t,{is:s}):ke.createElement(t);return t==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:t=>ke.createTextNode(t),createComment:t=>ke.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>ke.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,s,n,r,i){const l=s?s.previousSibling:e.lastChild;if(r&&(r===i||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{Er.innerHTML=n==="svg"?``:n==="mathml"?``:t;const a=Er.content;if(n==="svg"||n==="mathml"){const o=a.firstChild;for(;o.firstChild;)a.appendChild(o.firstChild);a.removeChild(o)}e.insertBefore(a,s)}return[l?l.nextSibling:e.firstChild,s?s.previousSibling:e.lastChild]}},Ve="transition",Ct="animation",$t=Symbol("_vtc"),Ln=(t,{slots:e})=>ut(fl,wa(t),e);Ln.displayName="Transition";const Zi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Ln.props=le({},_i,Zi);const nt=(t,e=[])=>{B(t)?t.forEach(s=>s(...e)):t&&t(...e)},Pr=t=>t?B(t)?t.some(e=>e.length>1):t.length>1:!1;function wa(t){const e={};for(const C in t)C in Zi||(e[C]=t[C]);if(t.css===!1)return e;const{name:s="v",type:n,duration:r,enterFromClass:i=`${s}-enter-from`,enterActiveClass:l=`${s}-enter-active`,enterToClass:a=`${s}-enter-to`,appearFromClass:o=i,appearActiveClass:c=l,appearToClass:u=a,leaveFromClass:f=`${s}-leave-from`,leaveActiveClass:d=`${s}-leave-active`,leaveToClass:m=`${s}-leave-to`}=t,y=xa(r),L=y&&y[0],G=y&&y[1],{onBeforeEnter:H,onEnter:j,onEnterCancelled:R,onLeave:I,onLeaveCancelled:O,onBeforeAppear:P=H,onAppear:D=j,onAppearCancelled:F=R}=e,M=(C,A,q)=>{rt(C,A?u:a),rt(C,A?c:l),q&&q()},V=(C,A)=>{C._isLeaving=!1,rt(C,f),rt(C,m),rt(C,d),A&&A()},$=C=>(A,q)=>{const te=C?D:j,X=()=>M(A,C,q);nt(te,[A,X]),Tr(()=>{rt(A,C?o:i),Fe(A,C?u:a),Pr(te)||Cr(A,n,L,X)})};return le(e,{onBeforeEnter(C){nt(H,[C]),Fe(C,i),Fe(C,l)},onBeforeAppear(C){nt(P,[C]),Fe(C,o),Fe(C,c)},onEnter:$(!1),onAppear:$(!0),onLeave(C,A){C._isLeaving=!0;const q=()=>V(C,A);Fe(C,f),Fe(C,d),Ta(),Tr(()=>{C._isLeaving&&(rt(C,f),Fe(C,m),Pr(I)||Cr(C,n,G,q))}),nt(I,[C,q])},onEnterCancelled(C){M(C,!1),nt(R,[C])},onAppearCancelled(C){M(C,!0),nt(F,[C])},onLeaveCancelled(C){V(C),nt(O,[C])}})}function xa(t){if(t==null)return null;if(se(t))return[Ns(t.enter),Ns(t.leave)];{const e=Ns(t);return[e,e]}}function Ns(t){return xo(t)}function Fe(t,e){e.split(/\s+/).forEach(s=>s&&t.classList.add(s)),(t[$t]||(t[$t]=new Set)).add(e)}function rt(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const s=t[$t];s&&(s.delete(e),s.size||(t[$t]=void 0))}function Tr(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let Ea=0;function Cr(t,e,s,n){const r=t._endId=++Ea,i=()=>{r===t._endId&&n()};if(s)return setTimeout(i,s);const{type:l,timeout:a,propCount:o}=Pa(t,e);if(!l)return n();const c=l+"end";let u=0;const f=()=>{t.removeEventListener(c,d),i()},d=m=>{m.target===t&&++u>=o&&f()};setTimeout(()=>{u(s[y]||"").split(", "),r=n(`${Ve}Delay`),i=n(`${Ve}Duration`),l=Ar(r,i),a=n(`${Ct}Delay`),o=n(`${Ct}Duration`),c=Ar(a,o);let u=null,f=0,d=0;e===Ve?l>0&&(u=Ve,f=l,d=i.length):e===Ct?c>0&&(u=Ct,f=c,d=o.length):(f=Math.max(l,c),u=f>0?l>c?Ve:Ct:null,d=u?u===Ve?i.length:o.length:0);const m=u===Ve&&/\b(transform|all)(,|$)/.test(n(`${Ve}Property`).toString());return{type:u,timeout:f,propCount:d,hasTransform:m}}function Ar(t,e){for(;t.lengthSr(s)+Sr(t[n])))}function Sr(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Ta(){return document.body.offsetHeight}function Ca(t,e,s){const n=t[$t];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):s?t.setAttribute("class",e):t.className=e}const Ir=Symbol("_vod"),Aa=Symbol("_vsh"),Sa=Symbol(""),Ia=/(^|;)\s*display\s*:/;function ja(t,e,s){const n=t.style,r=ie(s);let i=!1;if(s&&!r){if(e)if(ie(e))for(const l of e.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&rs(n,a,"")}else for(const l in e)s[l]==null&&rs(n,l,"");for(const l in s)l==="display"&&(i=!0),rs(n,l,s[l])}else if(r){if(e!==s){const l=n[Sa];l&&(s+=";"+l),n.cssText=s,i=Ia.test(s)}}else e&&t.removeAttribute("style");Ir in t&&(t[Ir]=i?n.display:"",t[Aa]&&(n.display="none"))}const jr=/\s*!important$/;function rs(t,e,s){if(B(s))s.forEach(n=>rs(t,e,n));else if(s==null&&(s=""),e.startsWith("--"))t.setProperty(e,s);else{const n=La(t,e);jr.test(s)?t.setProperty(pt(n),s.replace(jr,""),"important"):t[n]=s}}const Lr=["Webkit","Moz","ms"],Ds={};function La(t,e){const s=Ds[e];if(s)return s;let n=ft(e);if(n!=="filter"&&n in t)return Ds[e]=n;n=Ur(n);for(let r=0;rVs||(Da.then(()=>Vs=0),Vs=Date.now());function Fa(t,e){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Te(Ba(n,s.value),e,5,[n])};return s.value=t,s.attached=Va(),s}function Ba(t,e){if(B(e)){const s=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{s.call(t),t._stopped=!0},e.map(n=>r=>!r._stopped&&n&&n(r))}else return e}const Nr=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,$a=(t,e,s,n,r,i)=>{const l=r==="svg";e==="class"?Ca(t,n,l):e==="style"?ja(t,s,n):ms(e)?cn(e)||Ra(t,e,s,n,i):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Ha(t,e,n,l))?(Oa(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Mr(t,e,n,l,i,e!=="value")):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),Mr(t,e,n,l))};function Ha(t,e,s,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&Nr(e)&&U(s));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=t.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Nr(e)&&ie(s)?!1:e in t}const Ka=le({patchProp:$a},va);let Dr;function Ua(){return Dr||(Dr=$l(Ka))}const qa=(...t)=>{const e=Ua().createApp(...t),{mount:s}=e;return e.mount=n=>{const r=Wa(n);if(!r)return;const i=e._component;!U(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.innerHTML="";const l=s(r,!1,za(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},e};function za(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function Wa(t){return ie(t)?document.querySelector(t):t}const Ga="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Ya=(t=21)=>{let e="",s=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=Ga[s[t]&63];return e};const Fs=(t=void 0,e="100%",s=void 0,n=void 0)=>({name:"JsPsychContent",props:{trial:{type:Object,required:!1},on_load:{type:Function,required:!1}},setup(r){return En(async()=>{var l;let i=s==null?void 0:s(document.querySelector("#jspsych-content"),r.trial,r.on_load);i instanceof Promise?i=await i:(l=r.on_load)==null||l.call(r),n==null||n(i)}),()=>{let i;return Array.isArray(t)?i=t.map(l=>ut(l)):i=t&&ut(t,{key:Ya(),...r}),ut("div",{class:"jspsych-content",id:"jspsych-content",tabIndex:"0",style:`width: ${e};`},i)}}}),Ja=t=>{if(!t)return document.body;if(t instanceof Element)return t;if(typeof t=="string"){const e=document.querySelector(t);if(!e)throw Error("The element with the specified selector does not exist.");return e}throw Error("Display element must be an HTML element or a string that specifies a query selector.")},Xa={name:"JsPsych",props:{options:{type:Object,default:()=>({})},module:{type:Object,required:!1}},emits:["init"],setup(t,{slots:e}){const s="jsPsychModule"in window?window.jsPsychModule:t.module;if(!s)throw Error("JsPsych module is not found. You can either install it using npm, then passing it as module prop to JsPsychVue component or use CDN to load it.");const{JsPsych:n,initJsPsych:r}=s,i=el(),l=os(),a=os();n.prototype.prepareDom=function(){let j=Ja(t.options.display_element);this.displayContainerElement=j,this.DOM_container=this.displayContainerElement,this.contentElement=document.querySelector("#jspsych-content"),this.DOM_target=this.contentElement,this.displayElement=this.contentElement,this.data.createInteractionListeners(),window.addEventListener("beforeunload",t.options.on_close)};var o=n.prototype.run;n.prototype.run=function(j){return o.call(this,H(j))};var c=n.prototype.addNodeToEndOfTimeline;n.prototype.addNodeToEndOfTimeline=function(j){return c.call(this,H(j))};const u=e.finish&&e.finish()||e.default&&e.default(),f=t.options;if(u){const j=t.options.on_finish;f.on_finish=(...R)=>{j&&j.call(this,...R),i.value=Fs(u,y)}}const d=r(t.options);Li("jsPsych",d),Yi().emit("init",d);let y=(d.options||d.opts).experiment_width||"100%";typeof y=="number"&&(y=`${y}px`);const L=e.start&&e.start()||e.default&&e.default();i.value=Fs(L,y);const G=j=>{if(j.type&&j.component)throw new Error("Cannot specify both type and component in a single timeline node.");if(!j.type&&!j.component)throw new Error("Must specify either type or component in a timeline node.");const R=j.type||Object,I=j.component?j.component.info||{}:{};class O extends R{trial(M,V,$){return new Promise(C=>{l.value=V,a.value=$;const A=(...q)=>{var te;return(te=super.trial)==null?void 0:te.call(this,...q)};i.value=Fs(j.component,y,A,C)})}}Jn(O,"info",{...R.info,...I});const{component:P,...D}=j;return{...D,type:O}},H=j=>{if(!j)throw Error("Try to convert an empty timeline. Do you forget add the plugin?");if(j.type||j.component)return G(j);if(Array.isArray(j))return j.map(R=>H(R));if(!j.timeline)throw Error("TimelineNode expected one of the following property that is not undifined: timeline, type, component.");return{...j,timeline:H(j.timeline)}};return d.data.displayData=j=>{var R=j.format||"json";R=R.toLowerCase(),R!="json"&&R!="csv"&&(console.error("Invalid format declared for displayData function. Using json as default."),R="json");let I=d.data.allData?d.data.allData:d.data.results;const O=R==="json"?I.json(!0):I.csv();var P=j.dom||document.querySelector("#jspsych-display-element");P.innerHTML='',document.getElementById("jspsych-data-display").textContent=O},()=>ut("div",{id:"jspsych-display-element",class:"jspsych-display-element"},ut("div",{id:"jspsych-content-wrapper",class:"jspsych-content-wrapper"},ut(i.value,{trial:l.value,on_load:a.value})))}},Za=""+new URL("logo-CPmPqqKk.png",import.meta.url).href,Qa={class:"hello"},ec=ia('
For a guide and recipes on how to configure / customize this project, check out the vue-cli documentation.
',7),tc=Ei({info:{name:"hello world",parameters:{msg:{type:String,default:"hello"}}},__name:"HelloWorld",props:["trial","on_load"],setup(t){const e=kt("jsPsych"),s=t,n=()=>e.finishTrial();return(r,i)=>(ht(),Sn(ye,null,[pe("img",{onClick:n,alt:"Vue logo",src:Za}),pe("div",Qa,[pe("h1",null,"The msg is "+Yr(s.trial.msg)+", Click image above to continue.",1),ec])],64))}}),sc=(t,e)=>{const s=t.__vccOpts||t;for(const[n,r]of e)s[n]=r;return s},Bs=sc(tc,[["__scopeId","data-v-2e7b7f92"]]),nc=t=>[{component:Bs,msg:"Hello"},{component:Bs,msg:"World"},{component:Bs,msg:"Goodbye"}];var mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function On(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function rc(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var s=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};s.prototype=e.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(s,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}),s}const ic=t=>{const e=new Set;do for(const s of Reflect.ownKeys(t))e.add([t,s]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};var oc=(t,{include:e,exclude:s}={})=>{const n=r=>{const i=l=>typeof l=="string"?r===l:l.test(r);return e?e.some(i):s?!s.some(i):!0};for(const[r,i]of ic(t.constructor.prototype)){if(i==="constructor"||!n(i))continue;const l=Reflect.getOwnPropertyDescriptor(r,i);l&&typeof l.value=="function"&&(t[i]=t[i].bind(t))}return t};const Mn=On(oc);var kn={exports:{}};kn.exports;(function(t){(function(e,s,n){function r(o){var c=this,u=a();c.next=function(){var f=2091639*c.s0+c.c*23283064365386963e-26;return c.s0=c.s1,c.s1=c.s2,c.s2=f-(c.c=f|0)},c.c=1,c.s0=u(" "),c.s1=u(" "),c.s2=u(" "),c.s0-=u(o),c.s0<0&&(c.s0+=1),c.s1-=u(o),c.s1<0&&(c.s1+=1),c.s2-=u(o),c.s2<0&&(c.s2+=1),u=null}function i(o,c){return c.c=o.c,c.s0=o.s0,c.s1=o.s1,c.s2=o.s2,c}function l(o,c){var u=new r(o),f=c&&c.state,d=u.next;return d.int32=function(){return u.next()*4294967296|0},d.double=function(){return d()+(d()*2097152|0)*11102230246251565e-32},d.quick=d,f&&(typeof f=="object"&&i(f,u),d.state=function(){return i(u,{})}),d}function a(){var o=4022871197,c=function(u){u=String(u);for(var f=0;f>>0,d-=o,d*=o,o=d>>>0,d-=o,o+=d*4294967296}return(o>>>0)*23283064365386963e-26};return c}s&&s.exports?s.exports=l:this.alea=l})(mt,t)})(kn);var Qi=kn.exports;const lc=On(Qi);var Rn={exports:{}};Rn.exports;(function(t){(function(e,s,n){function r(a){var o=this,c="";o.x=0,o.y=0,o.z=0,o.w=0,o.next=function(){var f=o.x^o.x<<11;return o.x=o.y,o.y=o.z,o.z=o.w,o.w^=o.w>>>19^f^f>>>8},a===(a|0)?o.x=a:c+=a;for(var u=0;u>>0)/4294967296};return f.double=function(){do var d=c.next()>>>11,m=(c.next()>>>0)/4294967296,y=(d+m)/(1<<21);while(y===0);return y},f.int32=c.next,f.quick=f,u&&(typeof u=="object"&&i(u,c),f.state=function(){return i(c,{})}),f}s&&s.exports?s.exports=l:this.xor128=l})(mt,t)})(Rn);var ac=Rn.exports,Nn={exports:{}};Nn.exports;(function(t){(function(e,s,n){function r(a){var o=this,c="";o.next=function(){var f=o.x^o.x>>>2;return o.x=o.y,o.y=o.z,o.z=o.w,o.w=o.v,(o.d=o.d+362437|0)+(o.v=o.v^o.v<<4^(f^f<<1))|0},o.x=0,o.y=0,o.z=0,o.w=0,o.v=0,a===(a|0)?o.x=a:c+=a;for(var u=0;u>>4),o.next()}function i(a,o){return o.x=a.x,o.y=a.y,o.z=a.z,o.w=a.w,o.v=a.v,o.d=a.d,o}function l(a,o){var c=new r(a),u=o&&o.state,f=function(){return(c.next()>>>0)/4294967296};return f.double=function(){do var d=c.next()>>>11,m=(c.next()>>>0)/4294967296,y=(d+m)/(1<<21);while(y===0);return y},f.int32=c.next,f.quick=f,u&&(typeof u=="object"&&i(u,c),f.state=function(){return i(c,{})}),f}s&&s.exports?s.exports=l:this.xorwow=l})(mt,t)})(Nn);var cc=Nn.exports,Dn={exports:{}};Dn.exports;(function(t){(function(e,s,n){function r(a){var o=this;o.next=function(){var u=o.x,f=o.i,d,m;return d=u[f],d^=d>>>7,m=d^d<<24,d=u[f+1&7],m^=d^d>>>10,d=u[f+3&7],m^=d^d>>>3,d=u[f+4&7],m^=d^d<<7,d=u[f+7&7],d=d^d<<13,m^=d^d<<9,u[f]=m,o.i=f+1&7,m};function c(u,f){var d,m=[];if(f===(f|0))m[0]=f;else for(f=""+f,d=0;d0;--d)u.next()}c(o,a)}function i(a,o){return o.x=a.x.slice(),o.i=a.i,o}function l(a,o){a==null&&(a=+new Date);var c=new r(a),u=o&&o.state,f=function(){return(c.next()>>>0)/4294967296};return f.double=function(){do var d=c.next()>>>11,m=(c.next()>>>0)/4294967296,y=(d+m)/(1<<21);while(y===0);return y},f.int32=c.next,f.quick=f,u&&(u.x&&i(u,c),f.state=function(){return i(c,{})}),f}s&&s.exports?s.exports=l:this.xorshift7=l})(mt,t)})(Dn);var uc=Dn.exports,Vn={exports:{}};Vn.exports;(function(t){(function(e,s,n){function r(a){var o=this;o.next=function(){var u=o.w,f=o.X,d=o.i,m,y;return o.w=u=u+1640531527|0,y=f[d+34&127],m=f[d=d+1&127],y^=y<<13,m^=m<<17,y^=y>>>15,m^=m>>>12,y=f[d]=y^m,o.i=d,y+(u^u>>>16)|0};function c(u,f){var d,m,y,L,G,H=[],j=128;for(f===(f|0)?(m=f,f=null):(f=f+"\0",m=0,j=Math.max(j,f.length)),y=0,L=-32;L>>15,m^=m<<4,m^=m>>>13,L>=0&&(G=G+1640531527|0,d=H[L&127]^=m+G,y=d==0?y+1:0);for(y>=128&&(H[(f&&f.length||0)&127]=-1),y=127,L=4*128;L>0;--L)m=H[y+34&127],d=H[y=y+1&127],m^=m<<13,d^=d<<17,m^=m>>>15,d^=d>>>12,H[y]=m^d;u.w=G,u.X=H,u.i=y}c(o,a)}function i(a,o){return o.i=a.i,o.w=a.w,o.X=a.X.slice(),o}function l(a,o){a==null&&(a=+new Date);var c=new r(a),u=o&&o.state,f=function(){return(c.next()>>>0)/4294967296};return f.double=function(){do var d=c.next()>>>11,m=(c.next()>>>0)/4294967296,y=(d+m)/(1<<21);while(y===0);return y},f.int32=c.next,f.quick=f,u&&(u.X&&i(u,c),f.state=function(){return i(c,{})}),f}s&&s.exports?s.exports=l:this.xor4096=l})(mt,t)})(Vn);var fc=Vn.exports,Fn={exports:{}};Fn.exports;(function(t){(function(e,s,n){function r(a){var o=this,c="";o.next=function(){var f=o.b,d=o.c,m=o.d,y=o.a;return f=f<<25^f>>>7^d,d=d-m|0,m=m<<24^m>>>8^y,y=y-f|0,o.b=f=f<<20^f>>>12^d,o.c=d=d-m|0,o.d=m<<16^d>>>16^y,o.a=y-f|0},o.a=0,o.b=0,o.c=-1640531527,o.d=1367130551,a===Math.floor(a)?(o.a=a/4294967296|0,o.b=a|0):c+=a;for(var u=0;u>>0)/4294967296};return f.double=function(){do var d=c.next()>>>11,m=(c.next()>>>0)/4294967296,y=(d+m)/(1<<21);while(y===0);return y},f.int32=c.next,f.quick=f,u&&(typeof u=="object"&&i(u,c),f.state=function(){return i(c,{})}),f}s&&s.exports?s.exports=l:this.tychei=l})(mt,t)})(Fn);var dc=Fn.exports,eo={exports:{}};const hc={},pc=Object.freeze(Object.defineProperty({__proto__:null,default:hc},Symbol.toStringTag,{value:"Module"})),mc=rc(pc);(function(t){(function(e,s,n){var r=256,i=6,l=52,a="random",o=n.pow(r,i),c=n.pow(2,l),u=c*2,f=r-1,d;function m(I,O,P){var D=[];O=O==!0?{entropy:!0}:O||{};var F=H(G(O.entropy?[I,R(s)]:I??j(),3),D),M=new y(D),V=function(){for(var $=M.g(i),C=o,A=0;$=u;)$/=2,C/=2,A>>>=1;return($+A)/C};return V.int32=function(){return M.g(4)|0},V.quick=function(){return M.g(4)/4294967296},V.double=V,H(R(M.S),s),(O.pass||P||function($,C,A,q){return q&&(q.S&&L(q,M),$.state=function(){return L(M,{})}),A?(n[a]=$,C):$})(V,F,"global"in O?O.global:this==n,O.state)}function y(I){var O,P=I.length,D=this,F=0,M=D.i=D.j=0,V=D.S=[];for(P||(I=[P++]);F1?n():r()}function n(){for(var f=!1,d;!f;)d=r(),d.length<=t.maxLength&&(f=!0);return d}function r(){return sn[i(sn.length)]}function i(f){const d=e?e():Math.random();return Math.floor(d*f)}if(typeof t>"u")return s();typeof t=="number"&&(t={exactly:t}),t.exactly&&(t.min=t.exactly,t.max=t.exactly),typeof t.wordsPerString!="number"&&(t.wordsPerString=1),typeof t.formatter!="function"&&(t.formatter=f=>f),typeof t.separator!="string"&&(t.separator=" ");for(var l=t.min+i(t.max+1-t.min),a=[],o="",c=0,u=0;u[ds.getExtensionNameByClass(n.type),this.dependencies.instantiateExtension(n.type)]))}static getExtensionNameByClass(e){return e.info.name}getExtensionInstanceByClass(e){return this.extensions[ds.getExtensionNameByClass(e)]}async initializeExtensions(){await Promise.all(this.extensionsConfiguration.map(({type:e,params:s={}})=>{this.getExtensionInstanceByClass(e).initialize(s);const n=e.info;!("version"in n)&&!("data"in n)?console.warn(n.name,"is missing the 'version' and 'data' fields. Please update extension as 'version' and 'data' will be required in v9. See https://www.jspsych.org/latest/developers/extension-development/ for more details."):"version"in n?"data"in n||console.warn(n.name,"is missing the 'data' field. Please update extension as 'data' will be required in v9. See https://www.jspsych.org/latest/developers/extension-development/ for more details."):console.warn(n.name,"is missing the 'version' field. Please update extension as 'version' will be required in v9. See https://www.jspsych.org/latest/developers/extension-development/ for more details.")}))}onStart(e=[]){var s;for(const{type:n,params:r}of e)(s=this.getExtensionInstanceByClass(n))==null||s.on_start(r)}onLoad(e=[]){var s;for(const{type:n,params:r}of e)(s=this.getExtensionInstanceByClass(n))==null||s.on_load(r)}async onFinish(e=[]){const s=await Promise.all(e.map(({type:r,params:i})=>{var l;return Promise.resolve((l=this.getExtensionInstanceByClass(r))==null?void 0:l.on_finish(i))})),n=e.length?{extension_type:e.map(({type:r})=>r.info.name),extension_version:e.map(({type:r})=>r.info.version)}:{};return s.unshift(n),Object.assign({},...s)}}function is(t){return[...new Set(t)]}function Se(t){if(!t)return t;let e;if(Array.isArray(t)){e=[];for(const s of t)e.push(Se(s));return e}else if(typeof t=="object"&&t!==null){e={};for(const s in t)t.hasOwnProperty(s)&&(e[s]=Se(t[s]));return e}else return t}function hs(t,e){let s={};for(const n in t)t.hasOwnProperty(n)&&(typeof t[n]=="object"&&e.hasOwnProperty(n)?s[n]=hs(t[n],e[n]):s[n]=t[n]);for(const n in e)e.hasOwnProperty(n)&&(s.hasOwnProperty(n)&&typeof e[n]=="object"?s[n]=hs(s[n],e[n]):s[n]=e[n]);return s}var Sc=Object.freeze({__proto__:null,unique:is,deepCopy:Se,deepMerge:hs});class Bn{constructor(e=[]){this.values=e}sum(){let e=0;for(const s of this.values)e+=s;return e}mean(){let e=0,s=0;for(const n of this.values)typeof n<"u"&&n!==null&&(e+=n,s++);if(s!==0)return e/s}median(){if(this.values.length===0)return;const e=this.values.slice(0).sort(function(r,i){return r-i}),s=Math.floor(e.length/2);return e.length%2===0?(e[s]+e[s-1])/2:e[s]}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 s=0;for(const r of this.values)s+=Math.pow(r-e,2);return s/(this.values.length-1)}sd(){const e=this.variance();return Math.sqrt(e)}frequencies(){const e={};for(const s of this.values)typeof e[s]>"u"?e[s]=1:e[s]++;return e}all(e){for(const s of this.values)if(!e(s))return!1;return!0}subset(e){const s=[];for(const n of this.values)e(n)&&s.push(n);return new Bn(s)}}function Ic(t,e){const s=new Blob([t],{type:"text/plain"});let n="";typeof window.webkitURL<"u"?n=window.webkitURL.createObjectURL(s):n=window.URL.createObjectURL(s);const r=document.createElement("a");r.id="jspsych-download-as-text-link",r.style.display="none",r.download=e,r.href=n,r.click()}function jc(t){const e=typeof t!="object"?JSON.parse(t):t;let s="",n="";const r=[];for(const i of e)for(const l in i){let a=l+"";a='"'+a.replace(/"/g,'""')+'",',r.includes(l)||(r.push(l),s+=a)}s=s.slice(0,-1),n+=s+`\r
+**/const ba="http://www.w3.org/2000/svg",_a="http://www.w3.org/1998/Math/MathML",ke=typeof document<"u"?document:null,Er=ke&&ke.createElement("template"),va={insert:(t,e,s)=>{e.insertBefore(t,s||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,s,n)=>{const r=e==="svg"?ke.createElementNS(ba,t):e==="mathml"?ke.createElementNS(_a,t):s?ke.createElement(t,{is:s}):ke.createElement(t);return t==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:t=>ke.createTextNode(t),createComment:t=>ke.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>ke.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,s,n,r,i){const l=s?s.previousSibling:e.lastChild;if(r&&(r===i||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{Er.innerHTML=n==="svg"?``:n==="mathml"?``:t;const a=Er.content;if(n==="svg"||n==="mathml"){const o=a.firstChild;for(;o.firstChild;)a.appendChild(o.firstChild);a.removeChild(o)}e.insertBefore(a,s)}return[l?l.nextSibling:e.firstChild,s?s.previousSibling:e.lastChild]}},Ve="transition",Ct="animation",$t=Symbol("_vtc"),Ln=(t,{slots:e})=>ut(fl,wa(t),e);Ln.displayName="Transition";const Zi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Ln.props=le({},_i,Zi);const nt=(t,e=[])=>{B(t)?t.forEach(s=>s(...e)):t&&t(...e)},Pr=t=>t?B(t)?t.some(e=>e.length>1):t.length>1:!1;function wa(t){const e={};for(const C in t)C in Zi||(e[C]=t[C]);if(t.css===!1)return e;const{name:s="v",type:n,duration:r,enterFromClass:i=`${s}-enter-from`,enterActiveClass:l=`${s}-enter-active`,enterToClass:a=`${s}-enter-to`,appearFromClass:o=i,appearActiveClass:c=l,appearToClass:u=a,leaveFromClass:f=`${s}-leave-from`,leaveActiveClass:d=`${s}-leave-active`,leaveToClass:m=`${s}-leave-to`}=t,y=xa(r),L=y&&y[0],G=y&&y[1],{onBeforeEnter:H,onEnter:j,onEnterCancelled:R,onLeave:I,onLeaveCancelled:O,onBeforeAppear:P=H,onAppear:D=j,onAppearCancelled:F=R}=e,M=(C,A,q)=>{rt(C,A?u:a),rt(C,A?c:l),q&&q()},V=(C,A)=>{C._isLeaving=!1,rt(C,f),rt(C,m),rt(C,d),A&&A()},$=C=>(A,q)=>{const te=C?D:j,X=()=>M(A,C,q);nt(te,[A,X]),Tr(()=>{rt(A,C?o:i),Fe(A,C?u:a),Pr(te)||Cr(A,n,L,X)})};return le(e,{onBeforeEnter(C){nt(H,[C]),Fe(C,i),Fe(C,l)},onBeforeAppear(C){nt(P,[C]),Fe(C,o),Fe(C,c)},onEnter:$(!1),onAppear:$(!0),onLeave(C,A){C._isLeaving=!0;const q=()=>V(C,A);Fe(C,f),Fe(C,d),Ta(),Tr(()=>{C._isLeaving&&(rt(C,f),Fe(C,m),Pr(I)||Cr(C,n,G,q))}),nt(I,[C,q])},onEnterCancelled(C){M(C,!1),nt(R,[C])},onAppearCancelled(C){M(C,!0),nt(F,[C])},onLeaveCancelled(C){V(C),nt(O,[C])}})}function xa(t){if(t==null)return null;if(se(t))return[Ns(t.enter),Ns(t.leave)];{const e=Ns(t);return[e,e]}}function Ns(t){return xo(t)}function Fe(t,e){e.split(/\s+/).forEach(s=>s&&t.classList.add(s)),(t[$t]||(t[$t]=new Set)).add(e)}function rt(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const s=t[$t];s&&(s.delete(e),s.size||(t[$t]=void 0))}function Tr(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let Ea=0;function Cr(t,e,s,n){const r=t._endId=++Ea,i=()=>{r===t._endId&&n()};if(s)return setTimeout(i,s);const{type:l,timeout:a,propCount:o}=Pa(t,e);if(!l)return n();const c=l+"end";let u=0;const f=()=>{t.removeEventListener(c,d),i()},d=m=>{m.target===t&&++u>=o&&f()};setTimeout(()=>{u(s[y]||"").split(", "),r=n(`${Ve}Delay`),i=n(`${Ve}Duration`),l=Ar(r,i),a=n(`${Ct}Delay`),o=n(`${Ct}Duration`),c=Ar(a,o);let u=null,f=0,d=0;e===Ve?l>0&&(u=Ve,f=l,d=i.length):e===Ct?c>0&&(u=Ct,f=c,d=o.length):(f=Math.max(l,c),u=f>0?l>c?Ve:Ct:null,d=u?u===Ve?i.length:o.length:0);const m=u===Ve&&/\b(transform|all)(,|$)/.test(n(`${Ve}Property`).toString());return{type:u,timeout:f,propCount:d,hasTransform:m}}function Ar(t,e){for(;t.lengthSr(s)+Sr(t[n])))}function Sr(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Ta(){return document.body.offsetHeight}function Ca(t,e,s){const n=t[$t];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):s?t.setAttribute("class",e):t.className=e}const Ir=Symbol("_vod"),Aa=Symbol("_vsh"),Sa=Symbol(""),Ia=/(^|;)\s*display\s*:/;function ja(t,e,s){const n=t.style,r=ie(s);let i=!1;if(s&&!r){if(e)if(ie(e))for(const l of e.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&rs(n,a,"")}else for(const l in e)s[l]==null&&rs(n,l,"");for(const l in s)l==="display"&&(i=!0),rs(n,l,s[l])}else if(r){if(e!==s){const l=n[Sa];l&&(s+=";"+l),n.cssText=s,i=Ia.test(s)}}else e&&t.removeAttribute("style");Ir in t&&(t[Ir]=i?n.display:"",t[Aa]&&(n.display="none"))}const jr=/\s*!important$/;function rs(t,e,s){if(B(s))s.forEach(n=>rs(t,e,n));else if(s==null&&(s=""),e.startsWith("--"))t.setProperty(e,s);else{const n=La(t,e);jr.test(s)?t.setProperty(pt(n),s.replace(jr,""),"important"):t[n]=s}}const Lr=["Webkit","Moz","ms"],Ds={};function La(t,e){const s=Ds[e];if(s)return s;let n=ft(e);if(n!=="filter"&&n in t)return Ds[e]=n;n=Ur(n);for(let r=0;rVs||(Da.then(()=>Vs=0),Vs=Date.now());function Fa(t,e){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Te(Ba(n,s.value),e,5,[n])};return s.value=t,s.attached=Va(),s}function Ba(t,e){if(B(e)){const s=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{s.call(t),t._stopped=!0},e.map(n=>r=>!r._stopped&&n&&n(r))}else return e}const Nr=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,$a=(t,e,s,n,r,i)=>{const l=r==="svg";e==="class"?Ca(t,n,l):e==="style"?ja(t,s,n):ms(e)?cn(e)||Ra(t,e,s,n,i):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Ha(t,e,n,l))?(Oa(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Mr(t,e,n,l,i,e!=="value")):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),Mr(t,e,n,l))};function Ha(t,e,s,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&Nr(e)&&U(s));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=t.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Nr(e)&&ie(s)?!1:e in t}const Ka=le({patchProp:$a},va);let Dr;function Ua(){return Dr||(Dr=$l(Ka))}const qa=(...t)=>{const e=Ua().createApp(...t),{mount:s}=e;return e.mount=n=>{const r=Wa(n);if(!r)return;const i=e._component;!U(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.innerHTML="";const l=s(r,!1,za(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},e};function za(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function Wa(t){return ie(t)?document.querySelector(t):t}const Ga="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Ya=(t=21)=>{let e="",s=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=Ga[s[t]&63];return e};const Fs=(t=void 0,e="100%",s=void 0,n=void 0)=>({name:"JsPsychContent",props:{trial:{type:Object,required:!1},on_load:{type:Function,required:!1}},setup(r){return En(async()=>{var l;let i=s==null?void 0:s(document.querySelector("#jspsych-content"),r.trial,r.on_load);i instanceof Promise?(i=await i,n==null||n(i)):(l=r.on_load)==null||l.call(r)}),()=>{let i;return Array.isArray(t)?i=t.map(l=>ut(l)):i=t&&ut(t,{key:Ya(),...r}),ut("div",{class:"jspsych-content",id:"jspsych-content",tabIndex:"0",style:`width: ${e};`},i)}}}),Ja=t=>{if(!t)return document.body;if(t instanceof Element)return t;if(typeof t=="string"){const e=document.querySelector(t);if(!e)throw Error("The element with the specified selector does not exist.");return e}throw Error("Display element must be an HTML element or a string that specifies a query selector.")},Xa={name:"JsPsych",props:{options:{type:Object,default:()=>({})},module:{type:Object,required:!1}},emits:["init"],setup(t,{slots:e}){const s="jsPsychModule"in window?window.jsPsychModule:t.module;if(!s)throw Error("JsPsych module is not found. You can either install it using npm, then passing it as module prop to JsPsychVue component or use CDN to load it.");const{JsPsych:n,initJsPsych:r}=s,i=el(),l=os(),a=os();n.prototype.prepareDom=function(){let j=Ja(t.options.display_element);this.displayContainerElement=j,this.DOM_container=this.displayContainerElement,this.contentElement=document.querySelector("#jspsych-content"),this.DOM_target=this.contentElement,this.displayElement=this.contentElement,this.data.createInteractionListeners(),window.addEventListener("beforeunload",t.options.on_close)};var o=n.prototype.run;n.prototype.run=function(j){return o.call(this,H(j))};var c=n.prototype.addNodeToEndOfTimeline;n.prototype.addNodeToEndOfTimeline=function(j){return c.call(this,H(j))};const u=e.finish&&e.finish()||e.default&&e.default(),f=t.options;if(u){const j=t.options.on_finish;f.on_finish=(...R)=>{j&&j.call(this,...R),i.value=Fs(u,y)}}const d=r(t.options);Li("jsPsych",d),Yi().emit("init",d);let y=(d.options||d.opts).experiment_width||"100%";typeof y=="number"&&(y=`${y}px`);const L=e.start&&e.start()||e.default&&e.default();i.value=Fs(L,y);const G=j=>{if(j.type&&j.component)throw new Error("Cannot specify both type and component in a single timeline node.");if(!j.type&&!j.component)throw new Error("Must specify either type or component in a timeline node.");const R=j.type||Object,I=j.component?j.component.info||{}:{};class O extends R{trial(M,V,$){return new Promise(C=>{l.value=V,a.value=$;const A=(...q)=>{var te;return(te=super.trial)==null?void 0:te.call(this,...q)};i.value=Fs(j.component,y,A,C)})}}Jn(O,"info",{...R.info,...I});const{component:P,...D}=j;return{...D,type:O}},H=j=>{if(!j)throw Error("Try to convert an empty timeline. Do you forget add the plugin?");if(j.type||j.component)return G(j);if(Array.isArray(j))return j.map(R=>H(R));if(!j.timeline)throw Error("TimelineNode expected one of the following property that is not undifined: timeline, type, component.");return{...j,timeline:H(j.timeline)}};return d.data.displayData=j=>{var R=j.format||"json";R=R.toLowerCase(),R!="json"&&R!="csv"&&(console.error("Invalid format declared for displayData function. Using json as default."),R="json");let I=d.data.allData?d.data.allData:d.data.results;const O=R==="json"?I.json(!0):I.csv();var P=j.dom||document.querySelector("#jspsych-display-element");P.innerHTML='',document.getElementById("jspsych-data-display").textContent=O},()=>ut("div",{id:"jspsych-display-element",class:"jspsych-display-element"},ut("div",{id:"jspsych-content-wrapper",class:"jspsych-content-wrapper"},ut(i.value,{trial:l.value,on_load:a.value})))}},Za=""+new URL("logo-CPmPqqKk.png",import.meta.url).href,Qa={class:"hello"},ec=ia('
For a guide and recipes on how to configure / customize this project, check out the vue-cli documentation.